CbmRoot
Loading...
Searching...
No Matches
cbm::algo::PartitionedSpan< T > Class Template Reference

#include <PartitionedSpan.h>

Inheritance diagram for cbm::algo::PartitionedSpan< T >:
[legend]

Public Member Functions

 PartitionedSpan ()
 
template<typename Allocator >
 PartitionedSpan (std::vector< T, Allocator > &container, gsl::span< const size_t > offsets, gsl::span< const u32 > addresses)
 
template<typename Allocator >
 PartitionedSpan (const std::vector< T, Allocator > &container, gsl::span< const size_t > offsets, gsl::span< const u32 > addresses)
 
template<size_t N>
 PartitionedSpan (std::array< T, N > &container, gsl::span< const size_t > offsets, gsl::span< const u32 > addresses)
 
template<size_t N>
 PartitionedSpan (const std::array< T, N > &container, gsl::span< const size_t > offsets, gsl::span< const u32 > addresses)
 
 PartitionedSpan (gsl::span< T > data, gsl::span< const size_t > offsets, gsl::span< const u32 > addresses)
 
template<typename U , typename Allocator , typename = detail::EnableOnConst<U, T>>
 PartitionedSpan (const PartitionedVector< U, Allocator > &container)
 
template<typename U , typename Allocator , typename = detail::EnableOnNonConst<U, T>>
 PartitionedSpan (PartitionedVector< U, Allocator > &container)
 
template<typename U , typename = detail::EnableOnConst<U, T>>
 PartitionedSpan (PartitionedSpan< U > other)
 
gsl::span< T > operator[] (size_t i) const
 
u32 Address (size_t i) const
 
std::pair< gsl::span< T >, u32Partition (size_t i) const
 
size_t NPartitions () const
 
size_t Size (size_t i) const
 
size_t NElements () const
 
gsl::span< T > Data () const
 
gsl::span< const u32Addresses () const
 
gsl::span< const size_t > Offsets () const
 

Private Member Functions

void EnsureDimensions () const
 
void EnsureBounds (size_t i) const
 
size_t UnsafeSize (size_t i) const
 
gsl::span< T > UnsafePartitionSpan (size_t i) const
 

Private Attributes

gsl::span< T > fData
 
gsl::span< const size_t > fOffsets
 
gsl::span< const u32fAdresses
 

Static Private Attributes

static constexpr size_t NullOffset [1] = {0}
 

Detailed Description

template<typename T>
class cbm::algo::PartitionedSpan< T >

Definition at line 19 of file PartitionedVector.h.

Constructor & Destructor Documentation

◆ PartitionedSpan() [1/9]

template<typename T >
cbm::algo::PartitionedSpan< T >::PartitionedSpan ( )
inline

◆ PartitionedSpan() [2/9]

template<typename T >
template<typename Allocator >
cbm::algo::PartitionedSpan< T >::PartitionedSpan ( std::vector< T, Allocator > & container,
gsl::span< const size_t > offsets,
gsl::span< const u32 > addresses )
inline

◆ PartitionedSpan() [3/9]

template<typename T >
template<typename Allocator >
cbm::algo::PartitionedSpan< T >::PartitionedSpan ( const std::vector< T, Allocator > & container,
gsl::span< const size_t > offsets,
gsl::span< const u32 > addresses )
inline

◆ PartitionedSpan() [4/9]

template<typename T >
template<size_t N>
cbm::algo::PartitionedSpan< T >::PartitionedSpan ( std::array< T, N > & container,
gsl::span< const size_t > offsets,
gsl::span< const u32 > addresses )
inline

◆ PartitionedSpan() [5/9]

template<typename T >
template<size_t N>
cbm::algo::PartitionedSpan< T >::PartitionedSpan ( const std::array< T, N > & container,
gsl::span< const size_t > offsets,
gsl::span< const u32 > addresses )
inline

◆ PartitionedSpan() [6/9]

template<typename T >
cbm::algo::PartitionedSpan< T >::PartitionedSpan ( gsl::span< T > data,
gsl::span< const size_t > offsets,
gsl::span< const u32 > addresses )
inline

◆ PartitionedSpan() [7/9]

template<typename T >
template<typename U , typename Allocator , typename = detail::EnableOnConst<U, T>>
cbm::algo::PartitionedSpan< T >::PartitionedSpan ( const PartitionedVector< U, Allocator > & container)
inline

◆ PartitionedSpan() [8/9]

template<typename T >
template<typename U , typename Allocator , typename = detail::EnableOnNonConst<U, T>>
cbm::algo::PartitionedSpan< T >::PartitionedSpan ( PartitionedVector< U, Allocator > & container)
inline

◆ PartitionedSpan() [9/9]

template<typename T >
template<typename U , typename = detail::EnableOnConst<U, T>>
cbm::algo::PartitionedSpan< T >::PartitionedSpan ( PartitionedSpan< U > other)
inline

Definition at line 105 of file PartitionedSpan.h.

Member Function Documentation

◆ Address()

template<typename T >
u32 cbm::algo::PartitionedSpan< T >::Address ( size_t i) const
inline

◆ Addresses()

template<typename T >
gsl::span< const u32 > cbm::algo::PartitionedSpan< T >::Addresses ( ) const
inline

Definition at line 142 of file PartitionedSpan.h.

References cbm::algo::PartitionedSpan< T >::fAdresses.

◆ Data()

template<typename T >
gsl::span< T > cbm::algo::PartitionedSpan< T >::Data ( ) const
inline

Definition at line 140 of file PartitionedSpan.h.

References cbm::algo::PartitionedSpan< T >::fData.

◆ EnsureBounds()

◆ EnsureDimensions()

◆ NElements()

template<typename T >
size_t cbm::algo::PartitionedSpan< T >::NElements ( ) const
inline

Definition at line 138 of file PartitionedSpan.h.

References cbm::algo::PartitionedSpan< T >::fData.

Referenced by PartitionedSpanTest::Ensure(), and TEST_F().

◆ NPartitions()

template<typename T >
size_t cbm::algo::PartitionedSpan< T >::NPartitions ( ) const
inline

◆ Offsets()

template<typename T >
gsl::span< const size_t > cbm::algo::PartitionedSpan< T >::Offsets ( ) const
inline

Definition at line 144 of file PartitionedSpan.h.

References cbm::algo::PartitionedSpan< T >::fOffsets.

◆ operator[]()

template<typename T >
gsl::span< T > cbm::algo::PartitionedSpan< T >::operator[] ( size_t i) const
inline

◆ Partition()

template<typename T >
std::pair< gsl::span< T >, u32 > cbm::algo::PartitionedSpan< T >::Partition ( size_t i) const
inline

◆ Size()

template<typename T >
size_t cbm::algo::PartitionedSpan< T >::Size ( size_t i) const
inline

◆ UnsafePartitionSpan()

◆ UnsafeSize()

template<typename T >
size_t cbm::algo::PartitionedSpan< T >::UnsafeSize ( size_t i) const
inlineprivate

Member Data Documentation

◆ fAdresses

◆ fData

◆ fOffsets

◆ NullOffset

template<typename T >
size_t cbm::algo::PartitionedSpan< T >::NullOffset[1] = {0}
staticconstexprprivate

Definition at line 148 of file PartitionedSpan.h.


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