Loading src/TNL/Containers/Algorithms/ArrayOperationsCuda_impl.h +2 −14 Original line number Diff line number Diff line Loading @@ -200,15 +200,11 @@ compareMemory( const Element1* destination, { TNL_ASSERT_TRUE( destination, "Attempted to compare data through a nullptr." ); TNL_ASSERT_TRUE( source, "Attempted to compare data through a nullptr." ); #ifdef HAVE_CUDA //TODO: The parallel reduction on the CUDA device with different element types is needed. bool result = false; Algorithms::ParallelReductionEqualities< Element1, Element2 > reductionEqualities; Reduction< Devices::Cuda >::reduce( reductionEqualities, size, destination, source, result ); return result; #else throw Exceptions::CudaSupportMissing(); #endif } template< typename Element, Loading @@ -221,16 +217,12 @@ containsValue( const Element* data, { TNL_ASSERT_TRUE( data, "Attempted to check data through a nullptr." ); TNL_ASSERT_GE( size, 0, "" ); #ifdef HAVE_CUDA if( size == 0 ) return false; bool result = false; Algorithms::ParallelReductionContainsValue< Element > reductionContainsValue; reductionContainsValue.setValue( value ); Reduction< Devices::Cuda >::reduce( reductionContainsValue, size, data, 0, result ); return result; #else throw Exceptions::CudaSupportMissing(); #endif } template< typename Element, Loading @@ -243,16 +235,12 @@ containsOnlyValue( const Element* data, { TNL_ASSERT_TRUE( data, "Attempted to check data through a nullptr." ); TNL_ASSERT_GE( size, 0, "" ); #ifdef HAVE_CUDA if( size == 0 ) return false; bool result = false; Algorithms::ParallelReductionContainsOnlyValue< Element > reductionContainsOnlyValue; reductionContainsOnlyValue.setValue( value ); Reduction< Devices::Cuda >::reduce( reductionContainsOnlyValue, size, data, 0, result ); return result; #else throw Exceptions::CudaSupportMissing(); #endif } Loading Loading
src/TNL/Containers/Algorithms/ArrayOperationsCuda_impl.h +2 −14 Original line number Diff line number Diff line Loading @@ -200,15 +200,11 @@ compareMemory( const Element1* destination, { TNL_ASSERT_TRUE( destination, "Attempted to compare data through a nullptr." ); TNL_ASSERT_TRUE( source, "Attempted to compare data through a nullptr." ); #ifdef HAVE_CUDA //TODO: The parallel reduction on the CUDA device with different element types is needed. bool result = false; Algorithms::ParallelReductionEqualities< Element1, Element2 > reductionEqualities; Reduction< Devices::Cuda >::reduce( reductionEqualities, size, destination, source, result ); return result; #else throw Exceptions::CudaSupportMissing(); #endif } template< typename Element, Loading @@ -221,16 +217,12 @@ containsValue( const Element* data, { TNL_ASSERT_TRUE( data, "Attempted to check data through a nullptr." ); TNL_ASSERT_GE( size, 0, "" ); #ifdef HAVE_CUDA if( size == 0 ) return false; bool result = false; Algorithms::ParallelReductionContainsValue< Element > reductionContainsValue; reductionContainsValue.setValue( value ); Reduction< Devices::Cuda >::reduce( reductionContainsValue, size, data, 0, result ); return result; #else throw Exceptions::CudaSupportMissing(); #endif } template< typename Element, Loading @@ -243,16 +235,12 @@ containsOnlyValue( const Element* data, { TNL_ASSERT_TRUE( data, "Attempted to check data through a nullptr." ); TNL_ASSERT_GE( size, 0, "" ); #ifdef HAVE_CUDA if( size == 0 ) return false; bool result = false; Algorithms::ParallelReductionContainsOnlyValue< Element > reductionContainsOnlyValue; reductionContainsOnlyValue.setValue( value ); Reduction< Devices::Cuda >::reduce( reductionContainsOnlyValue, size, data, 0, result ); return result; #else throw Exceptions::CudaSupportMissing(); #endif } Loading