Loading CMakeLists.txt +5 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,11 @@ if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized" ) endif() # disable false Clang warning: https://stackoverflow.com/q/57645872 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-self-assign-overloaded" ) endif() # enable link time optimizations (but not in continuous integration) if( NOT DEFINED ENV{CI_JOB_NAME} ) if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" ) Loading src/TNL/Assert.h +16 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,14 @@ * Implemented by: Jakub Klinkovsky */ // wrapper for nvcc pragma which disables warnings about __host__ __device__ // functions: https://stackoverflow.com/q/55481202 #ifdef __NVCC__ #define TNL_NVCC_HD_WARNING_DISABLE #pragma hd_warning_disable #else #define TNL_NVCC_HD_WARNING_DISABLE #endif #if defined(NDEBUG) || defined(HAVE_MIC) // empty macros for optimized build Loading Loading @@ -280,6 +288,7 @@ cmpHelperOpFailure( const char* assertion, fatalFailure(); } TNL_NVCC_HD_WARNING_DISABLE template< typename T1, typename T2 > __cuda_callable__ void cmpHelperTrue( const char* assertion, Loading @@ -298,6 +307,7 @@ cmpHelperTrue( const char* assertion, expr1, "true", val1, true, "==" ); } TNL_NVCC_HD_WARNING_DISABLE template< typename T1, typename T2 > __cuda_callable__ void cmpHelperFalse( const char* assertion, Loading Loading @@ -336,16 +346,22 @@ cmpHelper##op_name( const char* assertion, \ } // Implements the helper function for TNL_ASSERT_EQ TNL_NVCC_HD_WARNING_DISABLE TNL_IMPL_CMP_HELPER_( EQ, == ); // Implements the helper function for TNL_ASSERT_NE TNL_NVCC_HD_WARNING_DISABLE TNL_IMPL_CMP_HELPER_( NE, != ); // Implements the helper function for TNL_ASSERT_LE TNL_NVCC_HD_WARNING_DISABLE TNL_IMPL_CMP_HELPER_( LE, <= ); // Implements the helper function for TNL_ASSERT_LT TNL_NVCC_HD_WARNING_DISABLE TNL_IMPL_CMP_HELPER_( LT, < ); // Implements the helper function for TNL_ASSERT_GE TNL_NVCC_HD_WARNING_DISABLE TNL_IMPL_CMP_HELPER_( GE, >= ); // Implements the helper function for TNL_ASSERT_GT TNL_NVCC_HD_WARNING_DISABLE TNL_IMPL_CMP_HELPER_( GT, > ); #undef TNL_IMPL_CMP_HELPER_ Loading src/TNL/Containers/NDArrayView.h +5 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ public: // Copy-assignment does deep copy, just like regular array, but the sizes // must match (i.e. copy-assignment cannot resize). TNL_NVCC_HD_WARNING_DISABLE __cuda_callable__ NDArrayView& operator=( const NDArrayView& other ) { Loading @@ -79,7 +80,9 @@ public: } // Templated copy-assignment TNL_NVCC_HD_WARNING_DISABLE template< typename OtherView > __cuda_callable__ NDArrayView& operator=( const OtherView& other ) { static_assert( std::is_same< PermutationType, typename OtherView::PermutationType >::value, Loading Loading @@ -128,6 +131,7 @@ public: array = nullptr; } TNL_NVCC_HD_WARNING_DISABLE __cuda_callable__ bool operator==( const NDArrayView& other ) const { Loading @@ -137,6 +141,7 @@ public: return Algorithms::ArrayOperations< Device, Device >::compare( array, other.array, getStorageSize() ); } TNL_NVCC_HD_WARNING_DISABLE __cuda_callable__ bool operator!=( const NDArrayView& other ) const { Loading src/TNL/Containers/Subrange.h +2 −0 Original line number Diff line number Diff line Loading @@ -105,12 +105,14 @@ public: return i + begin; } __cuda_callable__ bool operator==( const Subrange& other ) const { return begin == other.begin && end == other.end; } __cuda_callable__ bool operator!=( const Subrange& other ) const { return ! (*this == other); Loading src/TNL/Images/DicomImageInfo_impl.h +3 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ inline DicomImageInfo::DicomImageInfo( DicomHeader& dicomHeader ) : dicomHeader( dicomHeader ) { isObjectRetrieved = false; width = 0; height = 0; depth = 0; } Loading Loading
CMakeLists.txt +5 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,11 @@ if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized" ) endif() # disable false Clang warning: https://stackoverflow.com/q/57645872 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-self-assign-overloaded" ) endif() # enable link time optimizations (but not in continuous integration) if( NOT DEFINED ENV{CI_JOB_NAME} ) if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" ) Loading
src/TNL/Assert.h +16 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,14 @@ * Implemented by: Jakub Klinkovsky */ // wrapper for nvcc pragma which disables warnings about __host__ __device__ // functions: https://stackoverflow.com/q/55481202 #ifdef __NVCC__ #define TNL_NVCC_HD_WARNING_DISABLE #pragma hd_warning_disable #else #define TNL_NVCC_HD_WARNING_DISABLE #endif #if defined(NDEBUG) || defined(HAVE_MIC) // empty macros for optimized build Loading Loading @@ -280,6 +288,7 @@ cmpHelperOpFailure( const char* assertion, fatalFailure(); } TNL_NVCC_HD_WARNING_DISABLE template< typename T1, typename T2 > __cuda_callable__ void cmpHelperTrue( const char* assertion, Loading @@ -298,6 +307,7 @@ cmpHelperTrue( const char* assertion, expr1, "true", val1, true, "==" ); } TNL_NVCC_HD_WARNING_DISABLE template< typename T1, typename T2 > __cuda_callable__ void cmpHelperFalse( const char* assertion, Loading Loading @@ -336,16 +346,22 @@ cmpHelper##op_name( const char* assertion, \ } // Implements the helper function for TNL_ASSERT_EQ TNL_NVCC_HD_WARNING_DISABLE TNL_IMPL_CMP_HELPER_( EQ, == ); // Implements the helper function for TNL_ASSERT_NE TNL_NVCC_HD_WARNING_DISABLE TNL_IMPL_CMP_HELPER_( NE, != ); // Implements the helper function for TNL_ASSERT_LE TNL_NVCC_HD_WARNING_DISABLE TNL_IMPL_CMP_HELPER_( LE, <= ); // Implements the helper function for TNL_ASSERT_LT TNL_NVCC_HD_WARNING_DISABLE TNL_IMPL_CMP_HELPER_( LT, < ); // Implements the helper function for TNL_ASSERT_GE TNL_NVCC_HD_WARNING_DISABLE TNL_IMPL_CMP_HELPER_( GE, >= ); // Implements the helper function for TNL_ASSERT_GT TNL_NVCC_HD_WARNING_DISABLE TNL_IMPL_CMP_HELPER_( GT, > ); #undef TNL_IMPL_CMP_HELPER_ Loading
src/TNL/Containers/NDArrayView.h +5 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ public: // Copy-assignment does deep copy, just like regular array, but the sizes // must match (i.e. copy-assignment cannot resize). TNL_NVCC_HD_WARNING_DISABLE __cuda_callable__ NDArrayView& operator=( const NDArrayView& other ) { Loading @@ -79,7 +80,9 @@ public: } // Templated copy-assignment TNL_NVCC_HD_WARNING_DISABLE template< typename OtherView > __cuda_callable__ NDArrayView& operator=( const OtherView& other ) { static_assert( std::is_same< PermutationType, typename OtherView::PermutationType >::value, Loading Loading @@ -128,6 +131,7 @@ public: array = nullptr; } TNL_NVCC_HD_WARNING_DISABLE __cuda_callable__ bool operator==( const NDArrayView& other ) const { Loading @@ -137,6 +141,7 @@ public: return Algorithms::ArrayOperations< Device, Device >::compare( array, other.array, getStorageSize() ); } TNL_NVCC_HD_WARNING_DISABLE __cuda_callable__ bool operator!=( const NDArrayView& other ) const { Loading
src/TNL/Containers/Subrange.h +2 −0 Original line number Diff line number Diff line Loading @@ -105,12 +105,14 @@ public: return i + begin; } __cuda_callable__ bool operator==( const Subrange& other ) const { return begin == other.begin && end == other.end; } __cuda_callable__ bool operator!=( const Subrange& other ) const { return ! (*this == other); Loading
src/TNL/Images/DicomImageInfo_impl.h +3 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ inline DicomImageInfo::DicomImageInfo( DicomHeader& dicomHeader ) : dicomHeader( dicomHeader ) { isObjectRetrieved = false; width = 0; height = 0; depth = 0; } Loading