Loading src/Python/pytnl/tnl_indexing.h +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ void tnl_slice_indexing( Scope & scope ) if (!slice.compute(a.getSize(), &start, &stop, &step, &slicelength)) throw py::error_already_set(); if (slicelength != value.getSize()) if (slicelength != (size_t) value.getSize()) throw std::runtime_error("Left and right hand size of slice assignment have different sizes!"); for (size_t i = 0; i < slicelength; ++i) { Loading src/TNL/Containers/Algorithms/ArrayOperationsHost_impl.h +11 −0 Original line number Diff line number Diff line Loading @@ -101,7 +101,18 @@ copyMemory( DestinationElement* destination, if( std::is_same< DestinationElement, SourceElement >::value && ( std::is_fundamental< DestinationElement >::value || std::is_pointer< DestinationElement >::value ) ) { // GCC 8.1 complains that we bypass a non-trivial copy-constructor // (in C++17 we could use constexpr if to avoid compiling this branch in that case) #if defined(__GNUC__) && !defined(__clang__) && !defined(__NVCC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wclass-memaccess" #endif memcpy( destination, source, size * sizeof( DestinationElement ) ); #if defined(__GNUC__) && !defined(__clang__) && !defined(__NVCC__) #pragma GCC diagnostic pop #endif } else for( Index i = 0; i < size; i ++ ) destination[ i ] = ( DestinationElement ) source[ i ]; Loading src/TNL/SmartPointersRegister.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ void SmartPointersRegister::remove( SmartPointer* pointer, int deviceId ) try { pointersOnDevices.at( deviceId ).erase( pointer ); } catch( std::out_of_range ) { catch( const std::out_of_range& ) { std::cerr << "Given deviceId " << deviceId << " does not have any pointers yet. " << "Requested to remove pointer " << pointer << ". " << "This is most likely a bug in the smart pointer." << std::endl; Loading @@ -46,7 +46,7 @@ bool SmartPointersRegister::synchronizeDevice( int deviceId ) ( *it ).synchronize(); return TNL_CHECK_CUDA_DEVICE; } catch( std::out_of_range ) { catch( const std::out_of_range& ) { return false; } } Loading
src/Python/pytnl/tnl_indexing.h +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ void tnl_slice_indexing( Scope & scope ) if (!slice.compute(a.getSize(), &start, &stop, &step, &slicelength)) throw py::error_already_set(); if (slicelength != value.getSize()) if (slicelength != (size_t) value.getSize()) throw std::runtime_error("Left and right hand size of slice assignment have different sizes!"); for (size_t i = 0; i < slicelength; ++i) { Loading
src/TNL/Containers/Algorithms/ArrayOperationsHost_impl.h +11 −0 Original line number Diff line number Diff line Loading @@ -101,7 +101,18 @@ copyMemory( DestinationElement* destination, if( std::is_same< DestinationElement, SourceElement >::value && ( std::is_fundamental< DestinationElement >::value || std::is_pointer< DestinationElement >::value ) ) { // GCC 8.1 complains that we bypass a non-trivial copy-constructor // (in C++17 we could use constexpr if to avoid compiling this branch in that case) #if defined(__GNUC__) && !defined(__clang__) && !defined(__NVCC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wclass-memaccess" #endif memcpy( destination, source, size * sizeof( DestinationElement ) ); #if defined(__GNUC__) && !defined(__clang__) && !defined(__NVCC__) #pragma GCC diagnostic pop #endif } else for( Index i = 0; i < size; i ++ ) destination[ i ] = ( DestinationElement ) source[ i ]; Loading
src/TNL/SmartPointersRegister.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ void SmartPointersRegister::remove( SmartPointer* pointer, int deviceId ) try { pointersOnDevices.at( deviceId ).erase( pointer ); } catch( std::out_of_range ) { catch( const std::out_of_range& ) { std::cerr << "Given deviceId " << deviceId << " does not have any pointers yet. " << "Requested to remove pointer " << pointer << ". " << "This is most likely a bug in the smart pointer." << std::endl; Loading @@ -46,7 +46,7 @@ bool SmartPointersRegister::synchronizeDevice( int deviceId ) ( *it ).synchronize(); return TNL_CHECK_CUDA_DEVICE; } catch( std::out_of_range ) { catch( const std::out_of_range& ) { return false; } }