Alignment for generic SIMD classes

This commit is contained in:
Matthias Hochsteger 2020-12-16 17:20:18 +01:00
parent 9c0dbec8c9
commit d97a9a6594

View File

@ -67,7 +67,7 @@ namespace ngcore
template <int N>
class SIMD<mask64,N>
class alignas(GetDefaultSIMDSize()*sizeof(int64_t)) SIMD<mask64,N>
{
static constexpr int N1 = std::min(GetDefaultSIMDSize(), N/2);
static constexpr int N2 = N-N1;
@ -123,7 +123,7 @@ namespace ngcore
};
template<int N>
class SIMD<int64_t,N>
class alignas(GetDefaultSIMDSize()*sizeof(int64_t)) SIMD<int64_t,N>
{
static constexpr int N1 = std::min(GetDefaultSIMDSize(), N/2);
static constexpr int N2 = N-N1;
@ -240,7 +240,7 @@ namespace ngcore
template<int N>
class SIMD<double, N>
class alignas(GetDefaultSIMDSize()*sizeof(double)) SIMD<double, N>
{
static constexpr int N1 = std::min(GetDefaultSIMDSize(), N/2);
static constexpr int N2 = N-N1;