Loading Documentation/Examples/Matrices/CMakeLists.txt +11 −4 Original line number Diff line number Diff line Loading @@ -64,6 +64,11 @@ IF( BUILD_CUDA ) ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/DenseMatrixExample_forAllRows.out OUTPUT DenseMatrixExample_forAllRows.out ) CUDA_ADD_EXECUTABLE( DenseMatrixViewExample_constructor_cuda DenseMatrixViewExample_constructor.cu ) ADD_CUSTOM_COMMAND( COMMAND DenseMatrixViewExample_constructor_cuda > ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/DenseMatrixViewExample_constructor.out OUTPUT DenseMatrixViewExample_constructor.out ) ELSE() ADD_EXECUTABLE( DenseMatrixExample_Constructor_init_list DenseMatrixExample_Constructor_init_list.cpp ) ADD_CUSTOM_COMMAND( COMMAND DenseMatrixExample_Constructor_init_list > Loading Loading @@ -130,11 +135,12 @@ ELSE() ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/DenseMatrixExample_forAllRows.out OUTPUT DenseMatrixExample_forAllRows.out ) ENDIF() ADD_EXECUTABLE( DenseMatrixViewExample_constructor DenseMatrixViewExample_constructor.cpp ) ADD_CUSTOM_COMMAND( COMMAND DenseMatrixViewExample_constructor > ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/DenseMatrixViewExample_constructor.out OUTPUT DenseMatrixViewExample_constructor.out ) ENDIF() ADD_CUSTOM_TARGET( RunMatricesExamples ALL DEPENDS DenseMatrixExample_Constructor_init_list.out Loading @@ -150,5 +156,6 @@ ADD_CUSTOM_TARGET( RunMatricesExamples ALL DEPENDS DenseMatrixExample_allRowsReduction.out DenseMatrixExample_forRows.out DenseMatrixExample_forAllRows.out DenseMatrixViewExample_constructor.out ) src/TNL/Containers/Segments/BiEllpack.h +9 −9 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ namespace TNL { template< typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, bool RowMajorOrder = std::is_same< Device, Devices::Host >::value, ElementsOrganization Organization = Containers::Segments::DefaultElementsOrganization< Device >::getOrganization(), int WarpSize = 32 > class BiEllpack { Loading @@ -31,12 +31,12 @@ class BiEllpack using DeviceType = Device; using IndexType = std::remove_const_t< Index >; using OffsetsHolder = Containers::Vector< Index, DeviceType, IndexType, IndexAllocator >; static constexpr bool getRowMajorOrder() { return RowMajorOrder; } using ViewType = BiEllpackView< Device, Index, RowMajorOrder >; static constexpr bool getOrganization() { return Organization; } using ViewType = BiEllpackView< Device, Index, Organization >; template< typename Device_, typename Index_ > using ViewTemplate = BiEllpackView< Device_, Index_, RowMajorOrder >; using ConstViewType = BiEllpackView< Device, std::add_const_t< IndexType >, RowMajorOrder >; using SegmentViewType = BiEllpackSegmentView< IndexType, RowMajorOrder >; using ViewTemplate = BiEllpackView< Device_, Index_, Organization >; using ConstViewType = BiEllpackView< Device, std::add_const_t< IndexType >, Organization >; using SegmentViewType = BiEllpackSegmentView< IndexType, Organization >; BiEllpack() = default; Loading Loading @@ -109,8 +109,8 @@ class BiEllpack BiEllpack& operator=( const BiEllpack& source ) = default; template< typename Device_, typename Index_, typename IndexAllocator_, bool RowMajorOrder_ > BiEllpack& operator=( const BiEllpack< Device_, Index_, IndexAllocator_, RowMajorOrder_, WarpSize >& source ); template< typename Device_, typename Index_, typename IndexAllocator_, ElementsOrganization Organization_ > BiEllpack& operator=( const BiEllpack< Device_, Index_, IndexAllocator_, Organization_, WarpSize >& source ); void save( File& file ) const; Loading Loading @@ -163,7 +163,7 @@ class BiEllpack return 0; }; template< typename Device_, typename Index_, typename IndexAllocator_, bool RowMajorOrder_, int WarpSize_ > template< typename Device_, typename Index_, typename IndexAllocator_, ElementsOrganization Organization_, int WarpSize_ > friend class BiEllpack; }; Loading src/TNL/Containers/Segments/BiEllpack.hpp +67 −67 Original line number Diff line number Diff line Loading @@ -23,9 +23,9 @@ namespace TNL { template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: BiEllpack( const Vector< IndexType, DeviceType, IndexType >& sizes ) { this->setSegmentsSizes( sizes ); Loading @@ -34,9 +34,9 @@ BiEllpack( const Vector< IndexType, DeviceType, IndexType >& sizes ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: BiEllpack( const BiEllpack& biEllpack ) : size( biEllpack.size ), storageSize( biEllpack.storageSize ), Loading @@ -49,9 +49,9 @@ BiEllpack( const BiEllpack& biEllpack ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: BiEllpack( const BiEllpack&& biEllpack ) : size( biEllpack.size ), storageSize( biEllpack.storageSize ), Loading @@ -64,10 +64,10 @@ BiEllpack( const BiEllpack&& biEllpack ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > String BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getSerializationType() { return "BiEllpack< [any_device], " + TNL::getSerializationType< IndexType >() + " >"; Loading @@ -76,10 +76,10 @@ getSerializationType() template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > String BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getSegmentsType() { return ViewType::getSegmentsType(); Loading @@ -88,10 +88,10 @@ getSegmentsType() template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > typename BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >::ViewType BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: typename BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >::ViewType BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getView() { return ViewType( size, storageSize, virtualRows, rowPermArray.getView(), groupPointers.getView() ); Loading @@ -100,9 +100,9 @@ getView() template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getConstView() const -> const ConstViewType { return ConstViewType( size, storageSize, virtualRows, rowPermArray.getConstView(), groupPointers.getConstView() ); Loading @@ -111,9 +111,9 @@ getConstView() const -> const ConstViewType template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getSegmentsCount() const -> IndexType { return this->size; Loading @@ -122,10 +122,10 @@ getSegmentsCount() const -> IndexType template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename SizesHolder > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: void BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: performRowBubbleSort( const SizesHolder& segmentsSizes ) { if( segmentsSizes.getSize() == 0 ) Loading Loading @@ -190,10 +190,10 @@ performRowBubbleSort( const SizesHolder& segmentsSizes ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename SizesHolder > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: void BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: computeColumnSizes( const SizesHolder& segmentsSizes ) { IndexType numberOfStrips = this->virtualRows / getWarpSize(); Loading Loading @@ -237,10 +237,10 @@ computeColumnSizes( const SizesHolder& segmentsSizes ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename SizesHolder > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: void BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: verifyRowPerm( const SizesHolder& segmentsSizes ) { bool ok = true; Loading Loading @@ -284,10 +284,10 @@ verifyRowPerm( const SizesHolder& segmentsSizes ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename SizesHolder > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: void BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: verifyRowLengths( const SizesHolder& segmentsSizes ) { bool ok = true; Loading @@ -300,7 +300,7 @@ verifyRowLengths( const SizesHolder& segmentsSizes ) const IndexType begin = this->groupPointers.getElement( groupBegin ) * getWarpSize() + rowStripPerm * stripLength; IndexType elementPtr = begin; IndexType rowLength = 0; const IndexType groupsCount = details::BiEllpack< Index, Device, RowMajorOrder, WarpSize >::getActiveGroupsCount( this->rowPermArray.getConstView(), segmentIdx ); const IndexType groupsCount = details::BiEllpack< Index, Device, Organization, WarpSize >::getActiveGroupsCount( this->rowPermArray.getConstView(), segmentIdx ); for( IndexType group = 0; group < groupsCount; group++ ) { for( IndexType i = 0; i < this->getGroupLength( strip, group ); i++ ) Loading @@ -324,11 +324,11 @@ verifyRowLengths( const SizesHolder& segmentsSizes ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename SizesHolder > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: setSegmentsSizes( const SizesHolder& segmentsSizes ) { if( std::is_same< DeviceType, Devices::Host >::value ) Loading @@ -354,7 +354,7 @@ setSegmentsSizes( const SizesHolder& segmentsSizes ) } else { BiEllpack< Devices::Host, Index, typename Allocators::Default< Devices::Host >::template Allocator< IndexType >, RowMajorOrder > hostSegments; BiEllpack< Devices::Host, Index, typename Allocators::Default< Devices::Host >::template Allocator< IndexType >, Organization > hostSegments; Containers::Vector< IndexType, Devices::Host, IndexType > hostSegmentsSizes; hostSegmentsSizes = segmentsSizes; hostSegments.setSegmentsSizes( hostSegmentsSizes ); Loading @@ -365,10 +365,10 @@ setSegmentsSizes( const SizesHolder& segmentsSizes ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: reset() { this->size = 0; Loading @@ -381,12 +381,12 @@ reset() template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getSegmentSize( const IndexType segmentIdx ) const -> IndexType { return details::BiEllpack< IndexType, DeviceType, RowMajorOrder >::getSegmentSize( return details::BiEllpack< IndexType, DeviceType, Organization >::getSegmentSize( rowPermArray.getConstView(), groupPointers.getConstView(), segmentIdx ); Loading @@ -395,9 +395,9 @@ getSegmentSize( const IndexType segmentIdx ) const -> IndexType template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getSize() const -> IndexType { return this->size; Loading @@ -406,9 +406,9 @@ getSize() const -> IndexType template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getStorageSize() const -> IndexType { return this->storageSize; Loading @@ -417,12 +417,12 @@ getStorageSize() const -> IndexType template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getGlobalIndex( const IndexType segmentIdx, const IndexType localIdx ) const -> IndexType { return details::BiEllpack< IndexType, DeviceType, RowMajorOrder >::getGlobalIndex( return details::BiEllpack< IndexType, DeviceType, Organization >::getGlobalIndex( rowPermArray.getConstView(), groupPointers.getConstView(), segmentIdx, Loading @@ -432,9 +432,9 @@ getGlobalIndex( const IndexType segmentIdx, const IndexType localIdx ) const -> template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getSegmentView( const IndexType segmentIdx ) const -> SegmentViewType { } Loading @@ -442,11 +442,11 @@ getSegmentView( const IndexType segmentIdx ) const -> SegmentViewType template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename Function, typename... Args > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: forSegments( IndexType first, IndexType last, Function& f, Args... args ) const { this->getConstView().forSegments( first, last, f, args... ); Loading @@ -455,11 +455,11 @@ forSegments( IndexType first, IndexType last, Function& f, Args... args ) const template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename Function, typename... Args > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: forAll( Function& f, Args... args ) const { this->forSegments( 0, this->getSegmentsCount(), f, args... ); Loading @@ -468,11 +468,11 @@ forAll( Function& f, Args... args ) const template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: segmentsReduction( 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... ); Loading @@ -481,11 +481,11 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, const Reductio template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: 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... ); Loading @@ -494,12 +494,12 @@ allReduction( Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, co template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename Device_, typename Index_, typename IndexAllocator_, bool RowMajorOrder_ > BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >& BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: operator=( const BiEllpack< Device_, Index_, IndexAllocator_, RowMajorOrder_, WarpSize >& source ) template< typename Device_, typename Index_, typename IndexAllocator_, ElementsOrganization Organization_ > BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >& BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: operator=( const BiEllpack< Device_, Index_, IndexAllocator_, Organization_, WarpSize >& source ) { this->size = source.size; this->storageSize = source.storageSize; Loading @@ -512,10 +512,10 @@ operator=( const BiEllpack< Device_, Index_, IndexAllocator_, RowMajorOrder_, Wa template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: save( File& file ) const { file.save( &this->size ); Loading @@ -528,10 +528,10 @@ save( File& file ) const template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: load( File& file ) { file.load( &this->size ); Loading @@ -544,10 +544,10 @@ load( File& file ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: printStructure( std::ostream& str ) const { this->view.printStructure( str ); Loading @@ -556,20 +556,20 @@ printStructure( std::ostream& str ) const template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getStripLength( const IndexType stripIdx ) const -> IndexType { return details::BiEllpack< Index, Device, RowMajorOrder, WarpSize >::getStripLength( this->groupPointers.getConstView(), stripIdx ); return details::BiEllpack< Index, Device, Organization, WarpSize >::getStripLength( this->groupPointers.getConstView(), stripIdx ); } template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getGroupLength( const IndexType strip, const IndexType group ) const -> IndexType { return this->groupPointers.getElement( strip * ( getLogWarpSize() + 1 ) + group + 1 ) Loading src/TNL/Containers/Segments/BiEllpackSegmentView.h +3 −2 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ #pragma once #include <math.h> #include <TNL/Containers/Segments/ElementsOrganization.h> #include <TNL/Containers/StaticVector.h> namespace TNL { Loading @@ -18,7 +19,7 @@ namespace TNL { namespace Segments { template< typename Index, bool RowMajorOrder = false, ElementsOrganization Organization, int WarpSize = 32 > class BiEllpackSegmentView { Loading Loading @@ -68,7 +69,7 @@ class BiEllpackSegmentView groupHeight /= 2; } TNL_ASSERT_LE( groupIdx, TNL::log2( getWarpSize() - inStripIdx + 1 ), "Local index exceeds segment bounds." ); if( RowMajorOrder ) if( Organization == RowMajorOrder ) { //std::cerr << " offset = " << offset << " inStripIdx = " << inStripIdx << " localIdx = " << localIdx // << " return = " << offset + inStripIdx * groupsWidth[ groupIdx ] + localIdx << std::endl; Loading src/TNL/Containers/Segments/BiEllpackView.h +3 −2 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ #include <type_traits> #include <TNL/Containers/Vector.h> #include <TNL/Containers/Segments/ElementsOrganization.h> #include <TNL/Containers/Segments/BiEllpackSegmentView.h> #include <TNL/Containers/Segments/details/BiEllpack.h> Loading @@ -23,7 +24,7 @@ namespace TNL { template< typename Device, typename Index, bool RowMajorOrder = std::is_same< Device, Devices::Host >::value, ElementsOrganization Organization = Containers::Segments::DefaultElementsOrganization< Device >::getOrganization(), int WarpSize = 32 > class BiEllpackView { Loading @@ -37,7 +38,7 @@ class BiEllpackView template< typename Device_, typename Index_ > using ViewTemplate = BiEllpackView< Device_, Index_ >; using ConstViewType = BiEllpackView< Device, std::add_const_t< Index > >; using SegmentViewType = BiEllpackSegmentView< IndexType, RowMajorOrder >; using SegmentViewType = BiEllpackSegmentView< IndexType, Organization >; __cuda_callable__ BiEllpackView() = default; Loading Loading
Documentation/Examples/Matrices/CMakeLists.txt +11 −4 Original line number Diff line number Diff line Loading @@ -64,6 +64,11 @@ IF( BUILD_CUDA ) ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/DenseMatrixExample_forAllRows.out OUTPUT DenseMatrixExample_forAllRows.out ) CUDA_ADD_EXECUTABLE( DenseMatrixViewExample_constructor_cuda DenseMatrixViewExample_constructor.cu ) ADD_CUSTOM_COMMAND( COMMAND DenseMatrixViewExample_constructor_cuda > ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/DenseMatrixViewExample_constructor.out OUTPUT DenseMatrixViewExample_constructor.out ) ELSE() ADD_EXECUTABLE( DenseMatrixExample_Constructor_init_list DenseMatrixExample_Constructor_init_list.cpp ) ADD_CUSTOM_COMMAND( COMMAND DenseMatrixExample_Constructor_init_list > Loading Loading @@ -130,11 +135,12 @@ ELSE() ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/DenseMatrixExample_forAllRows.out OUTPUT DenseMatrixExample_forAllRows.out ) ENDIF() ADD_EXECUTABLE( DenseMatrixViewExample_constructor DenseMatrixViewExample_constructor.cpp ) ADD_CUSTOM_COMMAND( COMMAND DenseMatrixViewExample_constructor > ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/DenseMatrixViewExample_constructor.out OUTPUT DenseMatrixViewExample_constructor.out ) ENDIF() ADD_CUSTOM_TARGET( RunMatricesExamples ALL DEPENDS DenseMatrixExample_Constructor_init_list.out Loading @@ -150,5 +156,6 @@ ADD_CUSTOM_TARGET( RunMatricesExamples ALL DEPENDS DenseMatrixExample_allRowsReduction.out DenseMatrixExample_forRows.out DenseMatrixExample_forAllRows.out DenseMatrixViewExample_constructor.out )
src/TNL/Containers/Segments/BiEllpack.h +9 −9 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ namespace TNL { template< typename Device, typename Index, typename IndexAllocator = typename Allocators::Default< Device >::template Allocator< Index >, bool RowMajorOrder = std::is_same< Device, Devices::Host >::value, ElementsOrganization Organization = Containers::Segments::DefaultElementsOrganization< Device >::getOrganization(), int WarpSize = 32 > class BiEllpack { Loading @@ -31,12 +31,12 @@ class BiEllpack using DeviceType = Device; using IndexType = std::remove_const_t< Index >; using OffsetsHolder = Containers::Vector< Index, DeviceType, IndexType, IndexAllocator >; static constexpr bool getRowMajorOrder() { return RowMajorOrder; } using ViewType = BiEllpackView< Device, Index, RowMajorOrder >; static constexpr bool getOrganization() { return Organization; } using ViewType = BiEllpackView< Device, Index, Organization >; template< typename Device_, typename Index_ > using ViewTemplate = BiEllpackView< Device_, Index_, RowMajorOrder >; using ConstViewType = BiEllpackView< Device, std::add_const_t< IndexType >, RowMajorOrder >; using SegmentViewType = BiEllpackSegmentView< IndexType, RowMajorOrder >; using ViewTemplate = BiEllpackView< Device_, Index_, Organization >; using ConstViewType = BiEllpackView< Device, std::add_const_t< IndexType >, Organization >; using SegmentViewType = BiEllpackSegmentView< IndexType, Organization >; BiEllpack() = default; Loading Loading @@ -109,8 +109,8 @@ class BiEllpack BiEllpack& operator=( const BiEllpack& source ) = default; template< typename Device_, typename Index_, typename IndexAllocator_, bool RowMajorOrder_ > BiEllpack& operator=( const BiEllpack< Device_, Index_, IndexAllocator_, RowMajorOrder_, WarpSize >& source ); template< typename Device_, typename Index_, typename IndexAllocator_, ElementsOrganization Organization_ > BiEllpack& operator=( const BiEllpack< Device_, Index_, IndexAllocator_, Organization_, WarpSize >& source ); void save( File& file ) const; Loading Loading @@ -163,7 +163,7 @@ class BiEllpack return 0; }; template< typename Device_, typename Index_, typename IndexAllocator_, bool RowMajorOrder_, int WarpSize_ > template< typename Device_, typename Index_, typename IndexAllocator_, ElementsOrganization Organization_, int WarpSize_ > friend class BiEllpack; }; Loading
src/TNL/Containers/Segments/BiEllpack.hpp +67 −67 Original line number Diff line number Diff line Loading @@ -23,9 +23,9 @@ namespace TNL { template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: BiEllpack( const Vector< IndexType, DeviceType, IndexType >& sizes ) { this->setSegmentsSizes( sizes ); Loading @@ -34,9 +34,9 @@ BiEllpack( const Vector< IndexType, DeviceType, IndexType >& sizes ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: BiEllpack( const BiEllpack& biEllpack ) : size( biEllpack.size ), storageSize( biEllpack.storageSize ), Loading @@ -49,9 +49,9 @@ BiEllpack( const BiEllpack& biEllpack ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: BiEllpack( const BiEllpack&& biEllpack ) : size( biEllpack.size ), storageSize( biEllpack.storageSize ), Loading @@ -64,10 +64,10 @@ BiEllpack( const BiEllpack&& biEllpack ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > String BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getSerializationType() { return "BiEllpack< [any_device], " + TNL::getSerializationType< IndexType >() + " >"; Loading @@ -76,10 +76,10 @@ getSerializationType() template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > String BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getSegmentsType() { return ViewType::getSegmentsType(); Loading @@ -88,10 +88,10 @@ getSegmentsType() template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > typename BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >::ViewType BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: typename BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >::ViewType BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getView() { return ViewType( size, storageSize, virtualRows, rowPermArray.getView(), groupPointers.getView() ); Loading @@ -100,9 +100,9 @@ getView() template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getConstView() const -> const ConstViewType { return ConstViewType( size, storageSize, virtualRows, rowPermArray.getConstView(), groupPointers.getConstView() ); Loading @@ -111,9 +111,9 @@ getConstView() const -> const ConstViewType template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getSegmentsCount() const -> IndexType { return this->size; Loading @@ -122,10 +122,10 @@ getSegmentsCount() const -> IndexType template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename SizesHolder > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: void BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: performRowBubbleSort( const SizesHolder& segmentsSizes ) { if( segmentsSizes.getSize() == 0 ) Loading Loading @@ -190,10 +190,10 @@ performRowBubbleSort( const SizesHolder& segmentsSizes ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename SizesHolder > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: void BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: computeColumnSizes( const SizesHolder& segmentsSizes ) { IndexType numberOfStrips = this->virtualRows / getWarpSize(); Loading Loading @@ -237,10 +237,10 @@ computeColumnSizes( const SizesHolder& segmentsSizes ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename SizesHolder > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: void BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: verifyRowPerm( const SizesHolder& segmentsSizes ) { bool ok = true; Loading Loading @@ -284,10 +284,10 @@ verifyRowPerm( const SizesHolder& segmentsSizes ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename SizesHolder > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: void BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: verifyRowLengths( const SizesHolder& segmentsSizes ) { bool ok = true; Loading @@ -300,7 +300,7 @@ verifyRowLengths( const SizesHolder& segmentsSizes ) const IndexType begin = this->groupPointers.getElement( groupBegin ) * getWarpSize() + rowStripPerm * stripLength; IndexType elementPtr = begin; IndexType rowLength = 0; const IndexType groupsCount = details::BiEllpack< Index, Device, RowMajorOrder, WarpSize >::getActiveGroupsCount( this->rowPermArray.getConstView(), segmentIdx ); const IndexType groupsCount = details::BiEllpack< Index, Device, Organization, WarpSize >::getActiveGroupsCount( this->rowPermArray.getConstView(), segmentIdx ); for( IndexType group = 0; group < groupsCount; group++ ) { for( IndexType i = 0; i < this->getGroupLength( strip, group ); i++ ) Loading @@ -324,11 +324,11 @@ verifyRowLengths( const SizesHolder& segmentsSizes ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename SizesHolder > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: setSegmentsSizes( const SizesHolder& segmentsSizes ) { if( std::is_same< DeviceType, Devices::Host >::value ) Loading @@ -354,7 +354,7 @@ setSegmentsSizes( const SizesHolder& segmentsSizes ) } else { BiEllpack< Devices::Host, Index, typename Allocators::Default< Devices::Host >::template Allocator< IndexType >, RowMajorOrder > hostSegments; BiEllpack< Devices::Host, Index, typename Allocators::Default< Devices::Host >::template Allocator< IndexType >, Organization > hostSegments; Containers::Vector< IndexType, Devices::Host, IndexType > hostSegmentsSizes; hostSegmentsSizes = segmentsSizes; hostSegments.setSegmentsSizes( hostSegmentsSizes ); Loading @@ -365,10 +365,10 @@ setSegmentsSizes( const SizesHolder& segmentsSizes ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: reset() { this->size = 0; Loading @@ -381,12 +381,12 @@ reset() template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getSegmentSize( const IndexType segmentIdx ) const -> IndexType { return details::BiEllpack< IndexType, DeviceType, RowMajorOrder >::getSegmentSize( return details::BiEllpack< IndexType, DeviceType, Organization >::getSegmentSize( rowPermArray.getConstView(), groupPointers.getConstView(), segmentIdx ); Loading @@ -395,9 +395,9 @@ getSegmentSize( const IndexType segmentIdx ) const -> IndexType template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getSize() const -> IndexType { return this->size; Loading @@ -406,9 +406,9 @@ getSize() const -> IndexType template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getStorageSize() const -> IndexType { return this->storageSize; Loading @@ -417,12 +417,12 @@ getStorageSize() const -> IndexType template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getGlobalIndex( const IndexType segmentIdx, const IndexType localIdx ) const -> IndexType { return details::BiEllpack< IndexType, DeviceType, RowMajorOrder >::getGlobalIndex( return details::BiEllpack< IndexType, DeviceType, Organization >::getGlobalIndex( rowPermArray.getConstView(), groupPointers.getConstView(), segmentIdx, Loading @@ -432,9 +432,9 @@ getGlobalIndex( const IndexType segmentIdx, const IndexType localIdx ) const -> template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: __cuda_callable__ auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getSegmentView( const IndexType segmentIdx ) const -> SegmentViewType { } Loading @@ -442,11 +442,11 @@ getSegmentView( const IndexType segmentIdx ) const -> SegmentViewType template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename Function, typename... Args > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: forSegments( IndexType first, IndexType last, Function& f, Args... args ) const { this->getConstView().forSegments( first, last, f, args... ); Loading @@ -455,11 +455,11 @@ forSegments( IndexType first, IndexType last, Function& f, Args... args ) const template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename Function, typename... Args > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: forAll( Function& f, Args... args ) const { this->forSegments( 0, this->getSegmentsCount(), f, args... ); Loading @@ -468,11 +468,11 @@ forAll( Function& f, Args... args ) const template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: segmentsReduction( 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... ); Loading @@ -481,11 +481,11 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, const Reductio template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename Fetch, typename Reduction, typename ResultKeeper, typename Real, typename... Args > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: 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... ); Loading @@ -494,12 +494,12 @@ allReduction( Fetch& fetch, const Reduction& reduction, ResultKeeper& keeper, co template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > template< typename Device_, typename Index_, typename IndexAllocator_, bool RowMajorOrder_ > BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >& BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: operator=( const BiEllpack< Device_, Index_, IndexAllocator_, RowMajorOrder_, WarpSize >& source ) template< typename Device_, typename Index_, typename IndexAllocator_, ElementsOrganization Organization_ > BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >& BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: operator=( const BiEllpack< Device_, Index_, IndexAllocator_, Organization_, WarpSize >& source ) { this->size = source.size; this->storageSize = source.storageSize; Loading @@ -512,10 +512,10 @@ operator=( const BiEllpack< Device_, Index_, IndexAllocator_, RowMajorOrder_, Wa template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: save( File& file ) const { file.save( &this->size ); Loading @@ -528,10 +528,10 @@ save( File& file ) const template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: load( File& file ) { file.load( &this->size ); Loading @@ -544,10 +544,10 @@ load( File& file ) template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > void BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: printStructure( std::ostream& str ) const { this->view.printStructure( str ); Loading @@ -556,20 +556,20 @@ printStructure( std::ostream& str ) const template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getStripLength( const IndexType stripIdx ) const -> IndexType { return details::BiEllpack< Index, Device, RowMajorOrder, WarpSize >::getStripLength( this->groupPointers.getConstView(), stripIdx ); return details::BiEllpack< Index, Device, Organization, WarpSize >::getStripLength( this->groupPointers.getConstView(), stripIdx ); } template< typename Device, typename Index, typename IndexAllocator, bool RowMajorOrder, ElementsOrganization Organization, int WarpSize > auto BiEllpack< Device, Index, IndexAllocator, RowMajorOrder, WarpSize >:: auto BiEllpack< Device, Index, IndexAllocator, Organization, WarpSize >:: getGroupLength( const IndexType strip, const IndexType group ) const -> IndexType { return this->groupPointers.getElement( strip * ( getLogWarpSize() + 1 ) + group + 1 ) Loading
src/TNL/Containers/Segments/BiEllpackSegmentView.h +3 −2 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ #pragma once #include <math.h> #include <TNL/Containers/Segments/ElementsOrganization.h> #include <TNL/Containers/StaticVector.h> namespace TNL { Loading @@ -18,7 +19,7 @@ namespace TNL { namespace Segments { template< typename Index, bool RowMajorOrder = false, ElementsOrganization Organization, int WarpSize = 32 > class BiEllpackSegmentView { Loading Loading @@ -68,7 +69,7 @@ class BiEllpackSegmentView groupHeight /= 2; } TNL_ASSERT_LE( groupIdx, TNL::log2( getWarpSize() - inStripIdx + 1 ), "Local index exceeds segment bounds." ); if( RowMajorOrder ) if( Organization == RowMajorOrder ) { //std::cerr << " offset = " << offset << " inStripIdx = " << inStripIdx << " localIdx = " << localIdx // << " return = " << offset + inStripIdx * groupsWidth[ groupIdx ] + localIdx << std::endl; Loading
src/TNL/Containers/Segments/BiEllpackView.h +3 −2 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ #include <type_traits> #include <TNL/Containers/Vector.h> #include <TNL/Containers/Segments/ElementsOrganization.h> #include <TNL/Containers/Segments/BiEllpackSegmentView.h> #include <TNL/Containers/Segments/details/BiEllpack.h> Loading @@ -23,7 +24,7 @@ namespace TNL { template< typename Device, typename Index, bool RowMajorOrder = std::is_same< Device, Devices::Host >::value, ElementsOrganization Organization = Containers::Segments::DefaultElementsOrganization< Device >::getOrganization(), int WarpSize = 32 > class BiEllpackView { Loading @@ -37,7 +38,7 @@ class BiEllpackView template< typename Device_, typename Index_ > using ViewTemplate = BiEllpackView< Device_, Index_ >; using ConstViewType = BiEllpackView< Device, std::add_const_t< Index > >; using SegmentViewType = BiEllpackSegmentView< IndexType, RowMajorOrder >; using SegmentViewType = BiEllpackSegmentView< IndexType, Organization >; __cuda_callable__ BiEllpackView() = default; Loading