16#ifndef AI_ENABLE_DEPRECATION_WARNINGS
17#define AI_ENABLE_DEPRECATION_WARNINGS 1
21#define AI_EXTERN_C extern "C"
23#define AI_EXTERN_C extern
26#if _MSC_VER && !__INTEL_COMPILER
28# define AI_PURE_ATTRIBUTE
29# define AI_CONST_ATTRIBUTE
32# define AI_PURE_ATTRIBUTE pure
33# define AI_CONST_ATTRIBUTE const
41# define AI_UNAVAILABLE
46# define AI_API AI_EXTERN_C __declspec(dllexport)
48# define AI_API AI_EXTERN_C __declspec(dllimport)
50# if (defined(AI_ENABLE_DEPRECATION_WARNINGS) && AI_ENABLE_DEPRECATION_WARNINGS > 0)
51# define AI_DEPRECATED __declspec(deprecated)
53# define AI_PURE __declspec(AI_PURE_ATTRIBUTE)
54# define AI_CONST __declspec(AI_CONST_ATTRIBUTE)
55# define AI_UNAVAILABLE __declspec(deprecated)
57# if (defined(AI_ENABLE_DEPRECATION_WARNINGS) && AI_ENABLE_DEPRECATION_WARNINGS > 0)
58# define AI_DEPRECATED __attribute__(( deprecated ))
60# define AI_API AI_EXTERN_C __attribute__(( visibility("default") ))
61# define AI_PURE __attribute__(( AI_PURE_ATTRIBUTE ))
62# define AI_CONST __attribute__(( AI_CONST_ATTRIBUTE ))
64# define AI_UNAVAILABLE __attribute__((unavailable))
65# elif __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 && !__INTEL_COMPILER
66# define AI_UNAVAILABLE __attribute__((error("This function is not allowed to be used")))
69# define AI_UNAVAILABLE __attribute__((deprecated))
74#if (!defined(AI_ENABLE_DEPRECATION_WARNINGS) || AI_ENABLE_DEPRECATION_WARNINGS == 0)
82# pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
83#elif defined (_MSC_VER)
84# pragma warning( disable : 4190 )
92#if (defined(_MSC_VER) && !defined(__INTEL_COMPILER)) || defined(__CUDACC__)
93#define Ai_likely(expr) (expr)
94#define Ai_unlikely(expr) (expr)
96#define Ai_likely(expr) (__builtin_expect(!!(expr), true))
97#define Ai_unlikely(expr) (__builtin_expect(!!(expr), false))
101#if defined(__INTEL_COMPILER) || defined(_MSC_VER)
102# define AI_FORCEINLINE __forceinline
104# define AI_FORCEINLINE __attribute__ ((always_inline))
108#if defined(__INTEL_COMPILER) || defined(_MSC_VER)
109#define ARNOLD_FORCEINLINE AI_FORCEINLINE
112#define ARNOLD_FORCEINLINE AI_FORCEINLINE inline
118# define AI_DEVICE __device__
120# ifndef AI_GPU_COMPILER
121# define AI_GPU_COMPILER
123#define AI_GPU_NO_INLINE __noinline__
124#define AI_GPU_FORCE_INLINE __forceinline__
129# ifndef AI_CPU_COMPILER
130# define AI_CPU_COMPILER
132#define AI_GPU_NO_INLINE
133#define AI_GPU_FORCE_INLINE
138#define AI_OPTIONAL_METHOD_INSTALL(methods, name) \
139static bool ai_install_##name() { methods.name = name; return true; } \
140static const bool ai_installed_##name = ai_install_##name();
AtBlockingCall
Whether a function call is blocking (synchronous) or not (asynchronous)
Definition: ai_api.h:147
@ AI_NON_BLOCKING
asynchronous, non-blocking call; returns ASAP, task completes in the background
Definition: ai_api.h:149
@ AI_BLOCKING
synchronous, blocking call; returns when the task is done
Definition: ai_api.h:148