From 32ca11d6e5257af7c72debb3495231aa08dc93e6 Mon Sep 17 00:00:00 2001 From: Fahri Ali Rahman Date: Sun, 29 Oct 2023 22:42:23 +0700 Subject: [PATCH] Generalize single axis simd reduction to handle ndarray (#256) * update simd reduction evaluator to handle ndarray * update simd reduction indexing to handle ndarray * make macro NMTOOLS_CHECK_MESSAGE override-able * add avx & sse simd reduction tests for ndarray * add gcc vector extension reduction tests for ndarray * add simde avx512 reduction tests for ndarray * skip mulltiply.reduce tests --- .../array/eval/simd/evaluator/ufunc.hpp | 43 +- .../nmtools/array/eval/simd/index/ufunc.hpp | 67 +- include/nmtools/testing/testing.hpp | 2 + tests/simd/CMakeLists.txt | 2 + tests/simd/index/simd_reduction.cpp | 187 + tests/simd/x86/reduction_nd_avx.cpp | 3224 +++++++++++++++++ tests/simd/x86/reduction_nd_sse.cpp | 3224 +++++++++++++++++ tests/simde/CMakeLists.txt | 1 + tests/simde/avx512/reduction_nd.cpp | 3207 ++++++++++++++++ tests/vector/CMakeLists.txt | 3 + tests/vector/reduction_nd_vector128.cpp | 3224 +++++++++++++++++ tests/vector/reduction_nd_vector256.cpp | 3215 ++++++++++++++++ tests/vector/reduction_nd_vector512.cpp | 3207 ++++++++++++++++ 13 files changed, 19591 insertions(+), 15 deletions(-) create mode 100644 tests/simd/x86/reduction_nd_avx.cpp create mode 100644 tests/simd/x86/reduction_nd_sse.cpp create mode 100644 tests/simde/avx512/reduction_nd.cpp create mode 100644 tests/vector/reduction_nd_vector128.cpp create mode 100644 tests/vector/reduction_nd_vector256.cpp create mode 100644 tests/vector/reduction_nd_vector512.cpp diff --git a/include/nmtools/array/eval/simd/evaluator/ufunc.hpp b/include/nmtools/array/eval/simd/evaluator/ufunc.hpp index 66da3686c..7fa51032e 100644 --- a/include/nmtools/array/eval/simd/evaluator/ufunc.hpp +++ b/include/nmtools/array/eval/simd/evaluator/ufunc.hpp @@ -6,6 +6,7 @@ #include "nmtools/array/eval/simd/index.hpp" #include "nmtools/array/eval/simd/ufunc.hpp" #include "nmtools/array/eval/simd/bit_width.hpp" +#include "nmtools/array/index/insert_index.hpp" namespace nmtools::array { @@ -229,10 +230,6 @@ namespace nmtools::array } if constexpr (meta::is_index_v) { auto out_data_ptr = nmtools::data(output); - auto inp_dim = dim(*input_array_ptr); - if (inp_dim != 2) { - return false; - } using index::ReductionKind, index::SIMD; const auto n_elem_pack = meta::as_type_v; auto identity = [&]()->element_type{ @@ -247,10 +244,34 @@ namespace nmtools::array out_data_ptr[i] = identity; } auto inp_shape = nmtools::shape(*input_array_ptr); + auto reduction_axis = view.axis; + auto reduction_kind = (reduction_axis == -1) || ((int)reduction_axis == (int)(len(inp_shape)-1)) ? ReductionKind::HORIZONTAL : ReductionKind::VERTICAL; + // "normalize" the out shape as if keepdims=True + auto out_shape_ = [&](){ + using keepdims_type = decltype(view.keepdims); + if constexpr (is_none_v) { + return out_shape; + } else { + if constexpr (!keepdims_type::value) { + return index::insert_index(out_shape,1,reduction_axis); + } else { + return out_shape; + } + } + }(); + auto out_shape = [out_shape_](){ + // TODO: create "unwrap" function + if constexpr (meta::is_maybe_v) { + return *out_shape_; // assume success, TODO: error handling + } else { + return out_shape_; + } + }(); // vertical reduction - if (view.axis == 0) { + switch (reduction_kind) { + case ReductionKind::VERTICAL: { const auto reduction_kind = meta::as_type_v; - const auto enumerator = index::reduction_2d_enumerator(reduction_kind,n_elem_pack,out_shape,inp_shape); + const auto enumerator = index::reduction_2d_enumerator(reduction_kind,n_elem_pack,out_shape,inp_shape,reduction_axis); for (size_t i=0; i; - const auto enumerator = index::reduction_2d_enumerator(reduction_kind,n_elem_pack,out_shape,inp_shape); + const auto enumerator = index::reduction_2d_enumerator(reduction_kind,n_elem_pack,out_shape,inp_shape,reduction_axis); auto accum = op.set1(identity); for (size_t i=0; i + auto reduction_nd_reshape(meta::as_type, meta::as_type, const inp_shape_t& inp_shape, const out_shape_t&, [[maybe_unused]] axis_t axis) + { + using result_t = nmtools_array; + + auto result = result_t{}; + + auto dim = len(inp_shape); + + if constexpr (meta::is_resizable_v) { + result.resize(2); // strictly 2 + } + at(result,0) = 1; + at(result,1) = 1; + + if constexpr (reduction_kind == ReductionKind::HORIZONTAL) { + auto horizontal_axis = dim-1; // last + for (size_t i=0; i<(size_t)horizontal_axis; i++) { + at(result,0) *= at(inp_shape,i); + } + auto n_ops = at(inp_shape, horizontal_axis); + at(result,1) = n_ops; + } else if constexpr (reduction_kind == ReductionKind::VERTICAL) { + auto vertical_axis = dim; + int i = 0; + for (; i<=(int)axis; i++) { + at(result,0) *= at(inp_shape,i); + } + for (; i<(int)vertical_axis; i++) { + at(result,1) *= at(inp_shape,i); + } + } + if (dim == 1) { + at(result,0) = 1; + at(result,1) = at(inp_shape,0); + } + + return result; + } + template auto reduction_2d_shape(meta::as_type, meta::as_type, const inp_shape_t& inp_shape, const out_shape_t&) { @@ -156,8 +196,6 @@ namespace nmtools::index result.resize(2); // strictly 2 } - // assume out (and result) is 2D - constexpr auto row_idx = meta::ct_v<0>; constexpr auto col_idx = meta::ct_v<1>; @@ -174,6 +212,14 @@ namespace nmtools::index return result; } + + template + auto reduction_2d_shape(meta::as_type kind, meta::as_type n_elem_pack, const inp_shape_t& inp_shape, const out_shape_t& out_shape, axis_t axis) + { + auto inp_reshaped = reduction_nd_reshape(kind,n_elem_pack,inp_shape,out_shape,axis); + auto result = reduction_2d_shape(kind,n_elem_pack,inp_reshaped,out_shape); + return result; + } template auto reduction_2d(meta::as_type, meta::as_type, const simd_index_t& simd_index, const simd_shape_t&, const out_shape_t& out_shape, const inp_shape_t& inp_shape) @@ -184,8 +230,8 @@ namespace nmtools::index auto result = result_t {}; const auto n_ops = [&](){ - if (reduction_kind == ReductionKind::VERTICAL) { - return at(out_shape,meta::ct_v<-1>); + if constexpr (reduction_kind == ReductionKind::VERTICAL) { + return at(inp_shape,meta::ct_v<-1>); } else { return at(inp_shape,meta::ct_v<-1>); } @@ -206,11 +252,12 @@ namespace nmtools::index at(result,meta::ct_v<1>) = tagged_index_t{inp_tag,inp_index}; } else if constexpr (reduction_kind == ReductionKind::VERTICAL) { auto inp_offset = at(simd_index,meta::ct_v<0>) * at(inp_shape,meta::ct_v<1>); + auto out_offset = len(out_shape) > 1 ? (at(simd_index,meta::ct_v<0>) / (at(inp_shape,meta::ct_v<0>) / at(out_shape,meta::ct_v<0>))) * at(out_shape,meta::ct_v<-1>) : 0; auto out_index = at(simd_index,meta::ct_v<1>) * N_ELEM_PACK; auto inp_index = at(simd_index,meta::ct_v<1>) * N_ELEM_PACK; auto rel_scalar_index = n_simd * N_ELEM_PACK + (at(simd_index,meta::ct_v<1>) - n_simd); - out_index = out_index > n_ops ? rel_scalar_index : out_index; + out_index = out_index > n_ops ? (out_offset + rel_scalar_index) : (out_offset + out_index); inp_index = inp_index > n_ops ? (inp_offset + rel_scalar_index) : (inp_offset + inp_index); // prefer scalar instead of padding because scalar store for output @@ -228,8 +275,8 @@ namespace nmtools::index { using inp_shape_type = const inp_shape_t; using out_shape_type = const out_shape_t; - using simd_shape_type = const nmtools_array; + using simd_shape_type = meta::remove_cvref_t,meta::as_type_v,meta::declval(),meta::declval()))>; using simd_index_type = nmtools_array; using index_type = index_t; using size_type = index_t; @@ -268,6 +315,14 @@ namespace nmtools::index return enumerator_t{n_elem_pack,kind,out_shape,inp_shape}; } + template + constexpr auto reduction_2d_enumerator(meta::as_type kind, meta::as_type n_elem_pack, const out_shape_t& out_shape, const inp_shape_t& inp_shape, axis_t axis) + { + auto inp_reshaped = reduction_nd_reshape(kind,n_elem_pack,inp_shape,out_shape,axis); + auto out_reshaped = reduction_nd_reshape(kind,n_elem_pack,out_shape,out_shape,axis); + return reduction_2d_enumerator(kind,n_elem_pack,out_reshaped,inp_reshaped); + } + template constexpr auto outer_simd_shape(meta::as_type, const out_shape_t& out_shape, const lhs_shape_t& lhs_shape, const rhs_shape_t& rhs_shape) { diff --git a/include/nmtools/testing/testing.hpp b/include/nmtools/testing/testing.hpp index a1e72af79..55d827ebf 100644 --- a/include/nmtools/testing/testing.hpp +++ b/include/nmtools/testing/testing.hpp @@ -42,6 +42,7 @@ nmtools::utils::to_string(array) */ #define NMTOOLS_TESTING_LOG_TYPEINFO_IMPL_DOCTEST INFO +#ifndef NMTOOLS_CHECK_MESSAGE #if !defined(__EMSCRIPTEN__) && !defined(__ANDROID__) && !defined(__arm__) && !defined(__MINGW32__) #define NMTOOLS_CHECK_MESSAGE(result, message) \ { \ @@ -53,6 +54,7 @@ nmtools::utils::to_string(array) CHECK(result); \ } #endif // (__EMSCRIPTEN__ || __ANDROID__ || __arm__ || __MINGW32__) +#endif // NMTOOLS_CHECK_MESSAGE /** * @brief implementation of doctest assert macro with message diff --git a/tests/simd/CMakeLists.txt b/tests/simd/CMakeLists.txt index ab29242dd..deed5d1ae 100644 --- a/tests/simd/CMakeLists.txt +++ b/tests/simd/CMakeLists.txt @@ -45,6 +45,7 @@ if (NMTOOLS_SIMD_TEST_SSE) set(NMTOOLS_SIMD_TEST_SOURCES ${NMTOOLS_SIMD_TEST_SOURCES} x86/reduction_sse.cpp x86/reduction_2d_sse.cpp + x86/reduction_nd_sse.cpp ) endif (NMTOOLS_SIMD_TEST_REDUCTION) endif (NMTOOLS_SIMD_TEST_SSE) @@ -63,6 +64,7 @@ if (NMTOOLS_SIMD_TEST_AVX) set(NMTOOLS_SIMD_TEST_SOURCES ${NMTOOLS_SIMD_TEST_SOURCES} x86/reduction_avx.cpp x86/reduction_2d_avx.cpp + x86/reduction_nd_avx.cpp ) endif (NMTOOLS_SIMD_TEST_REDUCTION) endif (NMTOOLS_SIMD_TEST_AVX) diff --git a/tests/simd/index/simd_reduction.cpp b/tests/simd/index/simd_reduction.cpp index 909e461b9..cc938a7c6 100644 --- a/tests/simd/index/simd_reduction.cpp +++ b/tests/simd/index/simd_reduction.cpp @@ -105,6 +105,97 @@ TEST_CASE("reduction_2d_shape(case2d)" * doctest::test_suite("simd::index")) NMTOOLS_ASSERT_EQUAL( result, expect ); } +TEST_CASE("reduction_2d_shape(case3a)" * doctest::test_suite("simd::index")) +{ + auto reduction_kind = meta::as_type_v; + auto n_elem_pack = meta::as_type_v<4>; + auto inp_shape = nmtools_array{2,2,5}; + auto out_shape = nmtools_array{2,2,1}; + auto axis = 2; // last + + auto result = ix::reduction_2d_shape(reduction_kind,n_elem_pack,inp_shape,out_shape,axis); + auto expect = nmtools_array{2*2,2}; + NMTOOLS_ASSERT_EQUAL( result, expect ); +} + +TEST_CASE("reduction_2d_shape(case3b)" * doctest::test_suite("simd::index")) +{ + auto reduction_kind = meta::as_type_v; + auto n_elem_pack = meta::as_type_v<4>; + auto inp_shape = nmtools_array{2,2,5}; + auto out_shape = nmtools_array{2,1,5}; + auto axis = 1; + + auto result = ix::reduction_2d_shape(reduction_kind,n_elem_pack,inp_shape,out_shape,axis); + auto expect = nmtools_array{2*2,2}; + NMTOOLS_ASSERT_EQUAL( result, expect ); +} + +TEST_CASE("reduction_2d_shape(case3c)" * doctest::test_suite("simd::index")) +{ + auto reduction_kind = meta::as_type_v; + auto n_elem_pack = meta::as_type_v<4>; + auto inp_shape = nmtools_array{2,2,5}; + auto out_shape = nmtools_array{2,1,5}; + auto axis = 0; + + auto result = ix::reduction_2d_shape(reduction_kind,n_elem_pack,inp_shape,out_shape,axis); + auto expect = nmtools_array{2,4}; + NMTOOLS_ASSERT_EQUAL( result, expect ); +} + +TEST_CASE("reduction_2d_shape(case4a)" * doctest::test_suite("simd::index")) +{ + auto reduction_kind = meta::as_type_v; + auto n_elem_pack = meta::as_type_v<4>; + auto inp_shape = nmtools_array{3,2,2,5}; + auto out_shape = nmtools_array{1,2,2,5}; + auto axis = 0; + + auto result = ix::reduction_2d_shape(reduction_kind,n_elem_pack,inp_shape,out_shape,axis); + auto expect = nmtools_array{3,5}; + NMTOOLS_ASSERT_EQUAL( result, expect ); +} + +TEST_CASE("reduction_2d_shape(case4b)" * doctest::test_suite("simd::index")) +{ + auto reduction_kind = meta::as_type_v; + auto n_elem_pack = meta::as_type_v<4>; + auto inp_shape = nmtools_array{3,2,2,5}; + auto out_shape = nmtools_array{3,1,2,5}; + auto axis = 1; + + auto result = ix::reduction_2d_shape(reduction_kind,n_elem_pack,inp_shape,out_shape,axis); + auto expect = nmtools_array{6,4}; + NMTOOLS_ASSERT_EQUAL( result, expect ); +} + +TEST_CASE("reduction_2d_shape(case4c)" * doctest::test_suite("simd::index")) +{ + auto reduction_kind = meta::as_type_v; + auto n_elem_pack = meta::as_type_v<4>; + auto inp_shape = nmtools_array{3,2,2,5}; + auto out_shape = nmtools_array{3,2,1,5}; + auto axis = 2; + + auto result = ix::reduction_2d_shape(reduction_kind,n_elem_pack,inp_shape,out_shape,axis); + auto expect = nmtools_array{12,2}; + NMTOOLS_ASSERT_EQUAL( result, expect ); +} + +TEST_CASE("reduction_2d_shape(case4d)" * doctest::test_suite("simd::index")) +{ + auto reduction_kind = meta::as_type_v; + auto n_elem_pack = meta::as_type_v<4>; + auto inp_shape = nmtools_array{3,2,2,5}; + auto out_shape = nmtools_array{3,2,2,1}; + auto axis = 3; + + auto result = ix::reduction_2d_shape(reduction_kind,n_elem_pack,inp_shape,out_shape,axis); + auto expect = nmtools_array{12,2}; + NMTOOLS_ASSERT_EQUAL( result, expect ); +} + //////////////////////////////////////////////////////////////////////////////// // VERTICAL REDUCTION @@ -1011,6 +1102,102 @@ TEST_CASE("reduction_2d_enumerator(case4b)" * doctest::test_suite("simd::index") auto out_offsets = nmtools_array{0,0,0,1,1,1,2,2,2,3,3,3}; + NMTOOLS_ASSERT_EQUAL( enumerator.size(), inp_offsets.size() ); + for (size_t i=0; i(out_pack); + const auto out_offset = nmtools::get<1>(out_pack); + const auto inp_tag = nmtools::get<0>(inp_pack); + const auto inp_offset = nmtools::get<1>(inp_pack); + CHECK_MESSAGE( out_tag == out_tags[i], i ); + CHECK_MESSAGE( inp_tag == inp_tags[i], i ); + NMTOOLS_ASSERT_EQUAL( out_offset, out_offsets[i] ); + NMTOOLS_ASSERT_EQUAL( inp_offset, inp_offsets[i] ); + } +} + +TEST_CASE("reduction_2d_enumerator(case5a)" * doctest::test_suite("simd::index")) +{ + auto reduction_kind = meta::as_type_v; + auto n_elem_pack = meta::as_type_v<4>; + auto inp_shape = nmtools_array{2,2,5}; + auto out_shape = nmtools_array{1,2,5}; + auto simd_shape = nmtools_array{2,4}; + auto axis = 0; + + auto enumerator = ix::reduction_2d_enumerator(reduction_kind,n_elem_pack,out_shape,inp_shape,axis); + auto out_tags = nmtools_array{ + SIMD::ACCUMULATE_PACKED, + SIMD::ACCUMULATE_PACKED, + SIMD::ACCUMULATE, + SIMD::ACCUMULATE, + SIMD::ACCUMULATE_PACKED, + SIMD::ACCUMULATE_PACKED, + SIMD::ACCUMULATE, + SIMD::ACCUMULATE, + }; + auto inp_tags = nmtools_array{ + SIMD::PACKED, + SIMD::PACKED, + SIMD::SCALAR, + SIMD::SCALAR, + SIMD::PACKED, + SIMD::PACKED, + SIMD::SCALAR, + SIMD::SCALAR, + }; + auto inp_offsets = nmtools_array{0,4,8,9,10,14,18,19}; + auto out_offsets = nmtools_array{0,4,8,9,0,4,8,9}; + + + NMTOOLS_ASSERT_EQUAL( enumerator.size(), inp_offsets.size() ); + for (size_t i=0; i(out_pack); + const auto out_offset = nmtools::get<1>(out_pack); + const auto inp_tag = nmtools::get<0>(inp_pack); + const auto inp_offset = nmtools::get<1>(inp_pack); + CHECK_MESSAGE( out_tag == out_tags[i], i ); + CHECK_MESSAGE( inp_tag == inp_tags[i], i ); + NMTOOLS_ASSERT_EQUAL( out_offset, out_offsets[i] ); + NMTOOLS_ASSERT_EQUAL( inp_offset, inp_offsets[i] ); + } +} + +TEST_CASE("reduction_2d_enumerator(case5b)" * doctest::test_suite("simd::index")) +{ + auto reduction_kind = meta::as_type_v; + auto n_elem_pack = meta::as_type_v<4>; + auto inp_shape = nmtools_array{2,2,5}; + auto out_shape = nmtools_array{2,1,5}; + auto simd_shape = nmtools_array{4,2}; + auto axis = 1; + + auto enumerator = ix::reduction_2d_enumerator(reduction_kind,n_elem_pack,out_shape,inp_shape,axis); + auto out_tags = nmtools_array{ + SIMD::ACCUMULATE_PACKED, + SIMD::ACCUMULATE, + SIMD::ACCUMULATE_PACKED, + SIMD::ACCUMULATE, + SIMD::ACCUMULATE_PACKED, + SIMD::ACCUMULATE, + SIMD::ACCUMULATE_PACKED, + SIMD::ACCUMULATE, + }; + auto inp_tags = nmtools_array{ + SIMD::PACKED, + SIMD::SCALAR, + SIMD::PACKED, + SIMD::SCALAR, + SIMD::PACKED, + SIMD::SCALAR, + SIMD::PACKED, + SIMD::SCALAR, + }; + auto inp_offsets = nmtools_array{0,4,5,9,10,14,15,19}; + auto out_offsets = nmtools_array{0,4,0,4,5,9,5,9}; + + NMTOOLS_ASSERT_EQUAL( enumerator.size(), inp_offsets.size() ); for (size_t i=0; i; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case1b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case1c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case5a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case5b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(casec)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +/////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case9a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case9b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case9c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////////////// + + +TEST_CASE("add.reduce_nd(case13a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case13b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case13c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case17a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 2; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17d)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 3; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case18a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18d)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18e)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case19a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19d)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19e)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19f)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 5; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +/*********************** multiply ******************************/ + +TEST_CASE("multiply.reduce_nd(case1a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case1b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case1c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_avx +TEST_CASE("multiply.reduce_nd(case3c)" * doctest::test_suite("simd::x86_AVX") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_avx +TEST_CASE("multiply.reduce_nd(case4c)" * doctest::test_suite("simd::x86_AVX") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case5a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case5b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(casec)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_avx +TEST_CASE("multiply.reduce_nd(case7c)" * doctest::test_suite("simd::x86_AVX") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_avx +TEST_CASE("multiply.reduce_nd(case8c)" * doctest::test_suite("simd::x86_AVX") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +/////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case9a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case9b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case9c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_avx +TEST_CASE("multiply.reduce_nd(case11c)" * doctest::test_suite("simd::x86_AVX") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_avx +TEST_CASE("multiply.reduce_nd(case12c)" * doctest::test_suite("simd::x86_AVX") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////////////// + + +TEST_CASE("multiply.reduce_nd(case13a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case13b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case13c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_avx +TEST_CASE("multiply.reduce_nd(case15c)" * doctest::test_suite("simd::x86_AVX") * doctest::may_fail()) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_avx +TEST_CASE("multiply.reduce_nd(case16c)" * doctest::test_suite("simd::x86_AVX") * doctest::may_fail()) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case17a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 2; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_avx +TEST_CASE("multiply.reduce_nd(case17d)" * doctest::test_suite("simd::x86_AVX") * doctest::may_fail()) +{ + auto axis = 3; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case18a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18d)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_avx +TEST_CASE("multiply.reduce_nd(case18e)" * doctest::test_suite("simd::x86_AVX") * doctest::may_fail()) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case19a)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19b)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19c)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19d)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19e)" * doctest::test_suite("simd::x86_AVX")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_avx +TEST_CASE("multiply.reduce_nd(case19f)" * doctest::test_suite("simd::x86_AVX") * doctest::may_fail()) +{ + auto axis = 5; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_AVX_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} \ No newline at end of file diff --git a/tests/simd/x86/reduction_nd_sse.cpp b/tests/simd/x86/reduction_nd_sse.cpp new file mode 100644 index 000000000..f02c9eb32 --- /dev/null +++ b/tests/simd/x86/reduction_nd_sse.cpp @@ -0,0 +1,3224 @@ +// disable array log ini this file because array too big +#define NMTOOLS_CHECK_MESSAGE(result,message) \ +{ \ + CHECK(result); \ +} + +#include "nmtools/array/eval/simd/x86_sse.hpp" +#include "nmtools/array/array/arange.hpp" +#include "nmtools/array/array/ufuncs/add.hpp" +#include "nmtools/array/array/ufuncs/multiply.hpp" +#include "nmtools/array/array/ufuncs/subtract.hpp" +#include "nmtools/array/array/ufuncs/divide.hpp" +#include "nmtools/array/array/reshape.hpp" +#include "nmtools/testing/doctest.hpp" + +namespace nm = nmtools; +namespace na = nm::array; +namespace ix = nm::index; +namespace simd = na::simd; +namespace meta = nm::meta; + +#define SIMD_TEST_EQUAL(result, expect) \ +{ \ + NMTOOLS_ASSERT_EQUAL( nm::shape(result), nm::shape(expect) ); \ + NMTOOLS_ASSERT_CLOSE( result, expect ); \ +} + +#define X86_SSE_TEST(fn,...) \ +{ \ + auto expect = na::fn(__VA_ARGS__); \ + auto result = na::fn(__VA_ARGS__,simd::x86_SSE); \ + SIMD_TEST_EQUAL(result,expect); \ +} + +/*********************** add ******************************/ + +TEST_CASE("add.reduce_nd(case1a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case1b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case1c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case5a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case5b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(casec)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +/////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case9a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case9b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case9c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////////////// + + +TEST_CASE("add.reduce_nd(case13a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case13b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case13c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case17a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 2; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17d)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 3; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case18a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18d)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18e)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case19a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19d)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19e)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19f)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 5; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +/*********************** multiply ******************************/ + +TEST_CASE("multiply.reduce_nd(case1a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case1b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case1c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_sse +TEST_CASE("multiply.reduce_nd(case3c)" * doctest::test_suite("simd::x86_SSE") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_sse +TEST_CASE("multiply.reduce_nd(case4c)" * doctest::test_suite("simd::x86_SSE") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case5a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case5b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(casec)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_sse +TEST_CASE("multiply.reduce_nd(case7c)" * doctest::test_suite("simd::x86_SSE") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_sse +TEST_CASE("multiply.reduce_nd(case8c)" * doctest::test_suite("simd::x86_SSE") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +/////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case9a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case9b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case9c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_sse +TEST_CASE("multiply.reduce_nd(case11c)" * doctest::test_suite("simd::x86_SSE") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_sse +TEST_CASE("multiply.reduce_nd(case12c)" * doctest::test_suite("simd::x86_SSE") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////////////// + + +TEST_CASE("multiply.reduce_nd(case13a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case13b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case13c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_sse +TEST_CASE("multiply.reduce_nd(case15c)" * doctest::test_suite("simd::x86_SSE") * doctest::may_fail()) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_sse +TEST_CASE("multiply.reduce_nd(case16c)" * doctest::test_suite("simd::x86_SSE") * doctest::may_fail()) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case17a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 2; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_sse +TEST_CASE("multiply.reduce_nd(case17d)" * doctest::test_suite("simd::x86_SSE") * doctest::may_fail()) +{ + auto axis = 3; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case18a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18d)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_sse +TEST_CASE("multiply.reduce_nd(case18e)" * doctest::test_suite("simd::x86_SSE") * doctest::may_fail()) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case19a)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19b)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19c)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19d)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19e)" * doctest::test_suite("simd::x86_SSE")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for x86_sse +TEST_CASE("multiply.reduce_nd(case19f)" * doctest::test_suite("simd::x86_SSE") * doctest::may_fail()) +{ + auto axis = 5; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + X86_SSE_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} \ No newline at end of file diff --git a/tests/simde/CMakeLists.txt b/tests/simde/CMakeLists.txt index 0d0ef2844..0f88cbe47 100644 --- a/tests/simde/CMakeLists.txt +++ b/tests/simde/CMakeLists.txt @@ -44,6 +44,7 @@ if (NMTOOLS_SIMDE_TEST_AVX512) set(NMTOOLS_SIMDE_TEST_SOURCES ${NMTOOLS_SIMDE_TEST_SOURCES} avx512/reduction_ufuncs.cpp avx512/reduction_2d.cpp + avx512/reduction_nd.cpp ) endif (NMTOOLS_SIMDE_TEST_REDUCTION) if (NMTOOLS_SIMDE_TEST_MATMUL) diff --git a/tests/simde/avx512/reduction_nd.cpp b/tests/simde/avx512/reduction_nd.cpp new file mode 100644 index 000000000..a9ef733d8 --- /dev/null +++ b/tests/simde/avx512/reduction_nd.cpp @@ -0,0 +1,3207 @@ +#include "nmtools/array/eval/simd/simde_avx512.hpp" +#include "nmtools/array/array/arange.hpp" +#include "nmtools/array/array/ufuncs/add.hpp" +#include "nmtools/array/array/ufuncs/multiply.hpp" +#include "nmtools/array/array/ufuncs/subtract.hpp" +#include "nmtools/array/array/ufuncs/divide.hpp" +#include "nmtools/array/array/reshape.hpp" +#include "nmtools/testing/doctest.hpp" + +namespace nm = nmtools; +namespace na = nm::array; +namespace ix = nm::index; +namespace simd = na::simd; +namespace meta = nm::meta; + +#define SIMD_TEST_EQUAL(result, expect) \ +{ \ + NMTOOLS_ASSERT_EQUAL( nm::shape(result), nm::shape(expect) ); \ + NMTOOLS_ASSERT_CLOSE( result, expect ); \ +} + +#define SIMDE_AVX512_TEST(fn,...) \ +{ \ + auto expect = na::fn(__VA_ARGS__); \ + auto result = na::fn(__VA_ARGS__,simd::simde_AVX512); \ + SIMD_TEST_EQUAL(result,expect); \ +} + +/*********************** add ******************************/ + +TEST_CASE("add.reduce_nd(case1a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case1b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case1c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case5a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case5b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(casec)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +/////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case9a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case9b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case9c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////////////// + + +TEST_CASE("add.reduce_nd(case13a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case13b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case13c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case17a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17d)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 3; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case18a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18d)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18e)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case19a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19d)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19e)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19f)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 5; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +/*********************** multiply ******************************/ + +TEST_CASE("multiply.reduce_nd(case1a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case1b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case1c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case5a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case5b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(casec)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +/////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case9a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case9b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case9c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////////////// + + +TEST_CASE("multiply.reduce_nd(case13a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case13b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case13c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case17a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17d)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 3; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case18a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18d)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18e)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case19a)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19b)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19c)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19d)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19e)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19f)" * doctest::test_suite("simd::simde_AVX512")) +{ + auto axis = 5; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + SIMDE_AVX512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} \ No newline at end of file diff --git a/tests/vector/CMakeLists.txt b/tests/vector/CMakeLists.txt index 4c51c9a04..887f3f085 100644 --- a/tests/vector/CMakeLists.txt +++ b/tests/vector/CMakeLists.txt @@ -38,6 +38,7 @@ if (NMTOOLS_VECTOR_TEST_128) unary_vector128.cpp reduction_vector128.cpp reduction_2d_vector128.cpp + reduction_nd_vector128.cpp outer_vector128.cpp outer_2d_vector128.cpp outer_nd_vector128.cpp @@ -52,6 +53,7 @@ if (NMTOOLS_VECTOR_TEST_256) unary_vector256.cpp reduction_vector256.cpp reduction_2d_vector256.cpp + reduction_nd_vector256.cpp outer_vector256.cpp outer_2d_vector256.cpp outer_nd_vector256.cpp @@ -65,6 +67,7 @@ if (NMTOOLS_VECTOR_TEST_512) matmul_vector512.cpp reduction_vector512.cpp reduction_2d_vector512.cpp + reduction_nd_vector512.cpp unary_vector512.cpp outer_vector512.cpp outer_2d_vector512.cpp diff --git a/tests/vector/reduction_nd_vector128.cpp b/tests/vector/reduction_nd_vector128.cpp new file mode 100644 index 000000000..22fd237d3 --- /dev/null +++ b/tests/vector/reduction_nd_vector128.cpp @@ -0,0 +1,3224 @@ +// disable array log ini this file because array too big +#define NMTOOLS_CHECK_MESSAGE(result,message) \ +{ \ + CHECK(result); \ +} + +#include "nmtools/array/eval/simd/vector_128.hpp" +#include "nmtools/array/array/arange.hpp" +#include "nmtools/array/array/ufuncs/add.hpp" +#include "nmtools/array/array/ufuncs/multiply.hpp" +#include "nmtools/array/array/ufuncs/subtract.hpp" +#include "nmtools/array/array/ufuncs/divide.hpp" +#include "nmtools/array/array/reshape.hpp" +#include "nmtools/testing/doctest.hpp" + +namespace nm = nmtools; +namespace na = nm::array; +namespace ix = nm::index; +namespace simd = na::simd; +namespace meta = nm::meta; + +#define SIMD_TEST_EQUAL(result, expect) \ +{ \ + NMTOOLS_ASSERT_EQUAL( nm::shape(result), nm::shape(expect) ); \ + NMTOOLS_ASSERT_CLOSE( result, expect ); \ +} + +#define VECTOR_128_TEST(fn,...) \ +{ \ + auto expect = na::fn(__VA_ARGS__); \ + auto result = na::fn(__VA_ARGS__,simd::vector_128); \ + SIMD_TEST_EQUAL(result,expect); \ +} + +/*********************** add ******************************/ + +TEST_CASE("add.reduce_nd(case1a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case1b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case1c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case5a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case5b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(casec)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +/////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case9a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case9b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case9c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////////////// + + +TEST_CASE("add.reduce_nd(case13a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case13b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case13c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case17a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 2; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17d)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 3; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case18a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18d)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18e)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case19a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19d)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19e)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19f)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 5; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +/*********************** multiply ******************************/ + +TEST_CASE("multiply.reduce_nd(case1a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case1b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case1c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for gcc vector extension +TEST_CASE("multiply.reduce_nd(case3c)" * doctest::test_suite("simd::vector_128") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for gcc vector extension +TEST_CASE("multiply.reduce_nd(case4c)" * doctest::test_suite("simd::vector_128") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case5a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case5b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(casec)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for gcc vector extension +TEST_CASE("multiply.reduce_nd(case7c)" * doctest::test_suite("simd::vector_128") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for gcc vector extension +TEST_CASE("multiply.reduce_nd(case8c)" * doctest::test_suite("simd::vector_128") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +/////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case9a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case9b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case9c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for gcc vector extension +TEST_CASE("multiply.reduce_nd(case11c)" * doctest::test_suite("simd::vector_128") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for gcc vector extension +TEST_CASE("multiply.reduce_nd(case12c)" * doctest::test_suite("simd::vector_128") * doctest::may_fail()) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////////////// + + +TEST_CASE("multiply.reduce_nd(case13a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case13b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case13c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for gcc vector extension +TEST_CASE("multiply.reduce_nd(case15c)" * doctest::test_suite("simd::vector_128") * doctest::may_fail()) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for gcc vector extension +TEST_CASE("multiply.reduce_nd(case16c)" * doctest::test_suite("simd::vector_128") * doctest::may_fail()) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case17a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 2; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for gcc vector extension +TEST_CASE("multiply.reduce_nd(case17d)" * doctest::test_suite("simd::vector_128") * doctest::may_fail()) +{ + auto axis = 3; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case18a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18d)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for gcc vector extension +TEST_CASE("multiply.reduce_nd(case18e)" * doctest::test_suite("simd::vector_128") * doctest::may_fail()) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case19a)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19b)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19c)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19d)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19e)" * doctest::test_suite("simd::vector_128")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduct for gcc vector extension +TEST_CASE("multiply.reduce_nd(case19f)" * doctest::test_suite("simd::vector_128") * doctest::may_fail()) +{ + auto axis = 5; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_128_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} \ No newline at end of file diff --git a/tests/vector/reduction_nd_vector256.cpp b/tests/vector/reduction_nd_vector256.cpp new file mode 100644 index 000000000..469e4fb7a --- /dev/null +++ b/tests/vector/reduction_nd_vector256.cpp @@ -0,0 +1,3215 @@ +// disable array log ini this file because array too big +#define NMTOOLS_CHECK_MESSAGE(result,message) \ +{ \ + CHECK(result); \ +} + +#include "nmtools/array/eval/simd/vector_256.hpp" +#include "nmtools/array/array/arange.hpp" +#include "nmtools/array/array/ufuncs/add.hpp" +#include "nmtools/array/array/ufuncs/multiply.hpp" +#include "nmtools/array/array/ufuncs/subtract.hpp" +#include "nmtools/array/array/ufuncs/divide.hpp" +#include "nmtools/array/array/reshape.hpp" +#include "nmtools/testing/doctest.hpp" + +namespace nm = nmtools; +namespace na = nm::array; +namespace ix = nm::index; +namespace simd = na::simd; +namespace meta = nm::meta; + +#define SIMD_TEST_EQUAL(result, expect) \ +{ \ + NMTOOLS_ASSERT_EQUAL( nm::shape(result), nm::shape(expect) ); \ + NMTOOLS_ASSERT_CLOSE( result, expect ); \ +} + +#define VECTOR_256_TEST(fn,...) \ +{ \ + auto expect = na::fn(__VA_ARGS__); \ + auto result = na::fn(__VA_ARGS__,simd::vector_256); \ + SIMD_TEST_EQUAL(result,expect); \ +} + +/*********************** add ******************************/ + +TEST_CASE("add.reduce_nd(case1a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case1b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case1c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case5a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case5b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(casec)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +/////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case9a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case9b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case9c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////////////// + + +TEST_CASE("add.reduce_nd(case13a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case13b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case13c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case17a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17d)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 3; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case18a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18d)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18e)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case19a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19d)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19e)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19f)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 5; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +/*********************** multiply ******************************/ + +TEST_CASE("multiply.reduce_nd(case1a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case1b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case1c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case5a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case5b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(casec)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +/////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case9a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case9b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case9c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////////////// + + +TEST_CASE("multiply.reduce_nd(case13a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case13b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case13c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case17a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17d)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 3; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case18a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18d)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix multiply.reduce for gcc vector extension +TEST_CASE("multiply.reduce_nd(case18e)" * doctest::test_suite("simd::vector_256") * doctest::may_fail()) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case19a)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19b)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19c)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19d)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19e)" * doctest::test_suite("simd::vector_256")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +// TODO: fix gcc vector extension for multiply.reduce +TEST_CASE("multiply.reduce_nd(case19f)" * doctest::test_suite("simd::vector_256") * doctest::may_fail()) +{ + auto axis = 5; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_256_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} \ No newline at end of file diff --git a/tests/vector/reduction_nd_vector512.cpp b/tests/vector/reduction_nd_vector512.cpp new file mode 100644 index 000000000..4c745c83d --- /dev/null +++ b/tests/vector/reduction_nd_vector512.cpp @@ -0,0 +1,3207 @@ +#include "nmtools/array/eval/simd/vector_512.hpp" +#include "nmtools/array/array/arange.hpp" +#include "nmtools/array/array/ufuncs/add.hpp" +#include "nmtools/array/array/ufuncs/multiply.hpp" +#include "nmtools/array/array/ufuncs/subtract.hpp" +#include "nmtools/array/array/ufuncs/divide.hpp" +#include "nmtools/array/array/reshape.hpp" +#include "nmtools/testing/doctest.hpp" + +namespace nm = nmtools; +namespace na = nm::array; +namespace ix = nm::index; +namespace simd = na::simd; +namespace meta = nm::meta; + +#define SIMD_TEST_EQUAL(result, expect) \ +{ \ + NMTOOLS_ASSERT_EQUAL( nm::shape(result), nm::shape(expect) ); \ + NMTOOLS_ASSERT_CLOSE( result, expect ); \ +} + +#define VECTOR_512_TEST(fn,...) \ +{ \ + auto expect = na::fn(__VA_ARGS__); \ + auto result = na::fn(__VA_ARGS__,simd::vector_512); \ + SIMD_TEST_EQUAL(result,expect); \ +} + +/*********************** add ******************************/ + +TEST_CASE("add.reduce_nd(case1a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case1b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case1c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case2c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case3c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case4c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case5a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case5b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(casec)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case6c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case7c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case8c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +/////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case9a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case9b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case9c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case10c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case11c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case12c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////////////// + + +TEST_CASE("add.reduce_nd(case13a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case13b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case13c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case14c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case15c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case16c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case17a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case17d)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 3; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case18a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18d)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case18e)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("add.reduce_nd(case19a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19d)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19e)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("add.reduce_nd(case19f)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 5; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(add.reduce,input,axis,dtype,initial,keepdims); + } +} + +/*********************** multiply ******************************/ + +TEST_CASE("multiply.reduce_nd(case1a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case1b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case1c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case2c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case3c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case4c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{2,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case5a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case5b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(casec)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case6c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case7c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case8c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,2,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +/////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case9a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case9b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case9c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case10c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case11c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<0>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<1>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case12c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = meta::ct_v<2>; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////////////// + + +TEST_CASE("multiply.reduce_nd(case13a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case13b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case13c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,5}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case14c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,6}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case15c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,7}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case16c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case17a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case17d)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 3; + auto new_shape = nmtools_array{12,3,3,8}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case18a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18d)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case18e)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +///////////////////////////////////////////////////////////////////////////////// + +TEST_CASE("multiply.reduce_nd(case19a)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 0; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19b)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 1; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19c)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 2; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19d)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 3; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19e)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 4; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} + +TEST_CASE("multiply.reduce_nd(case19f)" * doctest::test_suite("simd::vector_512")) +{ + auto axis = 5; + auto new_shape = nmtools_array{2,12,1,3,3,9}; + auto input = na::reshape(na::arange(ix::product(new_shape)),new_shape); + auto dtype = nm::None; + auto initial = nm::None; + { + auto keepdims = nm::True; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = nm::False; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = true; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } + { + auto keepdims = false; + VECTOR_512_TEST(multiply.reduce,input,axis,dtype,initial,keepdims); + } +} \ No newline at end of file