Remove slow index check in Tensor::resize from release mode.

This commit is contained in:
Rasmus Munk Larsen
2024-03-18 23:43:25 +00:00
parent 386e2079e4
commit d3cd312652
6 changed files with 25 additions and 149 deletions

View File

@@ -47,13 +47,7 @@ static void test_static_dimension_failure() {
// This can be worked around in this case.
Tensor<int, 3, DataLayout> concatenation = left.reshape(Tensor<int, 3>::Dimensions(2, 3, 1)).concatenate(right, 0);
Tensor<int, 2, DataLayout> alternative = left
// Clang compiler break with {{{}}} with an ambiguous error on copy
// constructor the variadic DSize constructor added for #ifndef
// EIGEN_EMULATE_CXX11_META_H. Solution: either the code should change to
// Tensor<int, 2>::Dimensions{{2, 3}}
// or Tensor<int, 2>::Dimensions{Tensor<int, 2>::Dimensions{{2, 3}}}
.concatenate(right.reshape(Tensor<int, 2>::Dimensions(2, 3)), 0);
Tensor<int, 2, DataLayout> alternative = left.concatenate(right.reshape(Tensor<int, 2>::Dimensions(2, 3)), 0);
}
template <int DataLayout>