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 15static 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 25static void test_empty_fixed_size_tensor() 26{ 27 TensorFixedSize<float, Sizes<0> > source; 28 TensorFixedSize<float, Sizes<0> > tgt1 = source; 29 TensorFixedSize<float, Sizes<0> > tgt2(source); 30 TensorFixedSize<float, Sizes<0> > tgt3; 31 tgt3 = tgt1; 32 tgt3 = tgt2; 33} 34 35 36void test_cxx11_tensor_empty() 37{ 38 CALL_SUBTEST(test_empty_tensor()); 39 CALL_SUBTEST(test_empty_fixed_size_tensor()); 40} 41