Skip to content

Commit

Permalink
Suppress NVCC attribute ignored warning on SIMD operators as hidden f…
Browse files Browse the repository at this point in the history
…riends
  • Loading branch information
dalg24 committed Aug 24, 2023
1 parent c740f55 commit 4cb688c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions simd/src/Kokkos_SIMD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@

#include <Kokkos_SIMD_Common.hpp>

// suppress NVCC warnings with the [[nodiscard]] attribute on overloaded
// operators implemented as hidden friends
#if defined(KOKKOS_COMPILER_NVCC) && KOKKOS_COMPILER_NVCC < 1130
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wattributes"
#endif

#include <Kokkos_SIMD_Scalar.hpp>

#ifdef KOKKOS_ARCH_AVX2
Expand All @@ -33,6 +40,10 @@
#include <Kokkos_SIMD_NEON.hpp>
#endif

#if defined(KOKKOS_COMPILER_NVCC) && KOKKOS_COMPILER_NVCC < 1130
#pragma GCC diagnostic pop
#endif

namespace Kokkos {
namespace Experimental {

Expand Down

0 comments on commit 4cb688c

Please sign in to comment.