| 68 | |
| 69 | |
| 70 | static void test_multiple_dims() |
| 71 | { |
| 72 | Tensor<float, 3> input(3,5,7); |
| 73 | input.setRandom(); |
| 74 | |
| 75 | TensorRef<Tensor<float, 3>> ref(input); |
| 76 | VERIFY_IS_EQUAL(ref.data(), input.data()); |
| 77 | VERIFY_IS_EQUAL(ref.dimension(0), 3); |
| 78 | VERIFY_IS_EQUAL(ref.dimension(1), 5); |
| 79 | VERIFY_IS_EQUAL(ref.dimension(2), 7); |
| 80 | |
| 81 | for (int i = 0; i < 3; ++i) { |
| 82 | for (int j = 0; j < 5; ++j) { |
| 83 | for (int k = 0; k < 7; ++k) { |
| 84 | VERIFY_IS_EQUAL(ref(i,j,k), input(i,j,k)); |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | |
| 91 | static void test_slice() |
no test coverage detected