Skip to content

armgit / BUI

Public Imported from GitHub
0

Blender's GPU Accelerated UI, Decoupled from it's original codebase. Supports Rust, Python, JS, React, C & C++. Twice as good as GPUI

1.0 KB
Raw Blame
/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
 *
 * SPDX-License-Identifier: GPL-2.0-or-later */

#pragma once

/** \file
 * \ingroup bli
 */

/* add platform/compiler checks here if it is not supported */
/* all platforms support forcing inline so this is always enabled */
#define BLI_MATH_DO_INLINE 1

#if BLI_MATH_DO_INLINE
#  ifdef _MSC_VER
#    define MINLINE inline __forceinline
#    define MALWAYS_INLINE MINLINE
#  elif defined(__cplusplus)
#    define MINLINE inline
#    define MALWAYS_INLINE inline __attribute__((always_inline)) __attribute__((unused))
#  else
     /* C translation units need internal linkage to avoid missing-symbol
      * linker errors (plain `inline` in C requires an external definition). */
#    define MINLINE static inline
#    define MALWAYS_INLINE static inline __attribute__((always_inline))
#  endif
#else
#  define MINLINE
#  define MALWAYS_INLINE
#endif

/* Check for GCC push/pop pragma support. */
#ifdef __GNUC__
#  define BLI_MATH_GCC_WARN_PRAGMA 1
#endif