Blender  V3.3
BLI_math_inline.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
4 #pragma once
5 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 /* add platform/compiler checks here if it is not supported */
15 /* all platforms support forcing inline so this is always enabled */
16 #define BLI_MATH_DO_INLINE 1
17 
18 #if BLI_MATH_DO_INLINE
19 # ifdef _MSC_VER
20 # define MINLINE static __forceinline
21 # define MALWAYS_INLINE MINLINE
22 # else
23 # define MINLINE static inline
24 # define MALWAYS_INLINE static inline __attribute__((always_inline)) __attribute__((unused))
25 # endif
26 #else
27 # define MINLINE
28 # define MALWAYS_INLINE
29 #endif
30 
31 /* gcc 4.6 (supports push/pop) */
32 #if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406))
33 # define BLI_MATH_GCC_WARN_PRAGMA 1
34 #endif
35 
36 #ifdef __cplusplus
37 }
38 #endif