mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Some further cleanup
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
14c32c60f3
commit
cc11e240ac
@@ -20,7 +20,6 @@ using Eigen::Tensor;
|
||||
template <int DataLayout>
|
||||
static void test_map_as_index()
|
||||
{
|
||||
#ifdef EIGEN_HAS_SFINAE
|
||||
Tensor<float, 4, DataLayout> tensor(2, 3, 5, 7);
|
||||
tensor.setRandom();
|
||||
|
||||
@@ -35,14 +34,12 @@ static void test_map_as_index()
|
||||
|
||||
VERIFY_IS_EQUAL(tensor.coeff(coeffC), tensor.coeff(coeff));
|
||||
VERIFY_IS_EQUAL(tensor.coeffRef(coeffC), tensor.coeffRef(coeff));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
template <int DataLayout>
|
||||
static void test_matrix_as_index()
|
||||
{
|
||||
#ifdef EIGEN_HAS_SFINAE
|
||||
Tensor<float, 4, DataLayout> tensor(2, 3, 5, 7);
|
||||
tensor.setRandom();
|
||||
|
||||
@@ -53,14 +50,12 @@ static void test_matrix_as_index()
|
||||
|
||||
VERIFY_IS_EQUAL(tensor.coeff(coeffC), tensor.coeff(coeff));
|
||||
VERIFY_IS_EQUAL(tensor.coeffRef(coeffC), tensor.coeffRef(coeff));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
template <int DataLayout>
|
||||
static void test_varlist_as_index()
|
||||
{
|
||||
#ifdef EIGEN_HAS_SFINAE
|
||||
Tensor<float, 4, DataLayout> tensor(2, 3, 5, 7);
|
||||
tensor.setRandom();
|
||||
|
||||
@@ -68,14 +63,12 @@ static void test_varlist_as_index()
|
||||
|
||||
VERIFY_IS_EQUAL(tensor.coeff({1,2,4,1}), tensor.coeff(coeff));
|
||||
VERIFY_IS_EQUAL(tensor.coeffRef({1,2,4,1}), tensor.coeffRef(coeff));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
template <int DataLayout>
|
||||
static void test_sizes_as_index()
|
||||
{
|
||||
#ifdef EIGEN_HAS_SFINAE
|
||||
Tensor<float, 4, DataLayout> tensor(2, 3, 5, 7);
|
||||
tensor.setRandom();
|
||||
|
||||
@@ -84,7 +77,6 @@ static void test_sizes_as_index()
|
||||
|
||||
VERIFY_IS_EQUAL(tensor.coeff(coeffC), tensor.coeff(coeff));
|
||||
VERIFY_IS_EQUAL(tensor.coeffRef(coeffC), tensor.coeffRef(coeff));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user