Skip to content

Commit 2999f58

Browse files
committed
Update memory alignment values for arm architectures
1 parent e21ea15 commit 2999f58

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

librapid/include/librapid/core/config.hpp

+16
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,22 @@
241241
# ifndef LIBRAPID_MEM_ALIGN
242242
# define LIBRAPID_MEM_ALIGN 16
243243
# endif
244+
#elif defined(__ARM_NEON) || defined(__ARM_NEON__)
245+
# define LIBRAPID_NEON
246+
# define LIBRAPID_ARCH ARCH_NEON
247+
# define LIBRAPID_ARCH_NAME "NEON"
248+
249+
# ifndef LIBRAPID_MEM_ALIGN
250+
# define LIBRAPID_MEM_ALIGN 16
251+
# endif
252+
#elif defined(__ARM_FEATURE_SVE)
253+
# define LIBRAPID_SVE
254+
# define LIBRAPID_ARCH ARCH_SVE
255+
# define LIBRAPID_ARCH_NAME "SVE"
256+
257+
# ifndef LIBRAPID_MEM_ALIGN
258+
# define LIBRAPID_MEM_ALIGN 128 // SVE has a max vector length of 2048 bits
259+
# endif
244260
#elif defined(_M_IX86_FP) // Defined in MS compiler. 1: SSE, 2: SSE2
245261
# if _M_IX86_FP == 1
246262
# define LIBRAPID_SSE

0 commit comments

Comments
 (0)