Alexandria  2.25.0
SDC-CH common library for the Euclid project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
Euclid::NdArray::NdArray< T >::ContainerWrapper< Container > Struct Template Reference
Inheritance diagram for Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >:
Inheritance graph
[legend]
Collaboration diagram for Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >:
Collaboration graph
[legend]

Public Member Functions

 ~ContainerWrapper ()=default
 
 ContainerWrapper (const ContainerWrapper &)=delete
 
 ContainerWrapper (ContainerWrapper &&) noexcept=default
 
template<typename... Args>
 ContainerWrapper (Args &&...args)
 
size_t size () const final
 
template<typename T2 >
auto resizeImpl (const std::vector< size_t > &shape) -> decltype((void) std::declval< Container< T2 >>().resize(std::vector< size_t >
 
 void ())
 
template<typename T2 >
auto resizeImpl (const std::vector< size_t > &shape) -> decltype((void) std::declval< Container< T2 >>().resize(size_t
 
 void ())
 
void resize (const std::vector< size_t > &shape) final
 
std::unique_ptr
< ContainerInterface
copy () const final
 Expected to generate a deep copy of the underlying data. More...
 
- Public Member Functions inherited from Euclid::NdArray::NdArray< T >::ContainerInterface
virtual ~ContainerInterface ()=default
 
get (size_t offset) const
 Get the element at the given absolute offset (in bytes) More...
 
T & get (size_t offset)
 Get a reference to the element at the given absolute offset (in bytes) More...
 
size_t nbytes () const
 Get the size in bytes. More...
 

Public Attributes

Container< T > m_container
 
- Public Attributes inherited from Euclid::NdArray::NdArray< T >::ContainerInterface
char * m_data_ptr
 

Detailed Description

template<typename T>
template<template< class...> class Container = std::vector>
struct Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >

Definition at line 51 of file NdArray.h.

Constructor & Destructor Documentation

template<typename T>
template<template< class...> class Container = std::vector>
Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::~ContainerWrapper ( )
default
template<typename T>
template<template< class...> class Container = std::vector>
Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::ContainerWrapper ( const ContainerWrapper< Container > &  )
delete
template<typename T>
template<template< class...> class Container = std::vector>
Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::ContainerWrapper ( ContainerWrapper< Container > &&  )
defaultnoexcept
template<typename T>
template<template< class...> class Container = std::vector>
template<typename... Args>
Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::ContainerWrapper ( Args &&...  args)
inlineexplicit

Member Function Documentation

template<typename T>
template<template< class...> class Container = std::vector>
std::unique_ptr<ContainerInterface> Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::copy ( ) const
inlinefinalvirtual

Expected to generate a deep copy of the underlying data.

Implements Euclid::NdArray::NdArray< T >::ContainerInterface.

Definition at line 587 of file NdArray.h.

References Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::m_container.

template<typename T>
template<template< class...> class Container = std::vector>
void Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::resize ( const std::vector< size_t > &  shape)
inlinefinalvirtual
Note
This method delegates to resizeImpl, which uses SFINAE to switch at compilation time between an implementation adapted to STL containers [resize(size_t)], and another for containers that need the shape information (i.e. Npy)

Implements Euclid::NdArray::NdArray< T >::ContainerInterface.

Definition at line 582 of file NdArray.h.

References Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::m_container, Euclid::NdArray::NdArray< T >::ContainerInterface::m_data_ptr, and Euclid::NdArray::NdArray< T >::shape().

Here is the call graph for this function:

template<typename T>
template<template< class...> class Container = std::vector>
template<typename T2 >
auto Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::resizeImpl ( const std::vector< size_t > &  shape) -> decltype((void)std::declval<Container<T2>>().resize(std::vector<size_t>
inline

Definition at line 563 of file NdArray.h.

template<typename T>
template<template< class...> class Container = std::vector>
template<typename T2 >
auto Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::resizeImpl ( const std::vector< size_t > &  shape) -> decltype((void)std::declval<Container<T2>>().resize(size_t
inline

Definition at line 569 of file NdArray.h.

template<typename T>
template<template< class...> class Container = std::vector>
size_t Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::size ( ) const
inlinefinalvirtual
template<typename T>
template<template< class...> class Container = std::vector>
Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::void ( )
inline

Definition at line 564 of file NdArray.h.

template<typename T>
template<template< class...> class Container = std::vector>
Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::void ( )
inline

Definition at line 570 of file NdArray.h.

Member Data Documentation

template<typename T>
template<template< class...> class Container = std::vector>
Container<T> Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::m_container

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