Skip to content

Commit

Permalink
Avoid unused const variable/verbose_print warning
Browse files Browse the repository at this point in the history
* Almost false positive aka incorrect warning.
* Shall be fixed regardless.
  • Loading branch information
hfp committed Mar 13, 2024
1 parent 46c43ed commit 41d9954
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/acc/cuda_hip/acc_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <math.h>

// for debug purpose
#if defined(__HIP_PLATFORM_NVCC__)
static const int verbose_print = 1;
#if defined(__HIP_PLATFORM_NVCC__) && !defined(ACC_DEV_PRINT_VERBOSE) && 0
# define ACC_DEV_PRINT_VERBOSE
#endif

/****************************************************************************/
Expand All @@ -49,10 +49,8 @@ extern "C" int c_dbcsr_acc_set_active_device(int device_id) {
// establish context
ACC_API_CALL(Free, (0));

#if defined(__HIP_PLATFORM_NVCC__)
if (verbose_print) {
ACC_API_CALL(DeviceSetLimit, (ACC(LimitPrintfFifoSize), (size_t)1000000000));
}
#if defined(__HIP_PLATFORM_NVCC__) && defined(ACC_DEV_PRINT_VERBOSE)
ACC_API_CALL(DeviceSetLimit, (ACC(LimitPrintfFifoSize), (size_t)1000000000));
#endif

return 0;
Expand Down

0 comments on commit 41d9954

Please sign in to comment.