MADNESS 0.10.1
Classes | Namespaces | Macros | Functions | Variables
type_data.h File Reference

Defines and implements TensorTypeData, a type traits class. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  madness::IsSupported< TypeData, ReturnType, true >
 
struct  madness::TensorResultType< leftT, rightT >
 TensorResultType<L,R>::type is the type of (L op R) where op is nominally multiplication. More...
 
class  madness::TensorTypeFromId< id >
 This provides the reverse mapping from integer id to type name. More...
 

Namespaces

namespace  madness
 Namespace for all elements and tools of MADNESS.
 

Macros

#define DPEC(L, R, T)    template <> struct TensorResultType<L,L> {typedef T type;}
 
#define SPEC(L, R, T)
 
#define TENSOR_MAX_TYPE_ID   5
 
#define TENSOR_RESULT_TYPE(L, R)   typename TensorResultType<L,R>::type
 This macro simplifies access to TensorResultType.
 
#define TYPEINFO(num, T, iscmplx, mcpyok, realT, floatrealT)
 

Functions

 madness::DPEC (double, double, double)
 
 madness::DPEC (double_complex, double_complex, double_complex)
 
 madness::DPEC (float, float, float)
 
 madness::DPEC (float_complex, float_complex, float_complex)
 
 madness::DPEC (int, int, int)
 
 madness::DPEC (long, long, long)
 
 madness::SPEC (double, double_complex, double_complex)
 
 madness::SPEC (double, float_complex, float_complex)
 
 madness::SPEC (float, double, double)
 
 madness::SPEC (float, double_complex, double_complex)
 
 madness::SPEC (float, float_complex, float_complex)
 
 madness::SPEC (float_complex, double_complex, double_complex)
 
 madness::SPEC (int, double, double)
 
 madness::SPEC (int, double_complex, double_complex)
 
 madness::SPEC (int, float, float)
 
 madness::SPEC (int, float_complex, float_complex)
 
 madness::SPEC (int, long, long)
 
 madness::SPEC (long, double, double)
 
 madness::SPEC (long, double_complex, double_complex)
 
 madness::SPEC (long, float, float)
 
 madness::SPEC (long, float_complex, float_complex)
 
 madness::TYPEINFO (0, int, false, true, int, double)
 
 madness::TYPEINFO (1, long, false, true, long, double)
 
 madness::TYPEINFO (2, float, false, true, float, float)
 
 madness::TYPEINFO (3, double, false, true, double, double)
 
 madness::TYPEINFO (4, float_complex, true, true, float, float)
 
 madness::TYPEINFO (5, double_complex, true, true, double, double)
 

Variables

const char * madness::tensor_type_names []
 

Detailed Description

Defines and implements TensorTypeData, a type traits class.

Macro Definition Documentation

◆ DPEC

#define DPEC (   L,
  R,
  T 
)     template <> struct TensorResultType<L,L> {typedef T type;}

◆ SPEC

#define SPEC (   L,
  R,
  T 
)
Value:
template <> struct TensorResultType<L,R> {typedef T type;}; \
template <> struct TensorResultType<R,L> {typedef T type;}
static const double R
Definition csqrt.cc:46
auto T(World &world, response_space &f) -> response_space
Definition global_functions.cc:34
static const double L
Definition rk.cc:46

◆ TENSOR_MAX_TYPE_ID

#define TENSOR_MAX_TYPE_ID   5

◆ TENSOR_RESULT_TYPE

#define TENSOR_RESULT_TYPE (   L,
  R 
)    typename TensorResultType<L,R>::type

This macro simplifies access to TensorResultType.

◆ TYPEINFO

#define TYPEINFO (   num,
  T,
  iscmplx,
  mcpyok,
  realT,
  floatrealT 
)
Value:
template<> class TensorTypeData<T> {\
public: \
enum {id = num}; \
enum {supported = true}; \
enum {iscomplex = iscmplx}; \
enum {memcopyok = mcpyok}; \
typedef T type; \
typedef realT scalar_type; \
typedef floatrealT float_scalar_type; \
}; \
template<> class TensorTypeFromId<num> {\
public: \
typedef T type; \
}
std::string type(const PairType &n)
Definition PNOParameters.h:18