Alexandria 2.31.4
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Euclid::NdArray::NdArray< T >::ContainerInterface Struct Referenceabstract
Inheritance diagram for Euclid::NdArray::NdArray< T >::ContainerInterface:

Public Member Functions

virtual ~ContainerInterface ()=default
 
get (size_t offset) const
 Get the element at the given absolute offset (in bytes)
 
T & get (size_t offset)
 Get a reference to the element at the given absolute offset (in bytes)
 
virtual size_t size () const =0
 
virtual size_t nbytes () const =0
 Get the size in bytes.
 
virtual void resize (const std::vector< size_t > &shape)=0
 Resize container.
 
virtual std::unique_ptr< ContainerInterfacecopy () const =0
 Expected to generate a deep copy of the underlying data.
 

Public Attributes

char * m_data_ptr
 

Detailed Description

template<typename T>
struct Euclid::NdArray::NdArray< T >::ContainerInterface

Definition at line 511 of file NdArray.h.

Constructor & Destructor Documentation

◆ ~ContainerInterface()

template<typename T>
virtual Euclid::NdArray::NdArray< T >::ContainerInterface::~ContainerInterface ( )
virtualdefault

Member Function Documentation

◆ copy()

template<typename T>
virtual std::unique_ptr< ContainerInterface > Euclid::NdArray::NdArray< T >::ContainerInterface::copy ( ) const
pure virtual

Expected to generate a deep copy of the underlying data.

Implemented in Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >, and Euclid::Table::NdArray< T >::ContainerWrapper< Container >.

◆ get() [1/2]

template<typename T>
T & Euclid::NdArray::NdArray< T >::ContainerInterface::get ( size_t offset)
inline

Get a reference to the element at the given absolute offset (in bytes)

Definition at line 524 of file NdArray.h.

References m_data_ptr.

◆ get() [2/2]

template<typename T>
T Euclid::NdArray::NdArray< T >::ContainerInterface::get ( size_t offset) const
inline

Get the element at the given absolute offset (in bytes)

Definition at line 519 of file NdArray.h.

References m_data_ptr.

◆ nbytes()

template<typename T>
virtual size_t Euclid::NdArray::NdArray< T >::ContainerInterface::nbytes ( ) const
pure virtual

◆ resize()

template<typename T>
virtual void Euclid::NdArray::NdArray< T >::ContainerInterface::resize ( const std::vector< size_t > & shape)
pure virtual

◆ size()

template<typename T>
virtual size_t Euclid::NdArray::NdArray< T >::ContainerInterface::size ( ) const
pure virtual

Member Data Documentation

◆ m_data_ptr

template<typename T>
char* Euclid::NdArray::NdArray< T >::ContainerInterface::m_data_ptr

Owned by the specific implementation ContainerWrapper, but exposed here to avoid indirections

Definition at line 514 of file NdArray.h.

Referenced by get(), and get().


The documentation for this struct was generated from the following file: