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