Alexandria  2.19
Please provide a description of the project.
Public Member Functions | Public Attributes | List of all members
Euclid::NdArray::NdArray< T >::ContainerWrapper< Container > Struct Template Reference

Public Member Functions

 ~ContainerWrapper ()=default
 
 ContainerWrapper (const ContainerWrapper &)=delete
 
 ContainerWrapper (ContainerWrapper &&)=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< ContainerInterfacecopy () const final
 

Public Attributes

Container< T > m_container
 
T * m_data_ptr
 

Detailed Description

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

Definition at line 467 of file NdArray.h.

Constructor & Destructor Documentation

◆ ~ContainerWrapper()

template<typename T >
template<template< class... > class Container>
Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::~ContainerWrapper ( )
default

◆ ContainerWrapper() [1/3]

template<typename T >
template<template< class... > class Container>
Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::ContainerWrapper ( const ContainerWrapper< Container > &  )
delete

◆ ContainerWrapper() [2/3]

template<typename T >
template<template< class... > class Container>
Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::ContainerWrapper ( ContainerWrapper< Container > &&  )
default

◆ ContainerWrapper() [3/3]

template<typename T >
template<template< class... > class Container>
template<typename... Args>
Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::ContainerWrapper ( Args &&...  args)
inline

Member Function Documentation

◆ copy()

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

◆ resize()

template<typename T >
template<template< class... > class Container>
void Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::resize ( const std::vector< size_t > &  shape)
inlinefinal

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)

Definition at line 505 of file NdArray.h.

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

Here is the call graph for this function:

◆ resizeImpl() [1/2]

template<typename T >
template<template< class... > class Container>
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 493 of file NdArray.h.

◆ resizeImpl() [2/2]

template<typename T >
template<template< class... > class Container>
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 487 of file NdArray.h.

◆ size()

template<typename T >
template<template< class... > class Container>
size_t Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::size ( ) const
inlinefinal

◆ void() [1/2]

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

Definition at line 488 of file NdArray.h.

◆ void() [2/2]

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

Definition at line 493 of file NdArray.h.

Member Data Documentation

◆ m_container

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

◆ m_data_ptr

template<typename T >
template<template< class... > class Container>
T* Euclid::NdArray::NdArray< T >::ContainerInterface::m_data_ptr

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

Definition at line 442 of file NdArray.h.

Referenced by Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::ContainerWrapper(), and Euclid::NdArray::NdArray< T >::ContainerWrapper< Container >::resize().


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