diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-03-21 14:45:57 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-03-21 14:45:57 +0100 |
| commit | 135c8751041961ef7f66502926d770b93539c252 (patch) | |
| tree | a428374abaec913a029ad8f9d5a966b73274a02c /modules/codec/tests | |
| parent | ec4e2ec0ec6261a402c71cc8d803c2d30bb3b48c (diff) | |
| download | forstio-forstio-135c8751041961ef7f66502926d770b93539c252.tar.gz | |
iterators and fill ops
Diffstat (limited to 'modules/codec/tests')
| -rw-r--r-- | modules/codec/tests/math.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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<sch::Vector<sch::Int32,3u>> b{{{1,3,5}}}; } +SAW_TEST("Math/Tensor Fill"){ + using namespace saw; + + auto tensor = math::fill<sch::Float64,2u,2u>({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; |
