Fix a build error when compiling with clang
Fix the following error:
hip_intercept.cpp:52:7: error: reinterpret_cast from 'const void *' to 'decltype(activity_prof::report_activity.load())' (aka 'int (*)(activity_domain_t, unsigned int, void *)') casts away qualifiers
reinterpret_cast<decltype(activity_prof::report_activity.load())>(function),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
by replacing the 'const void *function' argument with the correct type.
Change-Id: I859d45ee01b7aaa1e46563cdc37de57b4159d330
[ROCm/clr commit: c3a340c21b]
This commit is contained in:
committed by
Rahul Garg
vanhempi
f149b21399
commit
6ec1955d2c
@@ -47,10 +47,9 @@ const char* hipKernelNameRefByPtr(const void* host_function, hipStream_t stream)
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
void hipRegisterTracerCallback(const void* function) {
|
||||
activity_prof::report_activity.store(
|
||||
reinterpret_cast<decltype(activity_prof::report_activity.load())>(function),
|
||||
std::memory_order_relaxed);
|
||||
void hipRegisterTracerCallback(int (*function)(activity_domain_t domain, uint32_t operation_id,
|
||||
void* data)) {
|
||||
activity_prof::report_activity.store(function, std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
const char* hipApiName(uint32_t id) { return hip_api_name(id); }
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user