From 8ca652ba46ee1056c22dba1e676fa341f69d28ae Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 10 Oct 2019 20:23:33 -0400
Subject: [PATCH] P4 to Git Change 2011990 by eshcherb@evgeny-hip on 2019/10/10
20:09:32
SWDEV-197287 - HIP tracing layer: any-api-id removing
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_prof_api.h#3 edit
... //depot/stg/opencl/drivers/opencl/hip_prof_gen.py#3 edit
---
hipamd/api/hip/hip_prof_api.h | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/hipamd/api/hip/hip_prof_api.h b/hipamd/api/hip/hip_prof_api.h
index f0cc5881c4..bfea1a6859 100644
--- a/hipamd/api/hip/hip_prof_api.h
+++ b/hipamd/api/hip/hip_prof_api.h
@@ -77,9 +77,8 @@ class api_callbacks_table_t {
bool set_activity(uint32_t id, act_t fun, void* arg) {
std::lock_guard lock(mutex_);
bool ret = true;
- if (id == HIP_API_ID_ANY) {
- for (unsigned i = 0; i < HIP_API_ID_NUMBER; ++i) set_activity(i, fun, arg);
- } else if (id < HIP_API_ID_NUMBER) {
+
+ if (id < HIP_API_ID_NUMBER) {
cb_sync(id);
callbacks_table_.arr[id].act = fun;
callbacks_table_.arr[id].a_arg = arg;
@@ -95,9 +94,8 @@ class api_callbacks_table_t {
bool set_callback(uint32_t id, fun_t fun, void* arg) {
std::lock_guard lock(mutex_);
bool ret = true;
- if (id == HIP_API_ID_ANY) {
- for (unsigned i = 0; i < HIP_API_ID_NUMBER; ++i) set_callback(i, fun, arg);
- } else if (id < HIP_API_ID_NUMBER) {
+
+ if (id < HIP_API_ID_NUMBER) {
cb_sync(id);
callbacks_table_.arr[id].fun = fun;
callbacks_table_.arr[id].arg = arg;