mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Fix a few compiler warnings in CXX11 tests.
This commit is contained in:
parent
59bba77ead
commit
aebdb06424
@ -471,7 +471,7 @@ static void test_tensor_product()
|
||||
mat1.setRandom();
|
||||
mat2.setRandom();
|
||||
|
||||
Tensor<float, 4, DataLayout> result = mat1.contract(mat2, Eigen::array<DimPair, 0>{{}});
|
||||
Tensor<float, 4, DataLayout> result = mat1.contract(mat2, Eigen::array<DimPair, 0>{});
|
||||
|
||||
VERIFY_IS_EQUAL(result.dimension(0), 2);
|
||||
VERIFY_IS_EQUAL(result.dimension(1), 3);
|
||||
@ -553,7 +553,7 @@ static void test_large_contraction_with_output_kernel() {
|
||||
|
||||
m_result = m_left * m_right;
|
||||
|
||||
for (size_t i = 0; i < t_result.dimensions().TotalSize(); i++) {
|
||||
for (std::ptrdiff_t i = 0; i < t_result.dimensions().TotalSize(); i++) {
|
||||
VERIFY(&t_result.data()[i] != &m_result.data()[i]);
|
||||
VERIFY_IS_APPROX(t_result.data()[i], std::sqrt(m_result.data()[i]));
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ static void test_evals()
|
||||
|
||||
Tensor<float, 2, DataLayout> result(2,3);
|
||||
result.setZero();
|
||||
Eigen::array<Tensor<float, 2>::Index, 1> dims3{{0}};
|
||||
Eigen::array<Tensor<float, 2>::Index, 1> dims3{0};
|
||||
|
||||
typedef TensorEvaluator<decltype(input.convolve(kernel, dims3)), DefaultDevice> Evaluator;
|
||||
Evaluator eval(input.convolve(kernel, dims3), DefaultDevice());
|
||||
|
@ -170,7 +170,6 @@ static void test_type2indexpair_list()
|
||||
typedef Eigen::IndexPairList<Eigen::type2indexpair<0,10>, Eigen::IndexPair<DenseIndex>, Eigen::type2indexpair<2,12>> Dims2_b;
|
||||
typedef Eigen::IndexPairList<Eigen::IndexPair<DenseIndex>, Eigen::type2indexpair<1,11>, Eigen::IndexPair<DenseIndex>> Dims2_c;
|
||||
|
||||
Dims0 d0;
|
||||
Dims2_a d2_a;
|
||||
|
||||
Dims2_b d2_b;
|
||||
|
@ -9,6 +9,9 @@
|
||||
// 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"
|
||||
|
||||
#ifdef EIGEN_TEST_PART_1
|
||||
|
||||
#include "sparse.h"
|
||||
@ -236,8 +239,6 @@ EIGEN_DECLARE_TEST(kronecker_product)
|
||||
#ifdef EIGEN_TEST_PART_2
|
||||
|
||||
// simply check that for a dense kronecker product, sparse module is not needed
|
||||
|
||||
#include "main.h"
|
||||
#include <Eigen/KroneckerProduct>
|
||||
|
||||
EIGEN_DECLARE_TEST(kronecker_product)
|
||||
|
Loading…
Reference in New Issue
Block a user