Suppress nvcc `offsetof` warning (#1429)

* Suppress nvcc offsetof warning

* Update AUTHORS and CONTRIBUTORS
This commit is contained in:
Cezary Skrzyński 2022-07-15 13:18:45 +02:00 committed by GitHub
parent 1531ee0d63
commit 4efcc47461
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View File

@ -13,6 +13,7 @@ Alex Steele <steeleal123@gmail.com>
Andriy Berestovskyy <berestovskyy@gmail.com>
Arne Beer <arne@twobeer.de>
Carto
Cezary Skrzyński <czars1988@gmail.com>
Christian Wassermann <christian_wassermann@web.de>
Christopher Seymour <chris.j.seymour@hotmail.com>
Colin Braley <braley.colin@gmail.com>

View File

@ -29,6 +29,7 @@ Andriy Berestovskyy <berestovskyy@gmail.com>
Arne Beer <arne@twobeer.de>
Bátor Tallér <bator.taller@shapr3d.com>
Billy Robert O'Neal III <billy.oneal@gmail.com> <bion@microsoft.com>
Cezary Skrzyński <czars1988@gmail.com>
Chris Kennelly <ckennelly@google.com> <ckennelly@ckennelly.com>
Christian Wassermann <christian_wassermann@web.de>
Christopher Seymour <chris.j.seymour@hotmail.com>

View File

@ -177,6 +177,10 @@ State::State(IterationCount max_iters, const std::vector<int64_t>& ranges,
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#endif
#if defined(__CUDACC__)
#pragma nv_diagnostic push
#pragma nv_diag_suppress 1427
#endif
// Offset tests to ensure commonly accessed data is on the first cache line.
const int cache_line_size = 64;
@ -188,6 +192,9 @@ State::State(IterationCount max_iters, const std::vector<int64_t>& ranges,
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
#if defined(__CUDACC__)
#pragma nv_diagnostic pop
#endif
}
void State::PauseTiming() {