Blender V5.0
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
10
11/* add platform/compiler checks here if it is not supported */
12/* all platforms support forcing inline so this is always enabled */
13#define BLI_MATH_DO_INLINE 1
14
15#if BLI_MATH_DO_INLINE
16# ifdef _MSC_VER
17# define MINLINE inline __forceinline
18# define MALWAYS_INLINE MINLINE
19# else
20# define MINLINE inline
21# define MALWAYS_INLINE inline __attribute__((always_inline)) __attribute__((unused))
22# endif
23#else
24# define MINLINE
25# define MALWAYS_INLINE
26#endif
27
28/* Check for GCC push/pop pragma support. */
29#ifdef __GNUC__
30# define BLI_MATH_GCC_WARN_PRAGMA 1
31#endif