diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-03-30 14:55:54 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-03-30 14:55:54 -0700 |
commit | 35722fa0222a7f99a8179d75244177a9801ea36b (patch) | |
tree | 151d3b1e7dac4b322afd00f719d5e0934dd542e1 /unsupported/test/cxx11_tensor_mixed_indices.cpp | |
parent | 71950f02e573bcffa589e83f188bc64b717af1c7 (diff) |
Made the index type a template parameter of the tensor class instead of encoding it in the options.
Diffstat (limited to 'unsupported/test/cxx11_tensor_mixed_indices.cpp')
-rw-r--r-- | unsupported/test/cxx11_tensor_mixed_indices.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/unsupported/test/cxx11_tensor_mixed_indices.cpp b/unsupported/test/cxx11_tensor_mixed_indices.cpp index 8a12f9207..72f826216 100644 --- a/unsupported/test/cxx11_tensor_mixed_indices.cpp +++ b/unsupported/test/cxx11_tensor_mixed_indices.cpp @@ -11,13 +11,11 @@ #include <Eigen/CXX11/Tensor> -using Eigen::Tensor; -using Eigen::RowMajor; static void test_simple() { - Tensor<float, 1> vec1({6}); - Tensor<float, 1, Index32Bit> vec2({6}); + Tensor<float, 1, ColMajor> vec1({6}); + Tensor<float, 1, ColMajor, int> vec2({6}); vec1(0) = 4.0; vec2(0) = 0.0; vec1(1) = 8.0; vec2(1) = 1.0; @@ -27,10 +25,10 @@ static void test_simple() vec1(5) = 42.0; vec2(5) = 5.0; float data3[6]; - TensorMap<Tensor<float, 1>> vec3(data3, 6); + TensorMap<Tensor<float, 1, ColMajor>> vec3(data3, 6); vec3 = vec1.sqrt(); float data4[6]; - TensorMap<Tensor<float, 1, Index32Bit>> vec4(data4, 6); + TensorMap<Tensor<float, 1, ColMajor, int>> vec4(data4, 6); vec4 = vec2.square(); VERIFY_IS_APPROX(vec3(0), sqrtf(4.0)); |