diff options
author | Mattias Andrée <maandree@kth.se> | 2022-02-17 19:43:51 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-02-17 19:43:51 +0100 |
commit | e1ff5cc788f1f418e75d63b8e4c4fe5554fbe2c8 (patch) | |
tree | 1639a0ba6c51ab27166b0171f75dad6c5300fe4b /common.h | |
parent | bump version (diff) | |
download | libar2-e1ff5cc788f1f418e75d63b8e4c4fe5554fbe2c8.tar.gz libar2-e1ff5cc788f1f418e75d63b8e4c4fe5554fbe2c8.tar.bz2 libar2-e1ff5cc788f1f418e75d63b8e4c4fe5554fbe2c8.tar.xz |
Some fixes1.2
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -96,9 +96,15 @@ #if defined(__x86_64__) && defined(LIBAR2_TARGET__) # define MAX_SIMD_ALIGNMENT 64 # define SIMD_ALIGNED _Alignas(MAX_SIMD_ALIGNMENT) +# if defined(__GNUC__) +# define SIMD_ALIGNED_ATTRIBUTE __attribute__((__aligned__(MAX_SIMD_ALIGNMENT))) +# else +# define SIMD_ALIGNED_ATTRIBUTE +# endif #else # define MAX_SIMD_ALIGNMENT 1 # define SIMD_ALIGNED /* use the types native alignment */ +# define SIMD_ALIGNED_ATTRIBUTE /* ditto */ #endif @@ -112,7 +118,7 @@ #define ERASE_STRUCT(S) libar2_erase(&(S), sizeof(S)) -struct block { +struct SIMD_ALIGNED_ATTRIBUTE block { uint_least64_t w[1024 / (64 / 8)]; }; |