From d97a9a65949f99075b7b56549b339ac2f6be5c8a Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Wed, 16 Dec 2020 17:20:18 +0100 Subject: [PATCH] Alignment for generic SIMD classes --- libsrc/core/simd_generic.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsrc/core/simd_generic.hpp b/libsrc/core/simd_generic.hpp index 5846ad4c..36f44d85 100644 --- a/libsrc/core/simd_generic.hpp +++ b/libsrc/core/simd_generic.hpp @@ -67,7 +67,7 @@ namespace ngcore template - class SIMD + class alignas(GetDefaultSIMDSize()*sizeof(int64_t)) SIMD { static constexpr int N1 = std::min(GetDefaultSIMDSize(), N/2); static constexpr int N2 = N-N1; @@ -123,7 +123,7 @@ namespace ngcore }; template - class SIMD + class alignas(GetDefaultSIMDSize()*sizeof(int64_t)) SIMD { static constexpr int N1 = std::min(GetDefaultSIMDSize(), N/2); static constexpr int N2 = N-N1; @@ -240,7 +240,7 @@ namespace ngcore template - class SIMD + class alignas(GetDefaultSIMDSize()*sizeof(double)) SIMD { static constexpr int N1 = std::min(GetDefaultSIMDSize(), N/2); static constexpr int N2 = N-N1;