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) \
89 template<> 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; \
99 template<> class TensorTypeFromId<num> {\
111 #ifdef HAVE_LONG_LONG
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"
123 #ifdef HAVE_LONG_LONG
145 template <
typename TypeData,
typename,
bool = TypeData::supported>
148 template <
typename TypeData,
typename ReturnType>
163 template <
typename leftT,
typename rightT>
166 #define SPEC(L,R,T) \
167 template <> struct TensorResultType<L,R> {typedef T type;}; \
168 template <> struct TensorResultType<R,L> {typedef T type;}
169 #define DPEC(L,R,T) \
170 template <> struct TensorResultType<L,L> {typedef T type;}
194 #ifdef HAVE_LONG_LONG
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
File holds all helper structures necessary for the CC_Operator and CC2 class.
Definition: DFParameters.h:10
const char * tensor_type_names[]
TYPEINFO(0, int, false, true, int, double)
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 TENSOR_MAX_TYPE_ID
Definition: type_data.h:115