13 #include <type_traits>
21 namespace MultiDimensional {
25 template <
class Executor>
28 template <
class Executor>
31 template <
class Ops,
class TensorPtr>
32 TensorPtr
calc2(TensorPtr origin,
const IContainer& other, Ops op, std::string opName) {
34 if (result ==
nullptr) {
35 throw Error(
"Unable to "+opName);
37 if (result != origin.get()) {
43 template <
class Ops,
class TensorPtr>
44 TensorPtr
calc1(TensorPtr origin, Ops op, std::string opName) {
46 if (result ==
nullptr) {
47 throw Error(
"Unable to " + opName);
49 if (result != origin.get()) {
Loki::StaticDoubleDispatcher< Executor, IContainer, TensorDataTypes, false, const IContainer, ConstTensorDataTypes, IContainer * > BinaryDispatch
Loki::TypeList< VectorContainer, SparseContainer, OuterContainer > TensorDataTypes
TensorPtr calc1(TensorPtr origin, Ops op, std::string opName)
Loki::TypeList< const VectorContainer, const SparseContainer, const OuterContainer > ConstTensorDataTypes
static ResultType Go(BaseLhs &lhs, Executor &exec)
TensorPtr calc2(TensorPtr origin, const IContainer &other, Ops op, std::string opName)
Hammer exception definitions.
static ResultType Go(BaseLhs &lhs, BaseRhs &rhs, Executor &exec)
Tensor operations forward type declarations.
Double dispatcher code based on examples from A.Alexandrescu's book.