2023-05-31 16:19:06 +02:00
|
|
|
/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2010-01-22 11:10:24 +00:00
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#pragma once
|
2010-01-22 11:10:24 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup bli
|
2011-02-18 13:58:08 +00:00
|
|
|
*/
|
|
|
|
|
|
2010-01-22 11:10:24 +00:00
|
|
|
/* add platform/compiler checks here if it is not supported */
|
2012-11-23 15:12:13 +00:00
|
|
|
/* all platforms support forcing inline so this is always enabled */
|
|
|
|
|
#define BLI_MATH_DO_INLINE 1
|
2010-01-22 11:10:24 +00:00
|
|
|
|
2012-11-23 15:12:13 +00:00
|
|
|
#if BLI_MATH_DO_INLINE
|
2012-03-24 01:24:58 +00:00
|
|
|
# ifdef _MSC_VER
|
2025-02-09 19:05:01 +01:00
|
|
|
# define MINLINE inline __forceinline
|
2012-03-24 01:24:58 +00:00
|
|
|
# define MALWAYS_INLINE MINLINE
|
|
|
|
|
# else
|
2025-02-09 19:05:01 +01:00
|
|
|
# define MINLINE inline
|
|
|
|
|
# define MALWAYS_INLINE inline __attribute__((always_inline)) __attribute__((unused))
|
2012-03-24 01:24:58 +00:00
|
|
|
# endif
|
2010-01-22 11:10:24 +00:00
|
|
|
#else
|
2012-03-24 01:24:58 +00:00
|
|
|
# define MINLINE
|
|
|
|
|
# define MALWAYS_INLINE
|
2010-01-22 11:10:24 +00:00
|
|
|
#endif
|
|
|
|
|
|
2022-09-26 12:26:48 +10:00
|
|
|
/* Check for GCC push/pop pragma support. */
|
|
|
|
|
#ifdef __GNUC__
|
2013-03-13 15:41:14 +00:00
|
|
|
# define BLI_MATH_GCC_WARN_PRAGMA 1
|
|
|
|
|
#endif
|