Loading src/TNL/Algorithms/Segments/BiEllpack.h +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ namespace TNL * \brief Go over all segments and perform a reduction in each of them. */ template <typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args> void segmentsReduction(IndexType first, IndexType last, Fetch &fetch, const Reduction &reduction, ResultKeeper &keeper, const Real &zero, Args... args) const; void reduceSegments(IndexType first, IndexType last, Fetch &fetch, const Reduction &reduction, ResultKeeper &keeper, const Real &zero, Args... args) const; template <typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args> void allReduction(Fetch &fetch, const Reduction &reduction, ResultKeeper &keeper, const Real &zero, Args... args) const; Loading src/TNL/Algorithms/Segments/BiEllpack.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -500,9 +500,9 @@ template< typename Device, template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: segmentsReduction( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const reduceSegments( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const { this->getConstView().segmentsReduction( first, last, fetch, reduction, keeper, zero, args... ); this->getConstView().reduceSegments( first, last, fetch, reduction, keeper, zero, args... ); } template< typename Device, Loading @@ -515,7 +515,7 @@ void BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: allReduction( Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const { this->segmentsReduction( 0, this->getSegmentsCount(), fetch, reduction, keeper, zero, args... ); this->reduceSegments( 0, this->getSegmentsCount(), fetch, reduction, keeper, zero, args... ); } template< typename Device, Loading src/TNL/Algorithms/Segments/BiEllpackView.h +5 −5 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ class BiEllpackView * \brief Go over all segments and perform a reduction in each of them. */ template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void segmentsReduction( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; void reduceSegments( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void allReduction( Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; Loading Loading @@ -162,7 +162,7 @@ class BiEllpackView int BlockDim, typename... Args > __device__ void segmentsReductionKernelWithAllParameters( IndexType gridIdx, void reduceSegmentsKernelWithAllParameters( IndexType gridIdx, IndexType first, IndexType last, Fetch fetch, Loading @@ -178,7 +178,7 @@ class BiEllpackView int BlockDim, typename... Args > __device__ void segmentsReductionKernel( IndexType gridIdx, void reduceSegmentsKernel( IndexType gridIdx, IndexType first, IndexType last, Fetch fetch, Loading @@ -196,7 +196,7 @@ class BiEllpackView int BlockDim, typename... Args_ > friend __global__ void BiEllpackSegmentsReductionKernel( View_ chunkedEllpack, void BiEllpackreduceSegmentsKernel( View_ chunkedEllpack, Index_ gridIdx, Index_ first, Index_ last, Loading @@ -207,7 +207,7 @@ class BiEllpackView Args_... args ); template< typename Index_, typename Fetch_, int BlockDim_, int WarpSize_, bool B_ > friend struct detail::BiEllpackSegmentsReductionDispatcher; friend struct details::BiEllpackreduceSegmentsDispatcher; #endif }; } // namespace Segments Loading src/TNL/Algorithms/Segments/BiEllpackView.hpp +5 −5 Original line number Diff line number Diff line Loading @@ -355,7 +355,7 @@ template< typename Device, template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void BiEllpackView< Device, Index, Organization, WarpSize >:: segmentsReduction( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const reduceSegments( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const { using RealType = typename detail::FetchLambdaAdapter< Index, Fetch >::ReturnType; if( this->getStorageSize() == 0 ) Loading Loading @@ -425,7 +425,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, const Reductio dim3 cudaGridSize = Cuda::getMaxGridSize(); if( gridIdx == cudaGrids - 1 ) cudaGridSize.x = cudaBlocks % Cuda::getMaxGridSize(); detail::BiEllpackSegmentsReductionKernel< ViewType, IndexType, Fetch, Reduction, ResultKeeper, Real, BlockDim, Args... > details::BiEllpackreduceSegmentsKernel< ViewType, IndexType, Fetch, Reduction, ResultKeeper, Real, BlockDim, Args... > <<< cudaGridSize, cudaBlockSize, sharedMemory >>> ( *this, gridIdx, first, last, fetch, reduction, keeper, zero, args... ); cudaThreadSynchronize(); Loading @@ -444,7 +444,7 @@ void BiEllpackView< Device, Index, Organization, WarpSize >:: allReduction( Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const { this->segmentsReduction( 0, this->getSegmentsCount(), fetch, reduction, keeper, zero, args... ); this->reduceSegments( 0, this->getSegmentsCount(), fetch, reduction, keeper, zero, args... ); } template< typename Device, Loading Loading @@ -518,7 +518,7 @@ template< typename Device, __device__ void BiEllpackView< Device, Index, Organization, WarpSize >:: segmentsReductionKernelWithAllParameters( IndexType gridIdx, reduceSegmentsKernelWithAllParameters( IndexType gridIdx, IndexType first, IndexType last, Fetch fetch, Loading Loading @@ -574,7 +574,7 @@ template< typename Device, __device__ void BiEllpackView< Device, Index, Organization, WarpSize >:: segmentsReductionKernel( IndexType gridIdx, reduceSegmentsKernel( IndexType gridIdx, IndexType first, IndexType last, Fetch fetch, Loading src/TNL/Algorithms/Segments/CSR.h +1 −1 Original line number Diff line number Diff line Loading @@ -124,7 +124,7 @@ class CSR * \brief Go over all segments and perform a reduction in each of them. */ template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void segmentsReduction( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; void reduceSegments( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void allReduction( Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; Loading Loading
src/TNL/Algorithms/Segments/BiEllpack.h +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ namespace TNL * \brief Go over all segments and perform a reduction in each of them. */ template <typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args> void segmentsReduction(IndexType first, IndexType last, Fetch &fetch, const Reduction &reduction, ResultKeeper &keeper, const Real &zero, Args... args) const; void reduceSegments(IndexType first, IndexType last, Fetch &fetch, const Reduction &reduction, ResultKeeper &keeper, const Real &zero, Args... args) const; template <typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args> void allReduction(Fetch &fetch, const Reduction &reduction, ResultKeeper &keeper, const Real &zero, Args... args) const; Loading
src/TNL/Algorithms/Segments/BiEllpack.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -500,9 +500,9 @@ template< typename Device, template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: segmentsReduction( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const reduceSegments( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const { this->getConstView().segmentsReduction( first, last, fetch, reduction, keeper, zero, args... ); this->getConstView().reduceSegments( first, last, fetch, reduction, keeper, zero, args... ); } template< typename Device, Loading @@ -515,7 +515,7 @@ void BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: allReduction( Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const { this->segmentsReduction( 0, this->getSegmentsCount(), fetch, reduction, keeper, zero, args... ); this->reduceSegments( 0, this->getSegmentsCount(), fetch, reduction, keeper, zero, args... ); } template< typename Device, Loading
src/TNL/Algorithms/Segments/BiEllpackView.h +5 −5 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ class BiEllpackView * \brief Go over all segments and perform a reduction in each of them. */ template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void segmentsReduction( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; void reduceSegments( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void allReduction( Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; Loading Loading @@ -162,7 +162,7 @@ class BiEllpackView int BlockDim, typename... Args > __device__ void segmentsReductionKernelWithAllParameters( IndexType gridIdx, void reduceSegmentsKernelWithAllParameters( IndexType gridIdx, IndexType first, IndexType last, Fetch fetch, Loading @@ -178,7 +178,7 @@ class BiEllpackView int BlockDim, typename... Args > __device__ void segmentsReductionKernel( IndexType gridIdx, void reduceSegmentsKernel( IndexType gridIdx, IndexType first, IndexType last, Fetch fetch, Loading @@ -196,7 +196,7 @@ class BiEllpackView int BlockDim, typename... Args_ > friend __global__ void BiEllpackSegmentsReductionKernel( View_ chunkedEllpack, void BiEllpackreduceSegmentsKernel( View_ chunkedEllpack, Index_ gridIdx, Index_ first, Index_ last, Loading @@ -207,7 +207,7 @@ class BiEllpackView Args_... args ); template< typename Index_, typename Fetch_, int BlockDim_, int WarpSize_, bool B_ > friend struct detail::BiEllpackSegmentsReductionDispatcher; friend struct details::BiEllpackreduceSegmentsDispatcher; #endif }; } // namespace Segments Loading
src/TNL/Algorithms/Segments/BiEllpackView.hpp +5 −5 Original line number Diff line number Diff line Loading @@ -355,7 +355,7 @@ template< typename Device, template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void BiEllpackView< Device, Index, Organization, WarpSize >:: segmentsReduction( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const reduceSegments( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const { using RealType = typename detail::FetchLambdaAdapter< Index, Fetch >::ReturnType; if( this->getStorageSize() == 0 ) Loading Loading @@ -425,7 +425,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, const Reductio dim3 cudaGridSize = Cuda::getMaxGridSize(); if( gridIdx == cudaGrids - 1 ) cudaGridSize.x = cudaBlocks % Cuda::getMaxGridSize(); detail::BiEllpackSegmentsReductionKernel< ViewType, IndexType, Fetch, Reduction, ResultKeeper, Real, BlockDim, Args... > details::BiEllpackreduceSegmentsKernel< ViewType, IndexType, Fetch, Reduction, ResultKeeper, Real, BlockDim, Args... > <<< cudaGridSize, cudaBlockSize, sharedMemory >>> ( *this, gridIdx, first, last, fetch, reduction, keeper, zero, args... ); cudaThreadSynchronize(); Loading @@ -444,7 +444,7 @@ void BiEllpackView< Device, Index, Organization, WarpSize >:: allReduction( Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const { this->segmentsReduction( 0, this->getSegmentsCount(), fetch, reduction, keeper, zero, args... ); this->reduceSegments( 0, this->getSegmentsCount(), fetch, reduction, keeper, zero, args... ); } template< typename Device, Loading Loading @@ -518,7 +518,7 @@ template< typename Device, __device__ void BiEllpackView< Device, Index, Organization, WarpSize >:: segmentsReductionKernelWithAllParameters( IndexType gridIdx, reduceSegmentsKernelWithAllParameters( IndexType gridIdx, IndexType first, IndexType last, Fetch fetch, Loading Loading @@ -574,7 +574,7 @@ template< typename Device, __device__ void BiEllpackView< Device, Index, Organization, WarpSize >:: segmentsReductionKernel( IndexType gridIdx, reduceSegmentsKernel( IndexType gridIdx, IndexType first, IndexType last, Fetch fetch, Loading
src/TNL/Algorithms/Segments/CSR.h +1 −1 Original line number Diff line number Diff line Loading @@ -124,7 +124,7 @@ class CSR * \brief Go over all segments and perform a reduction in each of them. */ template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void segmentsReduction( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; void reduceSegments( IndexType first, IndexType last, Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void allReduction( Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, const Real& zero, Args... args ) const; Loading