sisi4s
Loading...
Searching...
No Matches
ComplexTensor.cxx File Reference
#include <math/ComplexTensor.hpp>
#include <util/Exception.hpp>
#include <util/Tensor.hpp>
#include <complex>
Include dependency graph for ComplexTensor.cxx:

Macros

#define AssertCompatibleTensorShapes(c, r, i)
 
#define AssertCompatibleTensorShape(c, r)
 
#define Indices(Tensor)
 

Macro Definition Documentation

◆ AssertCompatibleTensorShape

#define AssertCompatibleTensorShape (   c,
 
)
Value:
{ \
Assert((c).order == (r).order, "Incompatible tensor orders"); \
for (int k(0); k < c.order; ++k) \
Assert((c).lens[k] == (r).lens[k], "Incompatible tensor shapes"); \
}
#define Assert(condition, message)
Definition Exception.hpp:10

◆ AssertCompatibleTensorShapes

#define AssertCompatibleTensorShapes (   c,
  r,
 
)
Value:
{ \
Assert((c).order == (r).order && (c).order == (i).order, \
"Incompatible tensor orders"); \
for (int k(0); k < c.order; ++k) \
Assert((c).lens[k] == (r).lens[k] && (c).lens[k] == (i).lens[k], \
"Incompatible tensor shapes"); \
}

◆ Indices

#define Indices (   Tensor)
Value:
char indices[(Tensor).order]; \
for (int i(0); i < (Tensor).order; ++i) { indices[i] = 'a' + i; } \
indices[(Tensor).order] = 0