QMCPACK
container_traits< CT > Struct Template Reference
+ Collaboration diagram for container_traits< CT >:

Public Types

using element_type = typename CT::value_type
 the data type of elements More...
 

Static Public Member Functions

template<typename I >
static void resize (CT &ref, I *n, int d)
 resize container More...
 
static size_t getSize (const CT &ref)
 get the current linear storage size of a container More...
 
static auto getElementPtr (CT &ref)
 get the linear storage pointer of a container More...
 

Detailed Description

template<typename CT>
struct qmcplusplus::container_traits< CT >

Definition at line 22 of file container_traits.h.

Member Typedef Documentation

◆ element_type

using element_type = typename CT::value_type

the data type of elements

Definition at line 25 of file container_traits.h.

Member Function Documentation

◆ getElementPtr()

static auto getElementPtr ( CT &  ref)
inlinestatic

get the linear storage pointer of a container

Definition at line 41 of file container_traits.h.

41 { return ref.data(); }

◆ getSize()

static size_t getSize ( const CT &  ref)
inlinestatic

get the current linear storage size of a container

Definition at line 38 of file container_traits.h.

38 { return ref.size(); }

◆ resize()

static void resize ( CT &  ref,
I n,
int  d 
)
inlinestatic

resize container

Parameters
nthe size of all the dimensions
dthe number of dimensions

Definition at line 32 of file container_traits.h.

33  {
34  throw std::runtime_error("Unknown container, resizing is not available!");
35  }

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