13 #ifndef QMCPLUSPLUS_CONTAINER_TRAITS_H 14 #define QMCPLUSPLUS_CONTAINER_TRAITS_H 32 inline static void resize(CT& ref,
I*
n,
int d)
34 throw std::runtime_error(
"Unknown container, resizing is not available!");
38 inline static size_t getSize(
const CT& ref) {
return ref.size(); }
45 template<
typename T,
class ALLOC>
49 using CT = std::vector<T, ALLOC>;
54 size_t nt = d > 0 ? 1 : 0;
55 for (
int i = 0; i < d; ++i)
60 inline static size_t getSize(
const CT& ref) {
return ref.size(); }
static auto getElementPtr(CT &ref)
helper functions for EinsplineSetBuilder
static size_t getSize(const CT &ref)
get the current linear storage size of a container
typename CT::value_type element_type
the data type of elements
static void resize(CT &ref, I *n, int d)
resize container
std::vector< T, ALLOC > CT
static void resize(CT &ref, I *n, int d)
static auto getElementPtr(CT &ref)
get the linear storage pointer of a container
QMCTraits::FullPrecRealType value_type
static size_t getSize(const CT &ref)