Skip to content

Commit

Permalink
Work around clang unused var warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Nov 26, 2024
1 parent 0d700f1 commit 5812bd0
Showing 1 changed file with 37 additions and 36 deletions.
73 changes: 37 additions & 36 deletions include/bitcoin/system/impl/hash/sha/algorithm_native.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -142,57 +142,58 @@ INLINE void CLASS::
round_native(wstate_t<xint128_t>& state,
const wbuffer_t<xint128_t>& wk) NOEXCEPT
{
if constexpr (SHA::strength == 160)
{
if constexpr (use_neon)
{
}
else if constexpr (use_shani)
{
}
}
else if constexpr (SHA::strength == 256)
{
if constexpr (use_neon)
{
}
else if constexpr (use_shani)
{
////if constexpr (SHA::strength == 160)
////{
//// if constexpr (use_neon)
//// {
//// }
//// else if constexpr (use_shani)
//// {
//// }
////}
////else if constexpr (SHA::strength == 256)
////{
//// if constexpr (use_neon)
//// {
//// }
//// else if constexpr (use_shani)
//// {

// Process wk[Round][0..1], [HGDC][FEBA] (initial state)
state[1] = mm_sha256rnds2_epu32(state[1], state[0], wk[Round]);

// Process wk[Round][2..3] (shifted down)
state[0] = mm_sha256rnds2_epu32(state[0], state[1],
mm_shuffle_epi32(wk[Round], 0x0e));
}
}
//// }
////}
}

TEMPLATE
INLINE void CLASS::
summarize_native(wstate_t<xint128_t>& out,
const wstate_t<xint128_t>& in) NOEXCEPT
{
if constexpr (SHA::strength == 160)
{
if constexpr (use_neon)
{
}
else if constexpr (use_shani)
{
}
}
else if constexpr (SHA::strength == 256)
{
if constexpr (use_neon)
{
}
else if constexpr (use_shani)
{
////if constexpr (SHA::strength == 160)
////{
//// if constexpr (use_neon)
//// {
//// }
//// else if constexpr (use_shani)
//// {
//// }
////}
////else if constexpr (SHA::strength == 256)
////{
//// if constexpr (use_neon)
//// {
//// }
//// else if constexpr (use_shani)
//// {
out[0] = mm_add_epi32(out[0], in[0]);
out[1] = mm_add_epi32(out[1], in[1]);
}
}
//// }
////}
}

TEMPLATE
Expand Down

0 comments on commit 5812bd0

Please sign in to comment.