Blender  V3.3
Functions
BLI_math_bits.h File Reference
#include "BLI_math_inline.h"
#include "BLI_utildefines.h"
#include "intern/math_bits_inline.c"

Go to the source code of this file.

Functions

MINLINE int bitscan_forward_i (int a)
 
MINLINE unsigned int bitscan_forward_uint (unsigned int a)
 
MINLINE unsigned int bitscan_forward_uint64 (unsigned long long a)
 
MINLINE int bitscan_forward_clear_i (int *a)
 
MINLINE unsigned int bitscan_forward_clear_uint (unsigned int *a)
 
MINLINE int bitscan_reverse_i (int a)
 
MINLINE unsigned int bitscan_reverse_uint (unsigned int a)
 
MINLINE unsigned int bitscan_reverse_uint64 (unsigned long long a)
 
MINLINE int bitscan_reverse_clear_i (int *a)
 
MINLINE unsigned int bitscan_reverse_clear_uint (unsigned int *a)
 
MINLINE unsigned int highest_order_bit_uint (unsigned int n)
 
MINLINE unsigned short highest_order_bit_s (unsigned short n)
 
MINLINE int count_bits_i (unsigned int n)
 
MINLINE int float_as_int (float f)
 
MINLINE unsigned int float_as_uint (float f)
 
MINLINE float int_as_float (int i)
 
MINLINE float uint_as_float (unsigned int i)
 
MINLINE float xor_fl (float x, int y)
 

Function Documentation

◆ bitscan_forward_clear_i()

MINLINE int bitscan_forward_clear_i ( int *  a)

Definition at line 52 of file math_bits_inline.c.

References Freestyle::a, and bitscan_forward_clear_uint().

Referenced by blender::deg::graph_id_tag_update().

◆ bitscan_forward_clear_uint()

MINLINE unsigned int bitscan_forward_clear_uint ( unsigned int *  a)

Definition at line 45 of file math_bits_inline.c.

References Freestyle::a, and bitscan_forward_uint().

Referenced by bitscan_forward_clear_i().

◆ bitscan_forward_i()

MINLINE int bitscan_forward_i ( int  a)

Definition at line 40 of file math_bits_inline.c.

References Freestyle::a, and bitscan_forward_uint().

Referenced by applyMirror(), and BKE_subdiv_to_ccg().

◆ bitscan_forward_uint()

MINLINE unsigned int bitscan_forward_uint ( unsigned int  a)

◆ bitscan_forward_uint64()

MINLINE unsigned int bitscan_forward_uint64 ( unsigned long long  a)

Definition at line 28 of file math_bits_inline.c.

References Freestyle::a, and BLI_assert.

◆ bitscan_reverse_clear_i()

MINLINE int bitscan_reverse_clear_i ( int *  a)

Definition at line 93 of file math_bits_inline.c.

References Freestyle::a, and bitscan_reverse_clear_uint().

◆ bitscan_reverse_clear_uint()

MINLINE unsigned int bitscan_reverse_clear_uint ( unsigned int *  a)

Definition at line 86 of file math_bits_inline.c.

References Freestyle::a, and bitscan_reverse_uint().

Referenced by bitscan_reverse_clear_i(), and TEST().

◆ bitscan_reverse_i()

MINLINE int bitscan_reverse_i ( int  a)

Definition at line 81 of file math_bits_inline.c.

References Freestyle::a, and bitscan_reverse_uint().

◆ bitscan_reverse_uint()

MINLINE unsigned int bitscan_reverse_uint ( unsigned int  a)

◆ bitscan_reverse_uint64()

MINLINE unsigned int bitscan_reverse_uint64 ( unsigned long long  a)

Definition at line 69 of file math_bits_inline.c.

References Freestyle::a, and BLI_assert.

◆ count_bits_i()

MINLINE int count_bits_i ( unsigned int  n)

◆ float_as_int()

MINLINE int float_as_int ( float  f)

Definition at line 125 of file math_bits_inline.c.

Referenced by isect_ray_tri_watertight_v3(), and xor_fl().

◆ float_as_uint()

MINLINE unsigned int float_as_uint ( float  f)

Definition at line 135 of file math_bits_inline.c.

◆ highest_order_bit_s()

MINLINE unsigned short highest_order_bit_s ( unsigned short  n)

Definition at line 106 of file math_bits_inline.c.

Referenced by EDBM_selectmode_toggle_multi().

◆ highest_order_bit_uint()

MINLINE unsigned int highest_order_bit_uint ( unsigned int  n)

Definition at line 98 of file math_bits_inline.c.

References bitscan_reverse_uint().

◆ int_as_float()

MINLINE float int_as_float ( int  i)

Definition at line 145 of file math_bits_inline.c.

Referenced by render_result_from_bake(), and xor_fl().

◆ uint_as_float()

MINLINE float uint_as_float ( unsigned int  i)

Definition at line 155 of file math_bits_inline.c.

◆ xor_fl()

MINLINE float xor_fl ( float  x,
int  y 
)

Definition at line 165 of file math_bits_inline.c.

References float_as_int(), int_as_float(), x, and y.

Referenced by isect_ray_tri_watertight_v3().