Fix cycles build error with visual studio, apparently the windows ABI does not

like 16 bit alignment on 32 bit.
This commit is contained in:
Brecht Van Lommel 2013-11-23 05:24:26 +01:00
parent 5a4f7f46a5
commit 58ec292fd8
1 changed files with 10 additions and 6 deletions

View File

@ -23,6 +23,12 @@
#endif
/* Bitness */
#if defined(__ppc64__) || defined(__PPC64__) || defined(__x86_64__) || defined(__ia64__) || defined(_M_X64)
#define __KERNEL_64_BIT__
#endif
/* Qualifiers for kernel code shared by CPU and GPU */
#ifndef __KERNEL_GPU__
@ -34,7 +40,11 @@
#if defined(_WIN32) && !defined(FREE_WINDOWS)
#define ccl_device_inline static __forceinline
#ifdef __KERNEL_64_BIT__
#define ccl_align(...) __declspec(align(__VA_ARGS__))
#else
#define ccl_align(...) /* not support for function arguments (error C2719) */
#endif
#define ccl_may_alias
#else
#define ccl_device_inline static inline __attribute__((always_inline))
@ -47,12 +57,6 @@
#endif
/* Bitness */
#if defined(__ppc64__) || defined(__PPC64__) || defined(__x86_64__) || defined(__ia64__) || defined(_M_X64)
#define __KERNEL_64_BIT__
#endif
/* SIMD Types */
#ifndef __KERNEL_GPU__