Template Numerical Library version\ main:4e58ea6
|
Public Types | |
using | ConstOffsetsView = typename OffsetsView::ConstViewType |
using | DeviceType = Device |
using | IndexType = std::remove_const_t< Index > |
using | OffsetsView = Containers::VectorView< Index, DeviceType, IndexType > |
using | SegmentViewType = SegmentView< IndexType, Organization > |
Public Member Functions | |
__cuda_callable__ | SlicedEllpackBase (const SlicedEllpackBase &)=default |
__cuda_callable__ | SlicedEllpackBase (IndexType size, IndexType storageSize, IndexType segmentsCount, OffsetsView &&sliceOffsets, OffsetsView &&sliceSegmentSizes) |
__cuda_callable__ | SlicedEllpackBase (SlicedEllpackBase &&) noexcept=default |
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 | 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__ OffsetsView | getSliceOffsetsView () |
__cuda_callable__ ConstOffsetsView | getSliceOffsetsView () const |
__cuda_callable__ OffsetsView | getSliceSegmentSizesView () |
__cuda_callable__ ConstOffsetsView | getSliceSegmentSizesView () const |
__cuda_callable__ IndexType | getStorageSize () const |
SlicedEllpackBase & | operator= (const SlicedEllpackBase &)=delete |
SlicedEllpackBase & | operator= (SlicedEllpackBase &&)=delete |
Static Public Member Functions | |
static constexpr ElementsOrganization | getOrganization () |
static std::string | getSegmentsType () |
static std::string | getSerializationType () |
static constexpr int | getSliceSize () |
static constexpr bool | havePadding () |
Protected Member Functions | |
__cuda_callable__ void | bind (IndexType size, IndexType storageSize, IndexType segmentsCount, OffsetsView sliceOffsets, OffsetsView sliceSegmentSizes) |
Re-initializes the internal attributes of the base class. | |
Protected Attributes | |
IndexType | segmentsCount = 0 |
IndexType | size = 0 |
OffsetsView | sliceOffsets |
OffsetsView | sliceSegmentSizes |
IndexType | storageSize = 0 |
|
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.