13 #include <Eigen/CXX11/Tensor> 16 template<
int DataLayout>
30 template<
int DataLayout>
34 for (
int i = 0;
i < 5; ++
i) {
41 std::string
expected(
"0\n1\n2\n3\n4");
45 std::stringstream empty_os;
46 empty_os << empty_tensor;
47 std::string empty_string;
52 template<
int DataLayout>
56 for (
int i = 0;
i < 5; ++
i) {
57 for (
int j = 0;
j < 3; ++
j) {
65 std::string
expected(
"0 0 0\n0 1 2\n0 2 4\n0 3 6\n0 4 8");
70 template<
int DataLayout>
75 for (
int i = 0;
i < 5; ++
i) {
81 os << tensor1 + tensor2;
83 std::string
expected(
" 7\n 8\n 9\n10\n11");
88 template<
int DataLayout>
94 std::cout << tensor << std::endl;
99 std::string
expected(
"foo foo foo\nfoo foo foo\nfoo foo foo\nfoo foo foo\nfoo foo foo");
104 template<
int DataLayout>
108 for (
int i = 0;
i < 5; ++
i) {
114 std::stringstream
os;
117 std::string
expected(
"0\n1\n2\n3\n4");
static void test_output_0d()
static void test_output_const()
EIGEN_DECLARE_TEST(cxx11_tensor_io)
static void test_output_string()
#define VERIFY_IS_EQUAL(a, b)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Tensor< Scalar_, NumIndices_, Options_, IndexType_ > & setConstant(const Scalar &val)
static void test_output_expr()
A tensor expression mapping an existing array of data.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar * data()
#define CALL_SUBTEST(FUNC)
ofstream os("timeSchurFactors.csv")
static void test_output_2d()
static void test_output_1d()