return true;
}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup() {
const Index numValues = internal::array_prod(m_impl.dimensions());
for (Index i = 0; i < numValues; ++i)
m_buffer[i].~CoeffReturnType();
m_device.deallocate(m_buffer);
m_buffer = NULL;
ei_add_test(cxx11_tensor_roundings)
ei_add_test(cxx11_tensor_layout_swap)
ei_add_test(cxx11_tensor_io)
ei_add_test(cxx11_tensor_string_leak)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
# This test requires __uint128_t which is only available on 64bit systems
ei_add_test(cxx11_tensor_uint128)
-
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include "main.h"
#include <Eigen/CXX11/Tensor>
#include <Eigen/Core>
using Eigen::Tensor;
static void test_simple() {
std::string strs[2] = {"OK", "OK"};
TensorMap<Tensor<std::string, 1> > str_tensor(strs, 2);
std::cout << str_tensor;
void test_cxx11_tensor_string_leak() { CALL_SUBTEST(test_simple()); }