diff --git a/include/epu.hpp b/include/epu.hpp index 8ea52292..8e9fb289 100644 --- a/include/epu.hpp +++ b/include/epu.hpp @@ -17,21 +17,20 @@ #define HPCOMBI_EPU_HPP_INCLUDED #include -#include #include #include #include // less<>, equal_to<> #include #include +#include #include -#include // integer_sequences +#include // integer_sequences #include "vect_generic.hpp" #include "simde/x86/sse4.1.h" #include "simde/x86/sse4.2.h" - namespace HPCombi { /// Unsigned 8 bits int constant. diff --git a/include/perm16.hpp b/include/perm16.hpp index 8178a157..6a792619 100644 --- a/include/perm16.hpp +++ b/include/perm16.hpp @@ -77,9 +77,9 @@ struct alignas(16) PTransf16 : public Vect16 { epu8 image_mask_ref(bool complement = false) const; epu8 image_mask(bool complement = false) const { #ifdef SIMDE_X86_SSE4_2_NATIVE - return image_mask_cmpestrm(complement); + return image_mask_cmpestrm(complement); #else - return image_mask_ref(complement); + return image_mask_ref(complement); #endif } /** Returns a bit mask for the image of \c *this */ diff --git a/include/perm16_impl.hpp b/include/perm16_impl.hpp index 78eaefe9..f157a32e 100644 --- a/include/perm16_impl.hpp +++ b/include/perm16_impl.hpp @@ -63,7 +63,7 @@ inline epu8 PTransf16::image_mask_ref(bool complement) const { epu8 res{}; for (auto x : *this) if (x != 0xFF) - res[x] = 0xFF; + res[x] = 0xFF; return complement ? static_cast(!res) : res; } diff --git a/tests/test_epu.cpp b/tests/test_epu.cpp index fc0c634b..d4af52b4 100644 --- a/tests/test_epu.cpp +++ b/tests/test_epu.cpp @@ -442,12 +442,12 @@ TEST_CASE_METHOD(Fix, "Epu8::partial_sums_ref", "[Epu8][029]") { Equals(epu8{23, 28, 49, 54, 97, 133, 140, 147, 154, 161, 168, 175, 182, 189, 196, 203})); } -TEST_AGREES_EPU8_FUN( - Fix, Epu8, partial_sums_ref, partial_sums_gen, v, "[Epu8][030]") -TEST_AGREES_EPU8_FUN( - Fix, Epu8, partial_sums_ref, partial_sums_round, v, "[Epu8][030]") -TEST_AGREES_EPU8_FUN( - Fix, Epu8, partial_sums_ref, partial_sums, v, "[Epu8][030]") +TEST_AGREES_EPU8_FUN(Fix, Epu8, partial_sums_ref, partial_sums_gen, v, + "[Epu8][030]") +TEST_AGREES_EPU8_FUN(Fix, Epu8, partial_sums_ref, partial_sums_round, v, + "[Epu8][030]") +TEST_AGREES_EPU8_FUN(Fix, Epu8, partial_sums_ref, partial_sums, v, + "[Epu8][030]") TEST_CASE_METHOD(Fix, "Epu8::horiz_max_ref", "[Epu8][033]") { REQUIRE(horiz_max_ref(zero) == 0); @@ -488,12 +488,11 @@ TEST_CASE_METHOD(Fix, "Epu8::partial_max_ref", "[Epu8][038]") { REQUIRE_THAT(partial_max_ref(epu8rev), Equals(Epu8({}, 15))); REQUIRE_THAT(partial_max_ref(Pc), Equals(Epu8({23, 23, 23, 23}, 43))); } -TEST_AGREES_EPU8_FUN( - Fix, Epu8, partial_max_ref, partial_max_gen, v, "[Epu8][030]") -TEST_AGREES_EPU8_FUN( - Fix, Epu8, partial_max_ref, partial_max_round, v, "[Epu8][030]") -TEST_AGREES_EPU8_FUN( - Fix, Epu8, partial_max_ref, partial_max, v, "[Epu8][030]") +TEST_AGREES_EPU8_FUN(Fix, Epu8, partial_max_ref, partial_max_gen, v, + "[Epu8][030]") +TEST_AGREES_EPU8_FUN(Fix, Epu8, partial_max_ref, partial_max_round, v, + "[Epu8][030]") +TEST_AGREES_EPU8_FUN(Fix, Epu8, partial_max_ref, partial_max, v, "[Epu8][030]") TEST_CASE_METHOD(Fix, "Epu8::horiz_min_ref", "[Epu8][042]") { REQUIRE(horiz_min_ref(zero) == 0); @@ -535,12 +534,11 @@ TEST_CASE_METHOD(Fix, "Epu8::partial_min_ref", "[Epu8][043]") { REQUIRE_THAT(partial_min_ref(epu8rev), Equals(epu8rev)); REQUIRE_THAT(partial_min_ref(Pc), Equals(Epu8({23}, 5))); } -TEST_AGREES_EPU8_FUN( - Fix, Epu8, partial_min_ref, partial_min_gen, v, "[Epu8][030]") -TEST_AGREES_EPU8_FUN( - Fix, Epu8, partial_min_ref, partial_min_round, v, "[Epu8][030]") -TEST_AGREES_EPU8_FUN( - Fix, Epu8, partial_min_ref, partial_min, v, "[Epu8][030]") +TEST_AGREES_EPU8_FUN(Fix, Epu8, partial_min_ref, partial_min_gen, v, + "[Epu8][030]") +TEST_AGREES_EPU8_FUN(Fix, Epu8, partial_min_ref, partial_min_round, v, + "[Epu8][030]") +TEST_AGREES_EPU8_FUN(Fix, Epu8, partial_min_ref, partial_min, v, "[Epu8][030]") TEST_CASE_METHOD(Fix, "Epu8::eval16_ref", "[Epu8][047]") { REQUIRE_THAT(eval16_ref(zero), Equals(Epu8({16}, 0)));