Xped
Loading...
Searching...
No Matches
TensorInterface.hpp
Go to the documentation of this file.
1#ifndef TENSORINTERFACE_HPP__
2#define TENSORINTERFACE_HPP__
3
4#include <string>
5
6namespace Xped {
7
9{
10 const std::string name() const { return "Eigen"; }
11};
12
14{
15 const std::string name() const { return "ndarray"; }
16};
17
19{
20 const std::string name() const { return "CTF Tensor"; }
21};
22
23#ifdef XPED_USE_ARRAY_TENSOR_LIB
24# define M_TENSORLIB ArrayTensorLib
25#elif defined(XPED_USE_EIGEN_TENSOR_LIB)
26# define M_TENSORLIB EigenTensorLib
27#elif defined(XPED_USE_CYCLOPS_TENSOR_LIB)
28# define M_TENSORLIB CyclopsTensorLib
29#endif
30
31// template <typename Library>
32// struct TensorInterface
33// {
34// constructor with dim array [x] [x]
35// constructor with map [x] [x]
36
37// initialization
38// setZero [x] [x]
39// setRandom [x] [x]
40// setConstant [x] [x]
41
42// contract [x] [x]
43// shuffle [x] [x]
44
45// lvalue methods
46// shuffle ??? <-- not in Eigen
47// reshape with dims [x] [x]
48// slice [x] [x]
49
50// tensorProd [x] [x]
51
52// return dimensions [x] [x]
53// };
54
55} // namespace Xped
56
57#include "seq/seq.h"
58
59#if defined XPED_USE_EIGEN_TENSOR_LIB
60# define EIGEN_DENSEBASE_PLUGIN "Xped/Util/EigenPlugins.hpp"
62#elif defined XPED_USE_ARRAY_TENSOR_LIB
64#elif defined XPED_USE_CYCLOPS_TENSOR_LIB
66#else
67# error "You specified an unsupported plain tensor library."
68#endif
69
70#endif
Definition: bench.cpp:62
Definition: TensorInterface.hpp:14
const std::string name() const
Definition: TensorInterface.hpp:15
Definition: TensorInterface.hpp:19
const std::string name() const
Definition: TensorInterface.hpp:20
Definition: TensorInterface.hpp:9
const std::string name() const
Definition: TensorInterface.hpp:10