2022-02-11 09:07:11 +11:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
* Copyright 2001-2002 NaN Holding BV. All rights reserved. */
|
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
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
|
# define MINLINE static __forceinline
|
|
|
|
|
# define MALWAYS_INLINE MINLINE
|
|
|
|
|
# else
|
|
|
|
|
# define MINLINE static inline
|
2017-07-27 07:28:29 +10:00
|
|
|
# define MALWAYS_INLINE static 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
|
|
|
|
|
|
2013-03-13 15:41:14 +00:00
|
|
|
/* gcc 4.6 (supports push/pop) */
|
|
|
|
|
#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406))
|
|
|
|
|
# define BLI_MATH_GCC_WARN_PRAGMA 1
|
|
|
|
|
#endif
|
|
|
|
|
|
2010-01-22 11:10:24 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|