int64_t for masks

This commit is contained in:
Matthias Hochsteger 2020-12-16 21:00:12 +01:00
parent d97a9a6594
commit eb6ac164e7
2 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ namespace ngcore
{
__m256i mask;
public:
SIMD (size_t i)
SIMD (int64_t i)
: mask(my_mm256_cmpgt_epi64(_mm256_set1_epi64x(i),
_mm256_set_epi64x(3, 2, 1, 0)))
{ ; }

View File

@ -58,7 +58,7 @@ namespace ngcore
{
int64_t mask;
public:
SIMD (size_t i)
SIMD (int64_t i)
: mask(i > 0 ? -1 : 0) { ; }
bool Data() const { return mask; }
static constexpr int Size() { return 1; }
@ -76,7 +76,7 @@ namespace ngcore
SIMD<mask64,N2> hi;
public:
SIMD (size_t i) : lo(i), hi(i>N1 ? i-N1 : 0) { ; }
SIMD (int64_t i) : lo(i), hi(i-N1 ) { ; }
SIMD (SIMD<mask64,N1> lo_, SIMD<mask64,N2> hi_) : lo(lo_), hi(hi_) { ; }
SIMD<mask64,N1> Lo() const { return lo; }
SIMD<mask64,N2> Hi() const { return hi; }