mirror of
https://github.com/google/benchmark.git
synced 2024-12-27 13:00:36 +08:00
Avoid deprecation warning in NVHPC (#1459)
* Avoid deprecation warning in NVHPC * Use more general NVCC identification macro
This commit is contained in:
parent
974cd5a5c5
commit
a476d0fd8e
@ -231,7 +231,7 @@ BENCHMARK(BM_test)->Unit(benchmark::kMillisecond);
|
||||
#define BENCHMARK_INTERNAL_TOSTRING(x) BENCHMARK_INTERNAL_TOSTRING2(x)
|
||||
|
||||
// clang-format off
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#if defined(__GNUC__) && !defined(__NVCC__) || defined(__clang__)
|
||||
#define BENCHMARK_BUILTIN_EXPECT(x, y) __builtin_expect(x, y)
|
||||
#define BENCHMARK_DEPRECATED_MSG(msg) __attribute__((deprecated(msg)))
|
||||
#define BENCHMARK_DISABLE_DEPRECATED_WARNING \
|
||||
|
@ -182,7 +182,7 @@ State::State(IterationCount max_iters, const std::vector<int64_t>& ranges,
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
|
||||
#endif
|
||||
#if defined(__CUDACC__)
|
||||
#if defined(__NVCC__)
|
||||
#pragma nv_diagnostic push
|
||||
#pragma nv_diag_suppress 1427
|
||||
#endif
|
||||
@ -196,7 +196,7 @@ State::State(IterationCount max_iters, const std::vector<int64_t>& ranges,
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#if defined(__CUDACC__)
|
||||
#if defined(__NVCC__)
|
||||
#pragma nv_diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user