Template Numerical Library version\ main:f17d0c8
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::EllpackBase< Device, Index, Organization, Alignment > Class Template Reference
Inheritance diagram for TNL::Algorithms::Segments::EllpackBase< Device, Index, Organization, Alignment >:
Inheritance graph
[legend]

Public Types

using DeviceType = Device
 
using IndexType = std::remove_const_t< Index >
 
using SegmentViewType = SegmentView< IndexType, Organization >
 

Public Member Functions

__cuda_callable__ EllpackBase (const EllpackBase &)=default
 
__cuda_callable__ EllpackBase (EllpackBase &&) noexcept=default
 
__cuda_callable__ EllpackBase (IndexType segmentsCount, IndexType segmentSize, IndexType alignedSize)
 
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 getAlignedSize () const
 
__cuda_callable__ IndexType getGlobalIndex (Index segmentIdx, Index localIdx) const
 
__cuda_callable__ IndexType getSegmentsCount () const
 
__cuda_callable__ IndexType getSegmentSize (IndexType segmentIdx) const
 
__cuda_callable__ SegmentViewType getSegmentView (IndexType segmentIdx) const
 
__cuda_callable__ IndexType getSize () const
 
__cuda_callable__ IndexType getStorageSize () const
 
EllpackBaseoperator= (const EllpackBase &)=delete
 
EllpackBaseoperator= (EllpackBase &&)=delete
 

Static Public Member Functions

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

Protected Member Functions

__cuda_callable__ void bind (IndexType segmentsCount, IndexType segmentSize, IndexType alignedSize)
 Re-initializes the internal attributes of the base class.
 

Protected Attributes

IndexType alignedSize = 0
 
IndexType segmentsCount = 0
 
IndexType segmentSize = 0
 

Member Function Documentation

◆ bind()

template<typename Device , typename Index , ElementsOrganization Organization, int Alignment>
__cuda_callable__ void TNL::Algorithms::Segments::EllpackBase< Device, Index, Organization, Alignment >::bind ( IndexType segmentsCount,
IndexType segmentSize,
IndexType alignedSize )
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: