Template Numerical Library version\ main:94209208
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TNL::Algorithms::Segments::ChunkedEllpackBase< Device, Index, Organization > Class Template Reference
Inheritance diagram for TNL::Algorithms::Segments::ChunkedEllpackBase< Device, Index, Organization >:
Inheritance graph
[legend]
Collaboration diagram for TNL::Algorithms::Segments::ChunkedEllpackBase< Device, Index, Organization >:
Collaboration graph
[legend]

Public Types

using ConstOffsetsView = typename OffsetsView::ConstViewType
 
using ConstSliceInfoContainerView = typename SliceInfoContainerView::ConstViewType
 
using DeviceType = Device
 
using IndexType = std::remove_const_t< Index >
 
using OffsetsView = Containers::VectorView< Index, DeviceType, IndexType >
 
using SegmentViewType = ChunkedEllpackSegmentView< IndexType, Organization >
 
using SliceInfoContainerView
 
using SliceInfoType = detail::ChunkedEllpackSliceInfo< IndexType >
 
template<typename Device_ , typename Index_ >
using ViewTemplate = ChunkedEllpackBase< Device_, Index_, Organization >
 

Public Member Functions

__cuda_callable__ ChunkedEllpackBase (ChunkedEllpackBase &&) noexcept=default
 
__cuda_callable__ ChunkedEllpackBase (const ChunkedEllpackBase &)=default
 
__cuda_callable__ ChunkedEllpackBase (IndexType size, IndexType storageSize, IndexType numberOfSlices, IndexType chunksInSlice, IndexType desiredChunkSize, OffsetsView segmentToChunkMapping, OffsetsView segmentToSliceMapping, OffsetsView chunksToSegmentsMapping, OffsetsView segmentPointers, SliceInfoContainerView slices)
 
template<typename Function >
void forAllElements (Function &&function) const
 
template<typename Function >
void forAllSegments (Function &&function) const
 
template<typename Function >
void forElements (IndexType begin, IndexType end, Function &&function) const
 
template<typename Function >
void forSegments (IndexType begin, IndexType end, Function &&function) const
 
__cuda_callable__ IndexType getChunksInSlice () const
 
__cuda_callable__ OffsetsView getChunksToSegmentsMappingView ()
 
__cuda_callable__ ConstOffsetsView getChunksToSegmentsMappingView () const
 
__cuda_callable__ IndexType getDesiredChunkSize () const
 
__cuda_callable__ IndexType getGlobalIndex (IndexType segmentIdx, IndexType localIdx) const
 
__cuda_callable__ IndexType getNumberOfSlices () const
 
__cuda_callable__ OffsetsView getSegmentPointersView ()
 
__cuda_callable__ ConstOffsetsView getSegmentPointersView () const
 
__cuda_callable__ IndexType getSegmentsCount () const
 
__cuda_callable__ IndexType getSegmentSize (IndexType segmentIdx) const
 
__cuda_callable__ OffsetsView getSegmentToChunkMappingView ()
 
__cuda_callable__ ConstOffsetsView getSegmentToChunkMappingView () const
 
__cuda_callable__ OffsetsView getSegmentToSliceMappingView ()
 
__cuda_callable__ ConstOffsetsView getSegmentToSliceMappingView () const
 
__cuda_callable__ SegmentViewType getSegmentView (IndexType segmentIdx) const
 
__cuda_callable__ IndexType getSize () const
 
__cuda_callable__ SliceInfoContainerView getSlicesView ()
 
__cuda_callable__ ConstSliceInfoContainerView getSlicesView () const
 
__cuda_callable__ IndexType getStorageSize () const
 
ChunkedEllpackBaseoperator= (ChunkedEllpackBase &&)=delete
 
ChunkedEllpackBaseoperator= (const ChunkedEllpackBase &)=delete
 
void printStructure (std::ostream &str) const
 

Static Public Member Functions

static constexpr ElementsOrganization getOrganization ()
 
static std::string getSegmentsType ()
 
static std::string getSerializationType ()
 
static constexpr bool havePadding ()
 

Protected Member Functions

__cuda_callable__ void bind (IndexType size, IndexType storageSize, IndexType numberOfSlices, IndexType chunksInSlice, IndexType desiredChunkSize, OffsetsView segmentToChunkMapping, OffsetsView segmentToSliceMapping, OffsetsView chunksToSegmentsMapping, OffsetsView segmentPointers, SliceInfoContainerView slices)
 Re-initializes the internal attributes of the base class.
 

Protected Attributes

IndexType chunksInSlice = 256
 
OffsetsView chunksToSegmentsMapping
 
IndexType desiredChunkSize = 16
 
IndexType numberOfSlices = 0
 
OffsetsView segmentPointers
 Keeps index of the first segment index.
 
OffsetsView segmentToChunkMapping
 For each segment, this keeps index of the first chunk within a slice.
 
OffsetsView segmentToSliceMapping
 For each segment, this keeps index of the slice which contains the segment.
 
IndexType size = 0
 
SliceInfoContainerView slices
 
IndexType storageSize = 0
 

Member Typedef Documentation

◆ SliceInfoContainerView

template<typename Device , typename Index , ElementsOrganization Organization>
using TNL::Algorithms::Segments::ChunkedEllpackBase< Device, Index, Organization >::SliceInfoContainerView
Initial value:
Subrange< Index > splitRange(Index rangeBegin, Index rangeEnd, int rank, int num_subintervals)
A helper function which splits a one-dimensional range.
Definition BlockPartitioning.h:27

Member Function Documentation

◆ bind()

template<typename Device , typename Index , ElementsOrganization Organization>
__cuda_callable__ void TNL::Algorithms::Segments::ChunkedEllpackBase< Device, Index, Organization >::bind ( IndexType size,
IndexType storageSize,
IndexType numberOfSlices,
IndexType chunksInSlice,
IndexType desiredChunkSize,
OffsetsView segmentToChunkMapping,
OffsetsView segmentToSliceMapping,
OffsetsView chunksToSegmentsMapping,
OffsetsView segmentPointers,
SliceInfoContainerView slices )
protected

Re-initializes the internal attributes of the base class.

Note that this function is protected to ensure that the user cannot modify the base class of segments. For the same reason, in future code development we also need to make sure that all non-const functions in the base class return by value and not by reference.


The documentation for this class was generated from the following files: