mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Cleanup
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
81c928ba55
commit
970640519b
@@ -16,7 +16,6 @@
|
||||
|
||||
#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t
|
||||
#define EIGEN_USE_SYCL
|
||||
#define EIGEN_HAS_CONSTEXPR 1
|
||||
|
||||
#include "main.h"
|
||||
|
||||
|
||||
@@ -116,15 +116,7 @@ static void test_static_broadcasting()
|
||||
Tensor<float, 3, DataLayout> tensor(8,3,5);
|
||||
tensor.setRandom();
|
||||
|
||||
#if defined(EIGEN_HAS_INDEX_LIST)
|
||||
Eigen::IndexList<Eigen::type2index<2>, Eigen::type2index<3>, Eigen::type2index<4>> broadcasts;
|
||||
#else
|
||||
Eigen::array<int, 3> broadcasts;
|
||||
broadcasts[0] = 2;
|
||||
broadcasts[1] = 3;
|
||||
broadcasts[2] = 4;
|
||||
#endif
|
||||
|
||||
Tensor<float, 3, DataLayout> broadcast;
|
||||
broadcast = tensor.broadcast(broadcasts);
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
|
||||
#include <Eigen/CXX11/Tensor>
|
||||
|
||||
#ifdef EIGEN_HAS_INDEX_LIST
|
||||
|
||||
static void test_static_index_list()
|
||||
{
|
||||
Tensor<float, 4> tensor(2,3,5,7);
|
||||
@@ -370,16 +368,12 @@ static void test_dim_check()
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
EIGEN_DECLARE_TEST(cxx11_tensor_index_list)
|
||||
{
|
||||
#ifdef EIGEN_HAS_INDEX_LIST
|
||||
CALL_SUBTEST(test_static_index_list());
|
||||
CALL_SUBTEST(test_type2index_list());
|
||||
CALL_SUBTEST(test_type2indexpair_list());
|
||||
CALL_SUBTEST(test_dynamic_index_list());
|
||||
CALL_SUBTEST(test_mixed_index_list());
|
||||
CALL_SUBTEST(test_dim_check());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ static void test_simple_reshape()
|
||||
|
||||
template <typename>
|
||||
static void test_static_reshape() {
|
||||
#if defined(EIGEN_HAS_INDEX_LIST)
|
||||
using Eigen::type2index;
|
||||
|
||||
Tensor<float, 5> tensor(2, 3, 1, 7, 1);
|
||||
@@ -60,7 +59,6 @@ static void test_static_reshape() {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename>
|
||||
|
||||
@@ -370,13 +370,7 @@ static void test_static_dims() {
|
||||
Tensor<float, 2, DataLayout> out(72, 97);
|
||||
in.setRandom();
|
||||
|
||||
#if !EIGEN_HAS_CONSTEXPR
|
||||
array<int, 2> reduction_axis;
|
||||
reduction_axis[0] = 1;
|
||||
reduction_axis[1] = 3;
|
||||
#else
|
||||
Eigen::IndexList<Eigen::type2index<1>, Eigen::type2index<3> > reduction_axis;
|
||||
#endif
|
||||
|
||||
out = in.maximum(reduction_axis);
|
||||
|
||||
@@ -400,14 +394,8 @@ static void test_innermost_last_dims() {
|
||||
in.setRandom();
|
||||
|
||||
// Reduce on the innermost dimensions.
|
||||
#if !EIGEN_HAS_CONSTEXPR
|
||||
array<int, 2> reduction_axis;
|
||||
reduction_axis[0] = 0;
|
||||
reduction_axis[1] = 1;
|
||||
#else
|
||||
// This triggers the use of packets for ColMajor.
|
||||
Eigen::IndexList<Eigen::type2index<0>, Eigen::type2index<1> > reduction_axis;
|
||||
#endif
|
||||
|
||||
out = in.maximum(reduction_axis);
|
||||
|
||||
@@ -431,14 +419,8 @@ static void test_innermost_first_dims() {
|
||||
in.setRandom();
|
||||
|
||||
// Reduce on the innermost dimensions.
|
||||
#if !EIGEN_HAS_CONSTEXPR
|
||||
array<int, 2> reduction_axis;
|
||||
reduction_axis[0] = 2;
|
||||
reduction_axis[1] = 3;
|
||||
#else
|
||||
// This triggers the use of packets for RowMajor.
|
||||
Eigen::IndexList<Eigen::type2index<2>, Eigen::type2index<3>> reduction_axis;
|
||||
#endif
|
||||
|
||||
out = in.maximum(reduction_axis);
|
||||
|
||||
@@ -462,14 +444,8 @@ static void test_reduce_middle_dims() {
|
||||
in.setRandom();
|
||||
|
||||
// Reduce on the innermost dimensions.
|
||||
#if !EIGEN_HAS_CONSTEXPR
|
||||
array<int, 2> reduction_axis;
|
||||
reduction_axis[0] = 1;
|
||||
reduction_axis[1] = 2;
|
||||
#else
|
||||
// This triggers the use of packets for RowMajor.
|
||||
Eigen::IndexList<Eigen::type2index<1>, Eigen::type2index<2>> reduction_axis;
|
||||
#endif
|
||||
|
||||
out = in.maximum(reduction_axis);
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t
|
||||
#define EIGEN_USE_SYCL
|
||||
#define EIGEN_HAS_CONSTEXPR 1
|
||||
|
||||
#include "main.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user