diff options
author | Mattias Andrée <maandree@kth.se> | 2022-02-17 15:11:28 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-02-17 15:11:33 +0100 |
commit | 6570686dc178b801b287e0ab155aaf691bbcb1eb (patch) | |
tree | 72ac2dcc50d58314b607ce523792ae6e7ec2a102 /common.h | |
parent | Add optimisations (no yet used) (diff) | |
download | libar2-6570686dc178b801b287e0ab155aaf691bbcb1eb.tar.gz libar2-6570686dc178b801b287e0ab155aaf691bbcb1eb.tar.bz2 libar2-6570686dc178b801b287e0ab155aaf691bbcb1eb.tar.xz |
m + use optimisations '(adds auto-executed function: libar2_init)'
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -31,6 +31,11 @@ #if defined(__GNUC__) # define LIBAR2_WEAKLY_LINKED__ __attribute__((__weak__)) # define LIBAR2_TARGET__(TARGETS) __attribute__((__target__(TARGETS))) +# define LIBAR2_INITIALISER__ __attribute__((__constructor__)) +# define LIBAR2_HIDDEN__ __attribute__((__visibility__("hidden"))) +#else +# define LIBAR2_INITIALISER__ +# define LIBAR2_HIDDEN__ #endif @@ -112,6 +117,15 @@ struct block { }; +LIBAR2_HIDDEN__ void libar2_internal_erase__(volatile void *mem, size_t size); +#if defined(__x86_64__) && defined(LIBAR2_TARGET__) +LIBAR2_HIDDEN__ void libar2_internal_use_generic__(void); +LIBAR2_HIDDEN__ void libar2_internal_use_sse2__(void); +LIBAR2_HIDDEN__ void libar2_internal_use_avx2__(void); +LIBAR2_HIDDEN__ void libar2_internal_use_avx512f__(void); +#endif + + #if defined(__clang__) # pragma clang diagnostic ignored "-Wc++98-compat" #endif |