Skip to content

Commit

Permalink
SIMD Basic: fix Card & CardMinusOne functions
Browse files Browse the repository at this point in the history
  • Loading branch information
lamphamsy committed Oct 30, 2018
1 parent 0fd75e7 commit 7cde4de
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/simd_basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,27 @@ namespace quadiron {
namespace simd {

template <typename T>
inline VecType Card(T q)
inline VecType Card(T q);
template <>
inline VecType Card<uint16_t>(uint16_t q)
{
return F3_U16;
}
template <>
inline VecType Card<uint32_t>(uint32_t q)
{
return (q == F3) ? F3_U32 : F4_U32;
}

template <typename T>
inline VecType CardMinusOne(T q)
inline VecType CardMinusOne(T q);
template <>
inline VecType CardMinusOne<uint16_t>(uint16_t q)
{
return F3_MINUS_ONE_U16;
}
template <>
inline VecType CardMinusOne<uint32_t>(uint32_t q)
{
return (q == F3) ? F3_MINUS_ONE_U32 : F4_MINUS_ONE_U32;
}
Expand Down

0 comments on commit 7cde4de

Please sign in to comment.