36#ifndef MADNESS_TENSOR_TYPE_DATA_H__INCLUDED
37#define MADNESS_TENSOR_TYPE_DATA_H__INCLUDED
88#define TYPEINFO(num, T, iscmplx, mcpyok, realT,floatrealT) \
89template<> class TensorTypeData<T> {\
92 enum {supported = true}; \
93 enum {iscomplex = iscmplx}; \
94 enum {memcopyok = mcpyok}; \
96 typedef realT scalar_type; \
97 typedef floatrealT float_scalar_type; \
99template<> class TensorTypeFromId<num> {\
112 TYPEINFO(6,
long long,
false,
true,
long long,
double);
113#define TENSOR_MAX_TYPE_ID 6
115#define TENSOR_MAX_TYPE_ID 5
122 "int",
"long",
"float",
"double",
"float_complex",
"double_complex"
145 template <
typename TypeData,
typename,
bool = TypeData::supported>
148 template <
typename TypeData,
typename ReturnType>
163 template <
typename leftT,
typename rightT>
167 template <> struct TensorResultType<L,R> {typedef T type;}; \
168 template <> struct TensorResultType<R,L> {typedef T type;}
170 template <> struct TensorResultType<L,L> {typedef T type;}
195 SPEC(
int,
long long,
long long);
196 SPEC(
long,
long long,
long long);
197 DPEC(
long long,
long long,
long long);
198 SPEC(
long long,
float,
float);
199 SPEC(
long long,
double,
double);
205#define TENSOR_RESULT_TYPE(L,R) typename TensorResultType<L,R>::type
std::complex< double > double_complex
Definition cfft.h:14
Traits class to specify support of numeric types.
Definition type_data.h:56
This provides the reverse mapping from integer id to type name.
Definition type_data.h:83
long type
Definition type_data.h:85
Namespace for all elements and tools of MADNESS.
Definition DFParameters.h:10
const char * tensor_type_names[]
std::complex< float > float_complex
Definition ran.h:39
ReturnType type
Definition type_data.h:150
Definition type_data.h:146
TensorResultType<L,R>::type is the type of (L op R) where op is nominally multiplication.
Definition type_data.h:164
#define DPEC(L, R, T)
Definition type_data.h:169
#define TYPEINFO(num, T, iscmplx, mcpyok, realT, floatrealT)
Definition type_data.h:88
#define SPEC(L, R, T)
Definition type_data.h:166
#define TENSOR_MAX_TYPE_ID
Definition type_data.h:115