Commit cd3db363 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Disabled useless nvcc warning in TypeTraits.h

parent 43793525
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON )
set( CMAKE_CXX_EXTENSIONS OFF )

# set Debug/Release options
set( CMAKE_CXX_FLAGS "-pthread -Wall -Wno-unused-local-typedefs -Wno-unused-variable" )
set( CMAKE_CXX_FLAGS "-pthread -Wall -Wno-unused-local-typedefs -Wno-unused-variable -Wno-unknown-pragmas" )
set( CMAKE_CXX_FLAGS_DEBUG "-g" )
set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=native -DNDEBUG" )
#set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -mtune=native -DNDEBUG -ftree-vectorizer-verbose=1 -ftree-vectorize -fopt-info-vec-missed -funroll-loops" )
+11 −1
Original line number Diff line number Diff line
@@ -98,9 +98,19 @@ template< typename T >
struct HasConstexprGetSizeMethod
{
private:
   // adapted from here: https://stackoverflow.com/a/50169108
   // implementation adopted from here: https://stackoverflow.com/a/50169108

// disable nvcc warning: invalid narrowing conversion from "unsigned int" to "int"
// (the implementation is based on the conversion)
#ifdef __NVCC__
   #pragma push
   #pragma diag_suppress 2361
#endif
   template< typename M, M method >
   static constexpr std::true_type is_constexpr_impl( decltype(int{((*method)(), 0U)}) );
#ifdef __NVCC__
   #pragma pop
#endif

   template< typename M, M method >
   static constexpr std::false_type is_constexpr_impl(...);