Blender V5.3
BLI_utildefines.hh File Reference
#include "BLI_compiler_compat.hh"
#include "BLI_sys_types.hh"
#include "BLI_utildefines_variadic.hh"
#include "BLI_assert.hh"
#include "BLI_compiler_typecheck.hh"
#include <type_traits>
#include <utility>

Go to the source code of this file.

Classes

struct  blender::blenlib_internal::IsBoundedArray< T >
struct  blender::blenlib_internal::IsBoundedArray< T[N]>

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::blenlib_internal

Macros

Min/Max Macros
#define INIT_MINMAX(min, max)
#define INIT_MINMAX2(min, max)
Swap/Shift Macros
#define SWAP(type, a, b)
#define SHIFT3(type, a, b, c)
#define SHIFT4(type, a, b, c, d)
Equal to Any Element (ELEM) Macro
#define _VA_ELEM2(v, a)
#define _VA_ELEM3(v, a, b)
#define _VA_ELEM4(v, a, b, c)
#define _VA_ELEM5(v, a, b, c, d)
#define _VA_ELEM6(v, a, b, c, d, e)
#define _VA_ELEM7(v, a, b, c, d, e, f)
#define _VA_ELEM8(v, a, b, c, d, e, f, g)
#define _VA_ELEM9(v, a, b, c, d, e, f, g, h)
#define _VA_ELEM10(v, a, b, c, d, e, f, g, h, i)
#define _VA_ELEM11(v, a, b, c, d, e, f, g, h, i, j)
#define _VA_ELEM12(v, a, b, c, d, e, f, g, h, i, j, k)
#define _VA_ELEM13(v, a, b, c, d, e, f, g, h, i, j, k, l)
#define _VA_ELEM14(v, a, b, c, d, e, f, g, h, i, j, k, l, m)
#define _VA_ELEM15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n)
#define _VA_ELEM16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
#define _VA_ELEM17(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
#define ELEM(...)
Simple Math Macros
#define IS_EQ(a, b)
#define IS_EQF(a, b)
#define IS_EQT(a, b, c)
#define IN_RANGE(a, b, c)
#define IN_RANGE_INCL(a, b, c)
#define DECIMAL_DIGITS_BOUND(t)
Clamp Macros
#define CLAMP(a, b, c)
#define CLAMP_MAX(a, c)
#define CLAMP_MIN(a, b)
Array Unpacking Macros
#define UNPACK2(a)
#define UNPACK3(a)
#define UNPACK4(a)
#define UNPACK2_EX(pre, a, post)
#define UNPACK3_EX(pre, a, post)
#define UNPACK4_EX(pre, a, post)
Array Macros
#define ARRAY_HAS_ITEM(arr_item, arr_start, arr_len)
#define _VA_ARRAY_SET_ITEMS2(v, a)
#define _VA_ARRAY_SET_ITEMS3(v, a, b)
#define _VA_ARRAY_SET_ITEMS4(v, a, b, c)
#define _VA_ARRAY_SET_ITEMS5(v, a, b, c, d)
#define _VA_ARRAY_SET_ITEMS6(v, a, b, c, d, e)
#define _VA_ARRAY_SET_ITEMS7(v, a, b, c, d, e, f)
#define _VA_ARRAY_SET_ITEMS8(v, a, b, c, d, e, f, g)
#define _VA_ARRAY_SET_ITEMS9(v, a, b, c, d, e, f, g, h)
#define _VA_ARRAY_SET_ITEMS10(v, a, b, c, d, e, f, g, h, i)
#define _VA_ARRAY_SET_ITEMS11(v, a, b, c, d, e, f, g, h, i, j)
#define _VA_ARRAY_SET_ITEMS12(v, a, b, c, d, e, f, g, h, i, j, k)
#define _VA_ARRAY_SET_ITEMS13(v, a, b, c, d, e, f, g, h, i, j, k, l)
#define _VA_ARRAY_SET_ITEMS14(v, a, b, c, d, e, f, g, h, i, j, k, l, m)
#define _VA_ARRAY_SET_ITEMS15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n)
#define _VA_ARRAY_SET_ITEMS16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
#define _VA_ARRAY_SET_ITEMS17(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
#define ARRAY_SET_ITEMS(...)
Pointer Macros
#define POINTER_OFFSET(v, ofs)
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
#define POINTER_FROM_UINT(i)
#define POINTER_AS_UINT(i)
Struct After Macros

Typically used to copy/clear polymorphic structs which have a generic member at the start which needs to be left as-is.

#define OFFSETOF_STRUCT_AFTER(_struct, _member)
#define MEMCPY_STRUCT_AFTER(struct_dst, struct_src, member)
#define MEMSET_STRUCT_AFTER(struct_var, value, member)
#define MEMCMP_STRUCT_AFTER_IS_ZERO_OR_EQUAL(struct_dst, struct_src, member)
#define INIT_DEFAULT_STRUCT_AFTER(struct_dst, member)
String Macros
#define STRINGIFY_ARG(x)
#define STRINGIFY_APPEND(a, b)
#define STRINGIFY(x)
#define STREQ(a, b)
#define STRCASEEQ(a, b)
#define STREQLEN(a, b, n)
#define STRCASEEQLEN(a, b, n)
#define STRPREFIX(a, b)
Unused Function/Argument Macros
#define UNUSED_FUNCTION(x)
#define UNUSED_FUNCTION_WITH_RETURN_TYPE(rtype, x)
#define _VA_UNUSED_VARS_1(a0)
#define _VA_UNUSED_VARS_2(a0, b0)
#define _VA_UNUSED_VARS_3(a0, b0, c0)
#define _VA_UNUSED_VARS_4(a0, b0, c0, d0)
#define _VA_UNUSED_VARS_5(a0, b0, c0, d0, e0)
#define _VA_UNUSED_VARS_6(a0, b0, c0, d0, e0, f0)
#define _VA_UNUSED_VARS_7(a0, b0, c0, d0, e0, f0, g0)
#define _VA_UNUSED_VARS_8(a0, b0, c0, d0, e0, f0, g0, h0)
#define _VA_UNUSED_VARS_9(a0, b0, c0, d0, e0, f0, g0, h0, i0)
#define _VA_UNUSED_VARS_10(a0, b0, c0, d0, e0, f0, g0, h0, i0, j0)
#define _VA_UNUSED_VARS_11(a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0)
#define _VA_UNUSED_VARS_12(a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0)
#define _VA_UNUSED_VARS_13(a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0)
#define _VA_UNUSED_VARS_14(a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0)
#define _VA_UNUSED_VARS_15(a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0)
#define _VA_UNUSED_VARS_16(a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0, p0)
#define UNUSED_VARS(...)
#define UNUSED_VARS_NDEBUG(...)
Branch Prediction Macros
#define LIKELY(x)
#define UNLIKELY(x)
Flag Macros
#define SET_FLAG_FROM_TEST(value, test, flag)
Misc Macros
#define AT   __FILE__ ":" STRINGIFY(__LINE__)
#define EXPR_NOP(expr)
#define BLI_NO_UNIQUE_ADDRESS   [[no_unique_address]]

Functions

template<class T, size_t N>
constexpr size_t blender::ARRAY_SIZE (const T(&arg)[N]) noexcept
template<class T>
constexpr std::enable_if_t< blenlib_internal::IsBoundedArray< T >::value, size_t > blender::BOUNDED_ARRAY_TYPE_SIZE () noexcept
Simple Math Macros
constexpr int64_t blender::is_power_of_2 (const int64_t x)
constexpr int64_t blender::log2_floor (const int64_t x)
constexpr int64_t blender::log2_ceil (const int64_t x)
constexpr int64_t blender::power_of_2_max (const int64_t x)
Struct After Macros

Typically used to copy/clear polymorphic structs which have a generic member at the start which needs to be left as-is.

constexpr bool blender::memory_is_zero (const void *data, const size_t size)
template<typename T>
constexpr bool blender::value_is_zero_memory (const T &value)

Macro Definition Documentation

◆ _VA_ARRAY_SET_ITEMS10

#define _VA_ARRAY_SET_ITEMS10 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i )
Value:
_VA_ARRAY_SET_ITEMS9(v, a, b, c, d, e, f, g, h); \
((v)[8] = (i))
#define _VA_ARRAY_SET_ITEMS9(v, a, b, c, d, e, f, g, h)

Definition at line 278 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS11

#define _VA_ARRAY_SET_ITEMS11 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j )
Value:
_VA_ARRAY_SET_ITEMS10(v, a, b, c, d, e, f, g, h, i); \
((v)[9] = (j))
#define _VA_ARRAY_SET_ITEMS10(v, a, b, c, d, e, f, g, h, i)

Definition at line 281 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS12

#define _VA_ARRAY_SET_ITEMS12 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k )
Value:
_VA_ARRAY_SET_ITEMS11(v, a, b, c, d, e, f, g, h, i, j); \
((v)[10] = (k))
#define _VA_ARRAY_SET_ITEMS11(v, a, b, c, d, e, f, g, h, i, j)

Definition at line 284 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS13

#define _VA_ARRAY_SET_ITEMS13 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k,
l )
Value:
_VA_ARRAY_SET_ITEMS12(v, a, b, c, d, e, f, g, h, i, j, k); \
((v)[11] = (l))
#define _VA_ARRAY_SET_ITEMS12(v, a, b, c, d, e, f, g, h, i, j, k)

Definition at line 287 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS14

#define _VA_ARRAY_SET_ITEMS14 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k,
l,
m )
Value:
_VA_ARRAY_SET_ITEMS13(v, a, b, c, d, e, f, g, h, i, j, k, l); \
((v)[12] = (m))
#define _VA_ARRAY_SET_ITEMS13(v, a, b, c, d, e, f, g, h, i, j, k, l)

Definition at line 290 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS15

#define _VA_ARRAY_SET_ITEMS15 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k,
l,
m,
n )
Value:
_VA_ARRAY_SET_ITEMS14(v, a, b, c, d, e, f, g, h, i, j, k, l, m); \
((v)[13] = (n))
#define _VA_ARRAY_SET_ITEMS14(v, a, b, c, d, e, f, g, h, i, j, k, l, m)

Definition at line 293 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS16

#define _VA_ARRAY_SET_ITEMS16 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k,
l,
m,
n,
o )
Value:
_VA_ARRAY_SET_ITEMS15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n); \
((v)[14] = (o))
#define _VA_ARRAY_SET_ITEMS15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n)

Definition at line 296 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS17

#define _VA_ARRAY_SET_ITEMS17 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k,
l,
m,
n,
o,
p )
Value:
_VA_ARRAY_SET_ITEMS16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); \
((v)[15] = (p))
#define _VA_ARRAY_SET_ITEMS16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)

Definition at line 299 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS2

#define _VA_ARRAY_SET_ITEMS2 ( v,
a )
Value:
((v)[0] = (a))

Definition at line 256 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS3

#define _VA_ARRAY_SET_ITEMS3 ( v,
a,
b )
Value:
((v)[1] = (b))
#define _VA_ARRAY_SET_ITEMS2(v, a)

Definition at line 257 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS4

#define _VA_ARRAY_SET_ITEMS4 ( v,
a,
b,
c )
Value:
((v)[2] = (c))
#define _VA_ARRAY_SET_ITEMS3(v, a, b)

Definition at line 260 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS5

#define _VA_ARRAY_SET_ITEMS5 ( v,
a,
b,
c,
d )
Value:
_VA_ARRAY_SET_ITEMS4(v, a, b, c); \
((v)[3] = (d))
#define _VA_ARRAY_SET_ITEMS4(v, a, b, c)

Definition at line 263 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS6

#define _VA_ARRAY_SET_ITEMS6 ( v,
a,
b,
c,
d,
e )
Value:
_VA_ARRAY_SET_ITEMS5(v, a, b, c, d); \
((v)[4] = (e))
#define _VA_ARRAY_SET_ITEMS5(v, a, b, c, d)

Definition at line 266 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS7

#define _VA_ARRAY_SET_ITEMS7 ( v,
a,
b,
c,
d,
e,
f )
Value:
_VA_ARRAY_SET_ITEMS6(v, a, b, c, d, e); \
((v)[5] = (f))
#define _VA_ARRAY_SET_ITEMS6(v, a, b, c, d, e)

Definition at line 269 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS8

#define _VA_ARRAY_SET_ITEMS8 ( v,
a,
b,
c,
d,
e,
f,
g )
Value:
_VA_ARRAY_SET_ITEMS7(v, a, b, c, d, e, f); \
((v)[6] = (g))
#define _VA_ARRAY_SET_ITEMS7(v, a, b, c, d, e, f)

Definition at line 272 of file blenkernel/intern/sound.cc.

◆ _VA_ARRAY_SET_ITEMS9

#define _VA_ARRAY_SET_ITEMS9 ( v,
a,
b,
c,
d,
e,
f,
g,
h )
Value:
_VA_ARRAY_SET_ITEMS8(v, a, b, c, d, e, f, g); \
((v)[7] = (h))
#define _VA_ARRAY_SET_ITEMS8(v, a, b, c, d, e, f, g)

Definition at line 275 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM10

#define _VA_ELEM10 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i )
Value:
(_VA_ELEM9(v, a, b, c, d, e, f, g, h) || _VA_ELEM2(v, i))
#define _VA_ELEM9(v, a, b, c, d, e, f, g, h)
#define _VA_ELEM2(v, a)

Definition at line 116 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM11

#define _VA_ELEM11 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j )
Value:
(_VA_ELEM10(v, a, b, c, d, e, f, g, h, i) || _VA_ELEM2(v, j))
#define _VA_ELEM10(v, a, b, c, d, e, f, g, h, i)

Definition at line 118 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM12

#define _VA_ELEM12 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k )
Value:
(_VA_ELEM11(v, a, b, c, d, e, f, g, h, i, j) || _VA_ELEM2(v, k))
#define _VA_ELEM11(v, a, b, c, d, e, f, g, h, i, j)

Definition at line 120 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM13

#define _VA_ELEM13 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k,
l )
Value:
(_VA_ELEM12(v, a, b, c, d, e, f, g, h, i, j, k) || _VA_ELEM2(v, l))
#define _VA_ELEM12(v, a, b, c, d, e, f, g, h, i, j, k)

Definition at line 122 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM14

#define _VA_ELEM14 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k,
l,
m )
Value:
(_VA_ELEM13(v, a, b, c, d, e, f, g, h, i, j, k, l) || _VA_ELEM2(v, m))
#define _VA_ELEM13(v, a, b, c, d, e, f, g, h, i, j, k, l)

Definition at line 124 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM15

#define _VA_ELEM15 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k,
l,
m,
n )
Value:
(_VA_ELEM14(v, a, b, c, d, e, f, g, h, i, j, k, l, m) || _VA_ELEM2(v, n))
#define _VA_ELEM14(v, a, b, c, d, e, f, g, h, i, j, k, l, m)

Definition at line 126 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM16

#define _VA_ELEM16 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k,
l,
m,
n,
o )
Value:
(_VA_ELEM15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n) || _VA_ELEM2(v, o))
#define _VA_ELEM15(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n)

Definition at line 128 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM17

#define _VA_ELEM17 ( v,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k,
l,
m,
n,
o,
p )
Value:
(_VA_ELEM16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) || _VA_ELEM2(v, p))
#define _VA_ELEM16(v, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)

Definition at line 130 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM2

#define _VA_ELEM2 ( v,
a )
Value:
((v) == (a))

Definition at line 101 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM3

#define _VA_ELEM3 ( v,
a,
b )
Value:
(_VA_ELEM2(v, a) || _VA_ELEM2(v, b))

Definition at line 102 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM4

#define _VA_ELEM4 ( v,
a,
b,
c )
Value:
(_VA_ELEM3(v, a, b) || _VA_ELEM2(v, c))
#define _VA_ELEM3(v, a, b)

Definition at line 104 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM5

#define _VA_ELEM5 ( v,
a,
b,
c,
d )
Value:
(_VA_ELEM4(v, a, b, c) || _VA_ELEM2(v, d))
#define _VA_ELEM4(v, a, b, c)

Definition at line 106 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM6

#define _VA_ELEM6 ( v,
a,
b,
c,
d,
e )
Value:
(_VA_ELEM5(v, a, b, c, d) || _VA_ELEM2(v, e))
#define _VA_ELEM5(v, a, b, c, d)

Definition at line 108 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM7

#define _VA_ELEM7 ( v,
a,
b,
c,
d,
e,
f )
Value:
(_VA_ELEM6(v, a, b, c, d, e) || _VA_ELEM2(v, f))
#define _VA_ELEM6(v, a, b, c, d, e)

Definition at line 110 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM8

#define _VA_ELEM8 ( v,
a,
b,
c,
d,
e,
f,
g )
Value:
(_VA_ELEM7(v, a, b, c, d, e, f) || _VA_ELEM2(v, g))
#define _VA_ELEM7(v, a, b, c, d, e, f)

Definition at line 112 of file blenkernel/intern/sound.cc.

◆ _VA_ELEM9

#define _VA_ELEM9 ( v,
a,
b,
c,
d,
e,
f,
g,
h )
Value:
(_VA_ELEM8(v, a, b, c, d, e, f, g) || _VA_ELEM2(v, h))
#define _VA_ELEM8(v, a, b, c, d, e, f, g)

Definition at line 114 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_1

#define _VA_UNUSED_VARS_1 ( a0)
Value:
((void)(a0))

UNUSED_VARS#(a, ...): quiet unused warnings

for i in range(16):
args = [(chr(ord('a') + (c % 26)) + (chr(ord('0') + (c // 26)))) for c in range(i + 1)]
print("#define _VA_UNUSED_VARS_%d(%s) \\" % (i + 1, ", ".join(args)))
print("\t((void)(%s)%s)" %
(args[0], ((", _VA_UNUSED_VARS_" + str(i) + "(%s)") if i else "%s") %
", ".join((args[1:]))))
#define str(s)

Definition at line 493 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_10

#define _VA_UNUSED_VARS_10 ( a0,
b0,
c0,
d0,
e0,
f0,
g0,
h0,
i0,
j0 )
Value:
((void)(a0), _VA_UNUSED_VARS_9(b0, c0, d0, e0, f0, g0, h0, i0, j0))
#define _VA_UNUSED_VARS_9(a0, b0, c0, d0, e0, f0, g0, h0, i0)

Definition at line 506 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_11

#define _VA_UNUSED_VARS_11 ( a0,
b0,
c0,
d0,
e0,
f0,
g0,
h0,
i0,
j0,
k0 )
Value:
((void)(a0), _VA_UNUSED_VARS_10(b0, c0, d0, e0, f0, g0, h0, i0, j0, k0))
#define _VA_UNUSED_VARS_10(a0, b0, c0, d0, e0, f0, g0, h0, i0, j0)

Definition at line 508 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_12

#define _VA_UNUSED_VARS_12 ( a0,
b0,
c0,
d0,
e0,
f0,
g0,
h0,
i0,
j0,
k0,
l0 )
Value:
((void)(a0), _VA_UNUSED_VARS_11(b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0))
#define _VA_UNUSED_VARS_11(a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0)

Definition at line 510 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_13

#define _VA_UNUSED_VARS_13 ( a0,
b0,
c0,
d0,
e0,
f0,
g0,
h0,
i0,
j0,
k0,
l0,
m0 )
Value:
((void)(a0), _VA_UNUSED_VARS_12(b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0))
#define _VA_UNUSED_VARS_12(a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0)

Definition at line 512 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_14

#define _VA_UNUSED_VARS_14 ( a0,
b0,
c0,
d0,
e0,
f0,
g0,
h0,
i0,
j0,
k0,
l0,
m0,
n0 )
Value:
((void)(a0), _VA_UNUSED_VARS_13(b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0))
#define _VA_UNUSED_VARS_13(a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0)

Definition at line 514 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_15

#define _VA_UNUSED_VARS_15 ( a0,
b0,
c0,
d0,
e0,
f0,
g0,
h0,
i0,
j0,
k0,
l0,
m0,
n0,
o0 )
Value:
((void)(a0), _VA_UNUSED_VARS_14(b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0))
#define _VA_UNUSED_VARS_14(a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0)

Definition at line 516 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_16

#define _VA_UNUSED_VARS_16 ( a0,
b0,
c0,
d0,
e0,
f0,
g0,
h0,
i0,
j0,
k0,
l0,
m0,
n0,
o0,
p0 )
Value:
((void)(a0), _VA_UNUSED_VARS_15(b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0, p0))
#define _VA_UNUSED_VARS_15(a0, b0, c0, d0, e0, f0, g0, h0, i0, j0, k0, l0, m0, n0, o0)

Definition at line 518 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_2

#define _VA_UNUSED_VARS_2 ( a0,
b0 )
Value:
((void)(a0), _VA_UNUSED_VARS_1(b0))
#define _VA_UNUSED_VARS_1(a0)

Definition at line 494 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_3

#define _VA_UNUSED_VARS_3 ( a0,
b0,
c0 )
Value:
((void)(a0), _VA_UNUSED_VARS_2(b0, c0))
#define _VA_UNUSED_VARS_2(a0, b0)

Definition at line 495 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_4

#define _VA_UNUSED_VARS_4 ( a0,
b0,
c0,
d0 )
Value:
((void)(a0), _VA_UNUSED_VARS_3(b0, c0, d0))
#define _VA_UNUSED_VARS_3(a0, b0, c0)

Definition at line 496 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_5

#define _VA_UNUSED_VARS_5 ( a0,
b0,
c0,
d0,
e0 )
Value:
((void)(a0), _VA_UNUSED_VARS_4(b0, c0, d0, e0))
#define _VA_UNUSED_VARS_4(a0, b0, c0, d0)

Definition at line 497 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_6

#define _VA_UNUSED_VARS_6 ( a0,
b0,
c0,
d0,
e0,
f0 )
Value:
((void)(a0), _VA_UNUSED_VARS_5(b0, c0, d0, e0, f0))
#define _VA_UNUSED_VARS_5(a0, b0, c0, d0, e0)

Definition at line 498 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_7

#define _VA_UNUSED_VARS_7 ( a0,
b0,
c0,
d0,
e0,
f0,
g0 )
Value:
((void)(a0), _VA_UNUSED_VARS_6(b0, c0, d0, e0, f0, g0))
#define _VA_UNUSED_VARS_6(a0, b0, c0, d0, e0, f0)

Definition at line 500 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_8

#define _VA_UNUSED_VARS_8 ( a0,
b0,
c0,
d0,
e0,
f0,
g0,
h0 )
Value:
((void)(a0), _VA_UNUSED_VARS_7(b0, c0, d0, e0, f0, g0, h0))
#define _VA_UNUSED_VARS_7(a0, b0, c0, d0, e0, f0, g0)

Definition at line 502 of file blenkernel/intern/sound.cc.

◆ _VA_UNUSED_VARS_9

#define _VA_UNUSED_VARS_9 ( a0,
b0,
c0,
d0,
e0,
f0,
g0,
h0,
i0 )
Value:
((void)(a0), _VA_UNUSED_VARS_8(b0, c0, d0, e0, f0, g0, h0, i0))
#define _VA_UNUSED_VARS_8(a0, b0, c0, d0, e0, f0, g0, h0)

Definition at line 504 of file blenkernel/intern/sound.cc.

◆ ARRAY_HAS_ITEM

#define ARRAY_HAS_ITEM ( arr_item,
arr_start,
arr_len )
Value:
(CHECK_TYPE_PAIR_INLINE(arr_start, arr_item), \
((size_t)((arr_item) - (arr_start)) < (size_t)(arr_len)))
#define CHECK_TYPE_PAIR_INLINE(var_a, var_b)

Definition at line 248 of file blenkernel/intern/sound.cc.

◆ ARRAY_SET_ITEMS

#define ARRAY_SET_ITEMS ( ...)
Value:
{ \
VA_NARGS_CALL_OVERLOAD(_VA_ARRAY_SET_ITEMS, __VA_ARGS__); \
} \
(void)0

Definition at line 304 of file blenkernel/intern/sound.cc.

◆ AT

#define AT   __FILE__ ":" STRINGIFY(__LINE__)

Useful for debugging.

Definition at line 575 of file blenkernel/intern/sound.cc.

◆ BLI_NO_UNIQUE_ADDRESS

#define BLI_NO_UNIQUE_ADDRESS   [[no_unique_address]]

Definition at line 589 of file blenkernel/intern/sound.cc.

◆ CLAMP

#define CLAMP ( a,
b,
c )
Value:
{ \
if ((a) < (b)) { \
(a) = (b); \
} \
else if ((a) > (c)) { \
(a) = (c); \
} \
} \
(void)0

Definition at line 200 of file blenkernel/intern/sound.cc.

◆ CLAMP_MAX

#define CLAMP_MAX ( a,
c )
Value:
{ \
if ((a) > (c)) { \
(a) = (c); \
} \
} \
(void)0

Definition at line 211 of file blenkernel/intern/sound.cc.

◆ CLAMP_MIN

#define CLAMP_MIN ( a,
b )
Value:
{ \
if ((a) < (b)) { \
(a) = (b); \
} \
} \
(void)0

Definition at line 219 of file blenkernel/intern/sound.cc.

◆ DECIMAL_DIGITS_BOUND

#define DECIMAL_DIGITS_BOUND ( t)
Value:
(241 * sizeof(t) / 100 + 1)

Expands to an integer constant expression evaluating to a close upper bound on the number the number of decimal digits in a value expressible in the integer type given by the argument (if it is a type name) or the integer type of the argument (if it is an expression). The meaning of the resulting expression is unspecified for other arguments. i.e: DECIMAL_DIGITS_BOUND(uchar) is equal to 3.

Definition at line 168 of file blenkernel/intern/sound.cc.

◆ ELEM

#define ELEM ( ...)
Value:
VA_NARGS_CALL_OVERLOAD(_VA_ELEM, __VA_ARGS__)
#define VA_NARGS_CALL_OVERLOAD(name,...)

Definition at line 135 of file blenkernel/intern/sound.cc.

◆ EXPR_NOP

#define EXPR_NOP ( expr)
Value:
(void)(0 ? ((void)(expr), 1) : 0)

No-op for expressions we don't want to instantiate, but must remain valid.

Definition at line 578 of file blenkernel/intern/sound.cc.

◆ IN_RANGE

#define IN_RANGE ( a,
b,
c )
Value:
(((b) < (c)) ? (((b) < (a) && (a) < (c))) : (((c) < (a) && (a) < (b))))

Definition at line 156 of file blenkernel/intern/sound.cc.

◆ IN_RANGE_INCL

#define IN_RANGE_INCL ( a,
b,
c )
Value:
(((b) < (c)) ? (((b) <= (a) && (a) <= (c))) : (((c) <= (a) && (a) <= (b))))

Definition at line 157 of file blenkernel/intern/sound.cc.

◆ INIT_DEFAULT_STRUCT_AFTER

#define INIT_DEFAULT_STRUCT_AFTER ( struct_dst,
member )
Value:
{ \
const typename std::remove_reference<decltype(*(struct_dst))>::type struct_src; \
BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO_OR_EQUAL(struct_dst, &struct_src, member)); \
MEMCPY_STRUCT_AFTER(struct_dst, &struct_src, member); \
}
#define MEMCMP_STRUCT_AFTER_IS_ZERO_OR_EQUAL(struct_dst, struct_src, member)

Definition at line 422 of file blenkernel/intern/sound.cc.

◆ INIT_MINMAX

#define INIT_MINMAX ( min,
max )
Value:
{ \
(min)[0] = (min)[1] = (min)[2] = 1.0e30f; \
(max)[0] = (max)[1] = (max)[2] = -1.0e30f; \
} \
(void)0
btScalar max
#define min(a, b)
Definition sort.cc:38

Definition at line 31 of file blenkernel/intern/sound.cc.

◆ INIT_MINMAX2

#define INIT_MINMAX2 ( min,
max )
Value:
{ \
(min)[0] = (min)[1] = 1.0e30f; \
(max)[0] = (max)[1] = -1.0e30f; \
} \
(void)0

Definition at line 37 of file blenkernel/intern/sound.cc.

◆ IS_EQ

#define IS_EQ ( a,
b )
Value:
CHECK_TYPE_INLINE_NONCONST(b, double), \
((fabs((double)((a) - (b))) >= (double)FLT_EPSILON) ? false : true))
#define CHECK_TYPE_INLINE_NONCONST(val, type)
#define FLT_EPSILON
ccl_device_inline dual3 fabs(const ccl_private dual3 &a)
Definition math_dual.h:241

Definition at line 145 of file blenkernel/intern/sound.cc.

◆ IS_EQF

#define IS_EQF ( a,
b )
Value:
CHECK_TYPE_INLINE_NONCONST(b, float), \
((fabsf((float)((a) - (b))) >= (float)FLT_EPSILON) ? false : true))
#define fabsf
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float

Definition at line 150 of file blenkernel/intern/sound.cc.

◆ IS_EQT

#define IS_EQT ( a,
b,
c )
Value:
(((a) > (b)) ? ((((a) - (b)) <= (c))) : (((((b) - (a)) <= (c)))))

Definition at line 155 of file blenkernel/intern/sound.cc.

◆ LIKELY

#define LIKELY ( x)
Value:

Definition at line 546 of file blenkernel/intern/sound.cc.

◆ MEMCMP_STRUCT_AFTER_IS_ZERO_OR_EQUAL

#define MEMCMP_STRUCT_AFTER_IS_ZERO_OR_EQUAL ( struct_dst,
struct_src,
member )
Value:
(memory_is_zero((const char *)(struct_dst) + OFFSETOF_STRUCT_AFTER(struct_dst, member), \
sizeof(*(struct_dst)) - OFFSETOF_STRUCT_AFTER(struct_dst, member)) || \
(memcmp((const char *)(struct_dst) + OFFSETOF_STRUCT_AFTER(struct_dst, member), \
(const char *)(struct_src) + OFFSETOF_STRUCT_AFTER(struct_src, member), \
sizeof(*(struct_dst)) - OFFSETOF_STRUCT_AFTER(struct_dst, member)) == 0))
#define OFFSETOF_STRUCT_AFTER(_struct, _member)

Definition at line 415 of file blenkernel/intern/sound.cc.

◆ MEMCPY_STRUCT_AFTER

#define MEMCPY_STRUCT_AFTER ( struct_dst,
struct_src,
member )
Value:
{ \
CHECK_TYPE_NONCONST(struct_dst); \
((void)(struct_dst == struct_src), \
memcpy((char *)(struct_dst) + OFFSETOF_STRUCT_AFTER(struct_dst, member), \
(const char *)(struct_src) + OFFSETOF_STRUCT_AFTER(struct_dst, member), \
sizeof(*(struct_dst)) - OFFSETOF_STRUCT_AFTER(struct_dst, member))); \
} \
((void)0)

memcpy helper, skipping the first part of a struct, ensures 'struct_dst' isn't const and the offset can be computed at compile time. This isn't inclusive, the value of member isn't copied.

Definition at line 347 of file blenkernel/intern/sound.cc.

◆ MEMSET_STRUCT_AFTER

#define MEMSET_STRUCT_AFTER ( struct_var,
value,
member )
Value:
{ \
CHECK_TYPE_NONCONST(struct_var); \
memset((char *)(struct_var) + OFFSETOF_STRUCT_AFTER(struct_var, member), \
value, \
sizeof(*(struct_var)) - OFFSETOF_STRUCT_AFTER(struct_var, member)); \
} \
((void)0)

Definition at line 357 of file blenkernel/intern/sound.cc.

◆ OFFSETOF_STRUCT_AFTER

#define OFFSETOF_STRUCT_AFTER ( _struct,
_member )
Value:
((size_t)(((const char *)&((_struct)->_member)) - ((const char *)(_struct))) + \
sizeof((_struct)->_member))

Performs offsetof(decltype(data), member) + sizeof((DNA, RNA and .blend access)->member) for non-gcc compilers.

Definition at line 338 of file blenkernel/intern/sound.cc.

◆ POINTER_AS_INT

#define POINTER_AS_INT ( i)
Value:
((void)0, ((int)(intptr_t)(i)))

Definition at line 322 of file blenkernel/intern/sound.cc.

◆ POINTER_AS_UINT

#define POINTER_AS_UINT ( i)
Value:
((void)0, ((unsigned int)(uintptr_t)(i)))

Definition at line 325 of file blenkernel/intern/sound.cc.

◆ POINTER_FROM_INT

#define POINTER_FROM_INT ( i)
Value:
((void *)(intptr_t)(i))

Definition at line 321 of file blenkernel/intern/sound.cc.

◆ POINTER_FROM_UINT

#define POINTER_FROM_UINT ( i)
Value:
((void *)(uintptr_t)(i))

Definition at line 324 of file blenkernel/intern/sound.cc.

◆ POINTER_OFFSET

#define POINTER_OFFSET ( v,
ofs )
Value:
(reinterpret_cast<std::remove_reference_t<decltype(v)>>((char *)(v) + (ofs)))

Definition at line 316 of file blenkernel/intern/sound.cc.

◆ SET_FLAG_FROM_TEST

#define SET_FLAG_FROM_TEST ( value,
test,
flag )
Value:
{ \
if (test) { \
(value) |= (flag); \
} \
else { \
(value) &= ~(flag); \
} \
} \
((void)0)

Definition at line 557 of file blenkernel/intern/sound.cc.

◆ SHIFT3

#define SHIFT3 ( type,
a,
b,
c )
Value:
{ \
type tmp; \
CHECK_TYPE(a, type); \
CHECK_TYPE(b, type); \
CHECK_TYPE(c, type); \
tmp = a; \
a = c; \
c = b; \
b = tmp; \
} \
(void)0

Definition at line 62 of file blenkernel/intern/sound.cc.

◆ SHIFT4

#define SHIFT4 ( type,
a,
b,
c,
d )
Value:
{ \
type tmp; \
CHECK_TYPE(a, type); \
CHECK_TYPE(b, type); \
CHECK_TYPE(c, type); \
CHECK_TYPE(d, type); \
tmp = a; \
a = d; \
d = c; \
c = b; \
b = tmp; \
} \
(void)0

Definition at line 75 of file blenkernel/intern/sound.cc.

◆ STRCASEEQ

#define STRCASEEQ ( a,
b )
Value:
(strcasecmp(a, b) == 0)

Definition at line 452 of file blenkernel/intern/sound.cc.

◆ STRCASEEQLEN

#define STRCASEEQLEN ( a,
b,
n )
Value:
(strncasecmp(a, b, n) == 0)

Definition at line 454 of file blenkernel/intern/sound.cc.

◆ STREQ

#define STREQ ( a,
b )
Value:
(strcmp(a, b) == 0)

Definition at line 451 of file blenkernel/intern/sound.cc.

◆ STREQLEN

#define STREQLEN ( a,
b,
n )
Value:
(strncmp(a, b, n) == 0)

Definition at line 453 of file blenkernel/intern/sound.cc.

◆ STRINGIFY

#define STRINGIFY ( x)
Value:
#define STRINGIFY_APPEND(a, b)

Definition at line 443 of file blenkernel/intern/sound.cc.

◆ STRINGIFY_APPEND

#define STRINGIFY_APPEND ( a,
b )
Value:
"" a #b

Definition at line 442 of file blenkernel/intern/sound.cc.

◆ STRINGIFY_ARG

#define STRINGIFY_ARG ( x)
Value:
"" #x

Definition at line 441 of file blenkernel/intern/sound.cc.

◆ STRPREFIX

#define STRPREFIX ( a,
b )
Value:
(strncmp((a), (b), strlen(b)) == 0)

Definition at line 456 of file blenkernel/intern/sound.cc.

◆ SWAP

#define SWAP ( type,
a,
b )
Value:
{ \
type sw_ap; \
CHECK_TYPE(a, type); \
CHECK_TYPE(b, type); \
sw_ap = (a); \
(a) = (b); \
(b) = sw_ap; \
} \
(void)0

Definition at line 50 of file blenkernel/intern/sound.cc.

◆ UNLIKELY

#define UNLIKELY ( x)
Value:
(x)

Definition at line 547 of file blenkernel/intern/sound.cc.

◆ UNPACK2

#define UNPACK2 ( a)
Value:
((a)[0]), ((a)[1])

Definition at line 234 of file blenkernel/intern/sound.cc.

◆ UNPACK2_EX

#define UNPACK2_EX ( pre,
a,
post )
Value:
(pre((a)[0]) post), (pre((a)[1]) post)

Definition at line 238 of file blenkernel/intern/sound.cc.

◆ UNPACK3

#define UNPACK3 ( a)
Value:
UNPACK2(a), ((a)[2])
#define UNPACK2(a)

Definition at line 235 of file blenkernel/intern/sound.cc.

◆ UNPACK3_EX

#define UNPACK3_EX ( pre,
a,
post )
Value:
UNPACK2_EX(pre, a, post), (pre((a)[2]) post)
#define UNPACK2_EX(pre, a, post)

Definition at line 239 of file blenkernel/intern/sound.cc.

◆ UNPACK4

#define UNPACK4 ( a)
Value:
UNPACK3(a), ((a)[3])
#define UNPACK3(a)

Definition at line 236 of file blenkernel/intern/sound.cc.

◆ UNPACK4_EX

#define UNPACK4_EX ( pre,
a,
post )
Value:
UNPACK3_EX(pre, a, post), (pre((a)[3]) post)
#define UNPACK3_EX(pre, a, post)

Definition at line 240 of file blenkernel/intern/sound.cc.

◆ UNUSED_FUNCTION

#define UNUSED_FUNCTION ( x)
Value:
UNUSED_##x

WARNING: this doesn't warn when returning pointer types (because of the placement of *). Use UNUSED_FUNCTION_WITH_RETURN_TYPE instead in this case.

Definition at line 471 of file blenkernel/intern/sound.cc.

◆ UNUSED_FUNCTION_WITH_RETURN_TYPE

#define UNUSED_FUNCTION_WITH_RETURN_TYPE ( rtype,
x )
Value:
rtype UNUSED_##x

Definition at line 477 of file blenkernel/intern/sound.cc.

◆ UNUSED_VARS

#define UNUSED_VARS ( ...)
Value:
VA_NARGS_CALL_OVERLOAD(_VA_UNUSED_VARS_, __VA_ARGS__)

Definition at line 522 of file blenkernel/intern/sound.cc.

◆ UNUSED_VARS_NDEBUG

#define UNUSED_VARS_NDEBUG ( ...)

Definition at line 526 of file blenkernel/intern/sound.cc.