From 6d1f81ceda4c647231b5f024843f33eb065cb10a Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Fri, 6 Dec 2013 12:20:02 +0100 Subject: [PATCH] more macros for SSE/AVX/AVX512 alignment etc --- include/mitsuba/core/sse.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/mitsuba/core/sse.h b/include/mitsuba/core/sse.h index c3f083ec..0767809e 100644 --- a/include/mitsuba/core/sse.h +++ b/include/mitsuba/core/sse.h @@ -25,14 +25,18 @@ #if defined(__GNUC__) #define MM_ALIGN16 __attribute__ ((aligned (16))) -#elif defined(__OSX__) && defined(__GNUC__) -#define MM_ALIGN16 __attribute__ ((aligned (16))) +#define MM_ALIGN32 __attribute__ ((aligned (32))) +#define MM_ALIGN64 __attribute__ ((aligned (64))) #elif defined(__MSVC__) #define MM_ALIGN16 __declspec(align(16)) +#define MM_ALIGN32 __declspec(align(32)) +#define MM_ALIGN64 __declspec(align(64)) #else #error Unsupported compiler! #endif -#define STACK_ALIGN16(t) reinterpret_cast((reinterpret_cast(t)+0xF) & ~(size_t) 0xF) +#define STACK_ALIGN16(t) reinterpret_cast((reinterpret_cast(t)+0x0F) & ~(size_t) 0x0F) +#define STACK_ALIGN32(t) reinterpret_cast((reinterpret_cast(t)+0x1F) & ~(size_t) 0x1F) +#define STACK_ALIGN64(t) reinterpret_cast((reinterpret_cast(t)+0x3F) & ~(size_t) 0x3F) /* ========= SSE intrinsics ========= */ #ifndef MTS_SSE