ExaTN
tensor_basic.hpp
1 
7 #ifndef EXATN_NUMERICS_TENSOR_BASIC_HPP_
8 #define EXATN_NUMERICS_TENSOR_BASIC_HPP_
9 
10 #include <cstdint>
11 
12 namespace exatn{
13 
14 using Int4 = int32_t;
15 using Int8 = int64_t;
16 using UInt4 = uint32_t;
17 using UInt8 = uint64_t;
18 
19 using SpaceId = unsigned int; //space id type
20 using SubspaceId = unsigned long long int; //subspace id type
21 using SymmetryId = int; //symmetry id type
22 using DimExtent = unsigned long long int; //dimension extent type
23 using DimOffset = unsigned long long int; //dimension base offset type
24 
25 using ScopeId = unsigned int; //TAProL scope ID type
26 
27 constexpr DimExtent MAX_SPACE_DIM = 0xFFFFFFFFFFFFFFFF; //max dimension of unregistered (anonymous) spaces
28 constexpr SpaceId SOME_SPACE = 0; //any unregistered (anonymous) space (all registered spaces will have SpaceId > 0)
29 constexpr SubspaceId FULL_SUBSPACE = 0; //every space has its trivial (full) subspace automatically registered as subspace 0
30 constexpr SubspaceId UNREG_SUBSPACE = 0xFFFFFFFFFFFFFFFF; //id of any unregistered subspace
31 
32 enum class LegDirection{
33  UNDIRECT, //no direction
34  INWARD, //inward direction
35  OUTWARD //outward direction
36 };
37 
38 enum class TensorOpCode{
39  NOOP, //no operation
40  CREATE, //tensor creation
41  DESTROY, //tensor destruction
42  TRANSFORM, //tensor transformation/initialization
43  ADD, //tensor addition
44  CONTRACT //tensor contraction
45 };
46 
47 enum class TensorElementType{
48  VOID,
49  REAL16,
50  REAL32,
51  REAL64,
52  COMPLEX16,
53  COMPLEX32,
54  COMPLEX64
55 };
56 
57 } //namespace exatn
58 
59 #endif //EXATN_NUMERICS_TENSOR_BASIC_HPP_
exatn
Definition: DriverClient.hpp:10