Agent Implementation (#78)
* Agent Implementation
* Remove unused Findrocprofiler
* Update lib/rocprofiler/hsa/agent.{hpp,cpp}
- default AgentInfo ctor
- getNumaNode() const
- noexcept move ctors
- default initializers for member variables
- fixed clang-tidy recommentations
- preallocate
- static in anon namespace
- AgentInfo::setName uses strncpy and ensures that it is terminated
* Update lib/rocprofiler/rocprofiler.cpp (agent.cpp and pc_sampling.cpp)
- move public PC sampling function implementations to pc_sampling.cpp
- move public agent function implementation to agent.cpp
This commit is contained in:
کامیت شده توسط
GitHub
والد
5c07deb159
کامیت
6fb9000fa1
@@ -29,6 +29,7 @@ target_link_libraries(
|
||||
$<BUILD_INTERFACE:rocprofiler::rocprofiler-hip>
|
||||
$<BUILD_INTERFACE:rocprofiler::rocprofiler-amd-comgr>
|
||||
$<BUILD_INTERFACE:rocprofiler::rocprofiler-hsa-runtime>
|
||||
$<BUILD_INTERFACE:rocprofiler::rocprofiler-ptl>)
|
||||
$<BUILD_INTERFACE:rocprofiler::rocprofiler-ptl>
|
||||
$<BUILD_INTERFACE:rocprofiler::rocprofiler-hsa-aql>)
|
||||
set_target_properties(rocprofiler-common-library PROPERTIES OUTPUT_NAME
|
||||
rocprofiler-common)
|
||||
|
||||
@@ -45,5 +45,21 @@ timestamp_ns()
|
||||
// TODO(jrmadsen): this should be updated to the HSA method
|
||||
return std::chrono::steady_clock::now().time_since_epoch().count();
|
||||
}
|
||||
|
||||
template <class Container, typename Key = typename Container::key_type>
|
||||
const auto*
|
||||
get_val(const Container& map, const Key& key)
|
||||
{
|
||||
auto pos = map.find(key);
|
||||
return (pos != map.end() ? &pos->second : nullptr);
|
||||
}
|
||||
|
||||
template <class Container, typename Key = typename Container::key_type>
|
||||
auto*
|
||||
get_val(Container& map, const Key& key)
|
||||
{
|
||||
auto pos = map.find(key);
|
||||
return (pos != map.end() ? &pos->second : nullptr);
|
||||
}
|
||||
} // namespace common
|
||||
} // namespace rocprofiler
|
||||
|
||||
مرجع در شماره جدید
Block a user