@@ -14,13 +14,13 @@ offload_impl_result_t offloadInit_val() {
1414 return offloadInit_impl ();
1515}
1616OFFLOAD_APIEXPORT offload_result_t OFFLOAD_APICALL offloadInit () {
17- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
17+ if (offloadConfig (). TracingEnabled ) {
1818 std::cout << " ---> offloadInit" ;
1919 }
2020
2121 offload_result_t Result = offloadInit_val ();
2222
23- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
23+ if (offloadConfig (). TracingEnabled ) {
2424 std::cout << " ()" ;
2525 std::cout << " -> " << Result << " \n " ;
2626 if (Result && Result->Details ) {
@@ -45,13 +45,13 @@ offload_impl_result_t offloadShutDown_val() {
4545 return offloadShutDown_impl ();
4646}
4747OFFLOAD_APIEXPORT offload_result_t OFFLOAD_APICALL offloadShutDown () {
48- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
48+ if (offloadConfig (). TracingEnabled ) {
4949 std::cout << " ---> offloadShutDown" ;
5050 }
5151
5252 offload_result_t Result = offloadShutDown_val ();
5353
54- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
54+ if (offloadConfig (). TracingEnabled ) {
5555 std::cout << " ()" ;
5656 std::cout << " -> " << Result << " \n " ;
5757 if (Result && Result->Details ) {
@@ -87,13 +87,13 @@ offloadPlatformGet_val(uint32_t NumEntries,
8787}
8888OFFLOAD_APIEXPORT offload_result_t OFFLOAD_APICALL
8989offloadPlatformGet (uint32_t NumEntries, offload_platform_handle_t *Platforms) {
90- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
90+ if (offloadConfig (). TracingEnabled ) {
9191 std::cout << " ---> offloadPlatformGet" ;
9292 }
9393
9494 offload_result_t Result = offloadPlatformGet_val (NumEntries, Platforms);
9595
96- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
96+ if (offloadConfig (). TracingEnabled ) {
9797 offload_platform_get_params_t Params = {&NumEntries, &Platforms};
9898 std::cout << " (" << &Params << " )" ;
9999 std::cout << " -> " << Result << " \n " ;
@@ -126,13 +126,13 @@ offload_impl_result_t offloadPlatformGetCount_val(uint32_t *NumPlatforms) {
126126}
127127OFFLOAD_APIEXPORT offload_result_t OFFLOAD_APICALL
128128offloadPlatformGetCount (uint32_t *NumPlatforms) {
129- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
129+ if (offloadConfig (). TracingEnabled ) {
130130 std::cout << " ---> offloadPlatformGetCount" ;
131131 }
132132
133133 offload_result_t Result = offloadPlatformGetCount_val (NumPlatforms);
134134
135- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
135+ if (offloadConfig (). TracingEnabled ) {
136136 offload_platform_get_count_params_t Params = {&NumPlatforms};
137137 std::cout << " (" << &Params << " )" ;
138138 std::cout << " -> " << Result << " \n " ;
@@ -176,14 +176,14 @@ offloadPlatformGetInfo_val(offload_platform_handle_t Platform,
176176OFFLOAD_APIEXPORT offload_result_t OFFLOAD_APICALL offloadPlatformGetInfo (
177177 offload_platform_handle_t Platform, offload_platform_info_t PropName,
178178 size_t PropSize, void *PropValue) {
179- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
179+ if (offloadConfig (). TracingEnabled ) {
180180 std::cout << " ---> offloadPlatformGetInfo" ;
181181 }
182182
183183 offload_result_t Result =
184184 offloadPlatformGetInfo_val (Platform, PropName, PropSize, PropValue);
185185
186- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
186+ if (offloadConfig (). TracingEnabled ) {
187187 offload_platform_get_info_params_t Params = {&Platform, &PropName,
188188 &PropSize, &PropValue};
189189 std::cout << " (" << &Params << " )" ;
@@ -225,14 +225,14 @@ offloadPlatformGetInfoSize_val(offload_platform_handle_t Platform,
225225OFFLOAD_APIEXPORT offload_result_t OFFLOAD_APICALL offloadPlatformGetInfoSize (
226226 offload_platform_handle_t Platform, offload_platform_info_t PropName,
227227 size_t *PropSizeRet) {
228- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
228+ if (offloadConfig (). TracingEnabled ) {
229229 std::cout << " ---> offloadPlatformGetInfoSize" ;
230230 }
231231
232232 offload_result_t Result =
233233 offloadPlatformGetInfoSize_val (Platform, PropName, PropSizeRet);
234234
235- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
235+ if (offloadConfig (). TracingEnabled ) {
236236 offload_platform_get_info_size_params_t Params = {&Platform, &PropName,
237237 &PropSizeRet};
238238 std::cout << " (" << &Params << " )" ;
@@ -272,13 +272,13 @@ offloadDeviceGetCount_val(offload_platform_handle_t Platform,
272272}
273273OFFLOAD_APIEXPORT offload_result_t OFFLOAD_APICALL offloadDeviceGetCount (
274274 offload_platform_handle_t Platform, uint32_t *NumDevices) {
275- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
275+ if (offloadConfig (). TracingEnabled ) {
276276 std::cout << " ---> offloadDeviceGetCount" ;
277277 }
278278
279279 offload_result_t Result = offloadDeviceGetCount_val (Platform, NumDevices);
280280
281- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
281+ if (offloadConfig (). TracingEnabled ) {
282282 offload_device_get_count_params_t Params = {&Platform, &NumDevices};
283283 std::cout << " (" << &Params << " )" ;
284284 std::cout << " -> " << Result << " \n " ;
@@ -322,13 +322,13 @@ offload_impl_result_t offloadDeviceGet_val(offload_platform_handle_t Platform,
322322OFFLOAD_APIEXPORT offload_result_t OFFLOAD_APICALL
323323offloadDeviceGet (offload_platform_handle_t Platform, uint32_t NumEntries,
324324 offload_device_handle_t *Devices) {
325- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
325+ if (offloadConfig (). TracingEnabled ) {
326326 std::cout << " ---> offloadDeviceGet" ;
327327 }
328328
329329 offload_result_t Result = offloadDeviceGet_val (Platform, NumEntries, Devices);
330330
331- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
331+ if (offloadConfig (). TracingEnabled ) {
332332 offload_device_get_params_t Params = {&Platform, &NumEntries, &Devices};
333333 std::cout << " (" << &Params << " )" ;
334334 std::cout << " -> " << Result << " \n " ;
@@ -372,14 +372,14 @@ offload_impl_result_t offloadDeviceGetInfo_val(offload_device_handle_t Device,
372372OFFLOAD_APIEXPORT offload_result_t OFFLOAD_APICALL offloadDeviceGetInfo (
373373 offload_device_handle_t Device, offload_device_info_t PropName,
374374 size_t PropSize, void *PropValue) {
375- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
375+ if (offloadConfig (). TracingEnabled ) {
376376 std::cout << " ---> offloadDeviceGetInfo" ;
377377 }
378378
379379 offload_result_t Result =
380380 offloadDeviceGetInfo_val (Device, PropName, PropSize, PropValue);
381381
382- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
382+ if (offloadConfig (). TracingEnabled ) {
383383 offload_device_get_info_params_t Params = {&Device, &PropName, &PropSize,
384384 &PropValue};
385385 std::cout << " (" << &Params << " )" ;
@@ -421,14 +421,14 @@ offloadDeviceGetInfoSize_val(offload_device_handle_t Device,
421421OFFLOAD_APIEXPORT offload_result_t OFFLOAD_APICALL
422422offloadDeviceGetInfoSize (offload_device_handle_t Device,
423423 offload_device_info_t PropName, size_t *PropSizeRet) {
424- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
424+ if (offloadConfig (). TracingEnabled ) {
425425 std::cout << " ---> offloadDeviceGetInfoSize" ;
426426 }
427427
428428 offload_result_t Result =
429429 offloadDeviceGetInfoSize_val (Device, PropName, PropSizeRet);
430430
431- if (std::getenv ( " OFFLOAD_TRACE " ) ) {
431+ if (offloadConfig (). TracingEnabled ) {
432432 offload_device_get_info_size_params_t Params = {&Device, &PropName,
433433 &PropSizeRet};
434434 std::cout << " (" << &Params << " )" ;
0 commit comments