Loading src/TNL/Containers/ndarray/Executors.h +4 −4 Original line number Diff line number Diff line Loading @@ -224,7 +224,7 @@ struct ParallelExecutor< Permutation, Device, IndexTag< 3 > > void operator()( Index i2, Index i1, Index i0, Func f ) { call_with_unpermuted_arguments< Permutation >( f, i0, i1, i2 ); }; } }; // dummy specialization to avoid a shitpile of nvcc warnings Loading @@ -236,7 +236,7 @@ struct ParallelExecutor< Permutation, Device, IndexTag< 3 > > void operator()( Index i2, Index i1, Index i0, Func f ) { call_with_unpermuted_arguments< Permutation >( f, i0, i1, i2 ); }; } }; }; Loading Loading @@ -275,7 +275,7 @@ struct ParallelExecutor< Permutation, Device, IndexTag< 2 > > void operator()( Index i1, Index i0, Func f ) { call_with_unpermuted_arguments< Permutation >( f, i0, i1 ); }; } }; // dummy specialization to avoid a shitpile of nvcc warnings Loading @@ -287,7 +287,7 @@ struct ParallelExecutor< Permutation, Device, IndexTag< 2 > > void operator()( Index i1, Index i0, Func f ) { call_with_unpermuted_arguments< Permutation >( f, i0, i1 ); }; } }; }; Loading src/TNL/Containers/ndarray/Meta.h +8 −24 Original line number Diff line number Diff line Loading @@ -15,8 +15,6 @@ #include <utility> #include <initializer_list> #include <TNL/Devices/CudaCallable.h> namespace TNL { namespace Containers { namespace __ndarray_impl { Loading Loading @@ -170,8 +168,7 @@ struct CallPermutationHelper< Permutation, std::index_sequence< N... > > { template< typename Func, typename... Args > __cuda_callable__ static auto apply( Func&& f, Args&&... args ) -> decltype(auto) static constexpr auto apply( Func&& f, Args&&... args ) -> decltype(auto) { return std::forward< Func >( f )( get_from_pack< get< N >( Permutation{} ) Loading @@ -184,17 +181,11 @@ struct CallPermutationHelper< Permutation, std::index_sequence< N... > > template< typename Permutation, typename Func, typename... Args > __cuda_callable__ // FIXME: does not compile with nvcc 10.0 //auto call_with_permuted_arguments( Func&& f, Args&&... args ) -> decltype(auto) //{ // return CallPermutationHelper< Permutation, std::make_index_sequence< sizeof...( Args ) > > // ::apply( std::forward< Func >( f ), std::forward< Args >( args )... ); //} auto call_with_permuted_arguments( Func f, Args&&... args ) -> decltype(auto) constexpr auto call_with_permuted_arguments( Func&& f, Args&&... args ) -> decltype(auto) { return CallPermutationHelper< Permutation, std::make_index_sequence< sizeof...( Args ) > > ::apply( f, std::forward< Args >( args )... ); ::apply( std::forward< Func >( f ), std::forward< Args >( args )... ); } Loading @@ -209,8 +200,7 @@ struct CallInversePermutationHelper< Permutation, std::index_sequence< N... > > { template< typename Func, typename... Args > __cuda_callable__ static auto apply( Func&& f, Args&&... args ) -> decltype(auto) static constexpr auto apply( Func&& f, Args&&... args ) -> decltype(auto) { return std::forward< Func >( f )( get_from_pack< index_in_sequence( N, Permutation{} ) Loading @@ -223,17 +213,11 @@ struct CallInversePermutationHelper< Permutation, std::index_sequence< N... > > template< typename Permutation, typename Func, typename... Args > __cuda_callable__ // FIXME: does not compile with nvcc 10.0 //auto call_with_unpermuted_arguments( Func&& f, Args&&... args ) -> decltype(auto) //{ // return CallInversePermutationHelper< Permutation, std::make_index_sequence< sizeof...( Args ) > > // ::apply( std::forward< Func >( f ), std::forward< Args >( args )... ); //} auto call_with_unpermuted_arguments( Func f, Args&&... args ) -> decltype(auto) constexpr auto call_with_unpermuted_arguments( Func&& f, Args&&... args ) -> decltype(auto) { return CallInversePermutationHelper< Permutation, std::make_index_sequence< sizeof...( Args ) > > ::apply( f, std::forward< Args >( args )... ); ::apply( std::forward< Func >( f ), std::forward< Args >( args )... ); } Loading src/TNL/Containers/ndarray/SizesHolder.h +1 −1 Original line number Diff line number Diff line Loading @@ -350,7 +350,7 @@ struct LocalBeginsHolder : public SizesHolder if( SizesHolder::template getStaticSize< level >() == 0 ) SizesHolder::template setSize< level >( newSize ); else TNL_ASSERT_EQ( newSize, ConstValue, "Dynamic size for a static dimension must be equal to the specified ConstValue." ); TNL_ASSERT_EQ( newSize, (typename SizesHolder::IndexType) ConstValue, "Dynamic size for a static dimension must be equal to the specified ConstValue." ); } }; Loading Loading
src/TNL/Containers/ndarray/Executors.h +4 −4 Original line number Diff line number Diff line Loading @@ -224,7 +224,7 @@ struct ParallelExecutor< Permutation, Device, IndexTag< 3 > > void operator()( Index i2, Index i1, Index i0, Func f ) { call_with_unpermuted_arguments< Permutation >( f, i0, i1, i2 ); }; } }; // dummy specialization to avoid a shitpile of nvcc warnings Loading @@ -236,7 +236,7 @@ struct ParallelExecutor< Permutation, Device, IndexTag< 3 > > void operator()( Index i2, Index i1, Index i0, Func f ) { call_with_unpermuted_arguments< Permutation >( f, i0, i1, i2 ); }; } }; }; Loading Loading @@ -275,7 +275,7 @@ struct ParallelExecutor< Permutation, Device, IndexTag< 2 > > void operator()( Index i1, Index i0, Func f ) { call_with_unpermuted_arguments< Permutation >( f, i0, i1 ); }; } }; // dummy specialization to avoid a shitpile of nvcc warnings Loading @@ -287,7 +287,7 @@ struct ParallelExecutor< Permutation, Device, IndexTag< 2 > > void operator()( Index i1, Index i0, Func f ) { call_with_unpermuted_arguments< Permutation >( f, i0, i1 ); }; } }; }; Loading
src/TNL/Containers/ndarray/Meta.h +8 −24 Original line number Diff line number Diff line Loading @@ -15,8 +15,6 @@ #include <utility> #include <initializer_list> #include <TNL/Devices/CudaCallable.h> namespace TNL { namespace Containers { namespace __ndarray_impl { Loading Loading @@ -170,8 +168,7 @@ struct CallPermutationHelper< Permutation, std::index_sequence< N... > > { template< typename Func, typename... Args > __cuda_callable__ static auto apply( Func&& f, Args&&... args ) -> decltype(auto) static constexpr auto apply( Func&& f, Args&&... args ) -> decltype(auto) { return std::forward< Func >( f )( get_from_pack< get< N >( Permutation{} ) Loading @@ -184,17 +181,11 @@ struct CallPermutationHelper< Permutation, std::index_sequence< N... > > template< typename Permutation, typename Func, typename... Args > __cuda_callable__ // FIXME: does not compile with nvcc 10.0 //auto call_with_permuted_arguments( Func&& f, Args&&... args ) -> decltype(auto) //{ // return CallPermutationHelper< Permutation, std::make_index_sequence< sizeof...( Args ) > > // ::apply( std::forward< Func >( f ), std::forward< Args >( args )... ); //} auto call_with_permuted_arguments( Func f, Args&&... args ) -> decltype(auto) constexpr auto call_with_permuted_arguments( Func&& f, Args&&... args ) -> decltype(auto) { return CallPermutationHelper< Permutation, std::make_index_sequence< sizeof...( Args ) > > ::apply( f, std::forward< Args >( args )... ); ::apply( std::forward< Func >( f ), std::forward< Args >( args )... ); } Loading @@ -209,8 +200,7 @@ struct CallInversePermutationHelper< Permutation, std::index_sequence< N... > > { template< typename Func, typename... Args > __cuda_callable__ static auto apply( Func&& f, Args&&... args ) -> decltype(auto) static constexpr auto apply( Func&& f, Args&&... args ) -> decltype(auto) { return std::forward< Func >( f )( get_from_pack< index_in_sequence( N, Permutation{} ) Loading @@ -223,17 +213,11 @@ struct CallInversePermutationHelper< Permutation, std::index_sequence< N... > > template< typename Permutation, typename Func, typename... Args > __cuda_callable__ // FIXME: does not compile with nvcc 10.0 //auto call_with_unpermuted_arguments( Func&& f, Args&&... args ) -> decltype(auto) //{ // return CallInversePermutationHelper< Permutation, std::make_index_sequence< sizeof...( Args ) > > // ::apply( std::forward< Func >( f ), std::forward< Args >( args )... ); //} auto call_with_unpermuted_arguments( Func f, Args&&... args ) -> decltype(auto) constexpr auto call_with_unpermuted_arguments( Func&& f, Args&&... args ) -> decltype(auto) { return CallInversePermutationHelper< Permutation, std::make_index_sequence< sizeof...( Args ) > > ::apply( f, std::forward< Args >( args )... ); ::apply( std::forward< Func >( f ), std::forward< Args >( args )... ); } Loading
src/TNL/Containers/ndarray/SizesHolder.h +1 −1 Original line number Diff line number Diff line Loading @@ -350,7 +350,7 @@ struct LocalBeginsHolder : public SizesHolder if( SizesHolder::template getStaticSize< level >() == 0 ) SizesHolder::template setSize< level >( newSize ); else TNL_ASSERT_EQ( newSize, ConstValue, "Dynamic size for a static dimension must be equal to the specified ConstValue." ); TNL_ASSERT_EQ( newSize, (typename SizesHolder::IndexType) ConstValue, "Dynamic size for a static dimension must be equal to the specified ConstValue." ); } }; Loading