cxx11_tensor_empty.cpp
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #include "main.h"
11 
12 #include <Eigen/CXX11/Tensor>
13 
14 
15 static void test_empty_tensor()
16 {
17  Tensor<float, 2> source;
18  Tensor<float, 2> tgt1 = source;
19  Tensor<float, 2> tgt2(source);
20  Tensor<float, 2> tgt3;
21  tgt3 = tgt1;
22  tgt3 = tgt2;
23 }
24 
26 {
28  TensorFixedSize<float, Sizes<0> > tgt1 = source;
29  TensorFixedSize<float, Sizes<0> > tgt2(source);
31  tgt3 = tgt1;
32  tgt3 = tgt2;
33 }
34 
35 
36 EIGEN_DECLARE_TEST(cxx11_tensor_empty)
37 {
40 }
static void test_empty_tensor()
EIGEN_DECLARE_TEST(cxx11_tensor_empty)
static void test_empty_fixed_size_tensor()
The fixed sized version of the tensor class.
#define CALL_SUBTEST(FUNC)
Definition: main.h:399
The tensor class.
Definition: Tensor.h:63


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:07