Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Oct 29, 2023
1 parent c904286 commit 5a07f2f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 24 deletions.
5 changes: 2 additions & 3 deletions include/epu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@
#define HPCOMBI_EPU_HPP_INCLUDED

#include <array>
#include <string>
#include <cassert>
#include <cstdint>
#include <functional> // less<>, equal_to<>
#include <iomanip>
#include <ostream>
#include <string>
#include <type_traits>
#include <utility> // integer_sequences
#include <utility> // 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.
Expand Down
4 changes: 2 additions & 2 deletions include/perm16.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion include/perm16_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<epu8>(!res) : res;
}

Expand Down
34 changes: 16 additions & 18 deletions tests/test_epu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)));
Expand Down

0 comments on commit 5a07f2f

Please sign in to comment.