Skip to content
Snippets Groups Projects
Commit 60b22353 authored by laurent soulier's avatar laurent soulier
Browse files

[UT] unit test for "view" cosntruction

parent c15bf948
No related branches found
No related tags found
1 merge request!9Refactoring Tensor
Pipeline #33045 failed
...@@ -193,18 +193,18 @@ TEST_CASE("Tensor extract") ...@@ -193,18 +193,18 @@ TEST_CASE("Tensor extract")
Rainbow.setDatatype(DataType::UInt16); Rainbow.setDatatype(DataType::UInt16);
Rainbow.setBackend("cpu"); Rainbow.setBackend("cpu");
MakeRainbow<std::uint16_t>(Rainbow); MakeRainbow<std::uint16_t>(Rainbow);
// Tensor view(Rainbow, {2, 2, 3}, {0, 1, 1}); Tensor view(Rainbow, {2, 2, 3}, {0, 1, 1});
// for (Coord_t a = 0; a < view.dims()[0]; ++a) for (Coord_t a = 0; a < view.dims()[0]; ++a)
// { {
// for (Coord_t b = 0; b < view.dims()[1]; ++b) for (Coord_t b = 0; b < view.dims()[1]; ++b)
// { {
// for (Coord_t c = 0; c < view.dims()[2]; ++c) for (Coord_t c = 0; c < view.dims()[2]; ++c)
// { {
// REQUIRE( REQUIRE(
// view.get<std::uint16_t>({a, b + 1, c + 1}) view.get<std::uint16_t>({a, b + 1, c + 1})
// == Rainbow.get<std::uint16_t>({a, b + 1, c + 1})); == Rainbow.get<std::uint16_t>({a, b + 1, c + 1}));
// } }
// } }
// } }
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment