Skip to content

Commit d35c4d3

Browse files
committed
SIMD Basic: fix Card & CardMinusOne functions
1 parent e9de0ba commit d35c4d3

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/simd_basic.h

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,27 @@ namespace quadiron {
3737
namespace simd {
3838

3939
template <typename T>
40-
inline VecType Card(T q)
40+
inline VecType Card(T q);
41+
template <>
42+
inline VecType Card<uint16_t>(uint16_t q)
43+
{
44+
return F3_U16;
45+
}
46+
template <>
47+
inline VecType Card<uint32_t>(uint32_t q)
4148
{
4249
return (q == F3) ? F3_U32 : F4_U32;
4350
}
4451

4552
template <typename T>
46-
inline VecType CardMinusOne(T q)
53+
inline VecType CardMinusOne(T q);
54+
template <>
55+
inline VecType CardMinusOne<uint16_t>(uint16_t q)
56+
{
57+
return F3_MINUS_ONE_U16;
58+
}
59+
template <>
60+
inline VecType CardMinusOne<uint32_t>(uint32_t q)
4761
{
4862
return (q == F3) ? F3_MINUS_ONE_U32 : F4_MINUS_ONE_U32;
4963
}

0 commit comments

Comments
 (0)