diff options
author | Arne H Juul <arnej27959@users.noreply.github.com> | 2021-02-03 10:34:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-03 10:34:54 +0100 |
commit | 2319ebb2fbbc87ac54448ec6a433a0f99aab940c (patch) | |
tree | 5d151061b358d16f1e1306f97a34bf4ad1bd0407 /eval/src/tests/instruction/generic_map | |
parent | 16f3270ea7a600f5baceeea8003a026b326f8801 (diff) | |
parent | 9b3a2d5fdbc00c304b1da6e7a15c57dcbdab2c8e (diff) |
Merge pull request #16347 from vespa-engine/arnej/genspec-review-followup
followup on GenSpec after review
Diffstat (limited to 'eval/src/tests/instruction/generic_map')
-rw-r--r-- | eval/src/tests/instruction/generic_map/generic_map_test.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/eval/src/tests/instruction/generic_map/generic_map_test.cpp b/eval/src/tests/instruction/generic_map/generic_map_test.cpp index aaa8990d794..8e39fa68072 100644 --- a/eval/src/tests/instruction/generic_map/generic_map_test.cpp +++ b/eval/src/tests/instruction/generic_map/generic_map_test.cpp @@ -19,9 +19,9 @@ using vespalib::make_string_short::fmt; GenSpec::seq_t N_16ths = [] (size_t i) noexcept { return (i + 1.0) / 16.0; }; -GenSpec G() { return GenSpec().cells_float().seq(N_16ths); } +GenSpec G() { return GenSpec().seq(N_16ths); } -std::vector<GenSpec> map_layouts = { +const std::vector<GenSpec> map_layouts = { G(), G().idx("x", 3), G().idx("x", 3).idx("y", 5), @@ -43,7 +43,9 @@ TensorSpec perform_generic_map(const TensorSpec &a, map_fun_t func, const ValueB void test_generic_map_with(const ValueBuilderFactory &factory) { for (const auto &layout : map_layouts) { - for (TensorSpec lhs : { layout.gen(), layout.cpy().cells_double().gen() }) { + for (TensorSpec lhs : { layout.cpy().cells_float().gen(), + layout.cpy().cells_double().gen() }) + { for (auto func : {operation::Floor::f, operation::Fabs::f, operation::Square::f, operation::Inv::f}) { SCOPED_TRACE(fmt("\n===\nLHS: %s\n===\n", lhs.to_string().c_str())); auto expect = ReferenceOperations::map(lhs, func); |