From 135c8751041961ef7f66502926d770b93539c252 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sat, 21 Mar 2026 14:45:57 +0100 Subject: iterators and fill ops --- modules/codec/tests/math.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'modules/codec/tests/math.cpp') diff --git a/modules/codec/tests/math.cpp b/modules/codec/tests/math.cpp index 63b6d2b..5f4de92 100644 --- a/modules/codec/tests/math.cpp +++ b/modules/codec/tests/math.cpp @@ -28,6 +28,19 @@ SAW_TEST("Math/Tensor Construction"){ // data> b{{{1,3,5}}}; } +SAW_TEST("Math/Tensor Fill"){ + using namespace saw; + + auto tensor = math::fill({2.5}); + + bool cf{true}; + for(uint64_t i = 0u; i < 2u; ++i){ + for(uint64_t j = 0u; j < 2u; ++j){ + SAW_EXPECT((tensor.at({{i,j}}).get() == 2.5), "Wasn't filled with value 2.5"); + } + } +} + SAW_TEST("Math/Tensor"){ using namespace saw; -- cgit v1.2.3