Blender V4.3
BLI_math_bits.h File Reference

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 count_bits_uint64 (uint64_t a)
 
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 54 of file math_bits_inline.c.

References bitscan_forward_clear_uint().

◆ bitscan_forward_clear_uint()

MINLINE unsigned int bitscan_forward_clear_uint ( unsigned int * a)

◆ bitscan_forward_i()

MINLINE int bitscan_forward_i ( int a)

Definition at line 42 of file math_bits_inline.c.

References 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)

◆ bitscan_reverse_clear_i()

MINLINE int bitscan_reverse_clear_i ( int * a)

Definition at line 95 of file math_bits_inline.c.

References bitscan_reverse_clear_uint().

◆ bitscan_reverse_clear_uint()

MINLINE unsigned int bitscan_reverse_clear_uint ( unsigned int * a)

Definition at line 88 of file math_bits_inline.c.

References bitscan_reverse_uint().

Referenced by bitscan_reverse_clear_i(), and TEST().

◆ bitscan_reverse_i()

MINLINE int bitscan_reverse_i ( int a)

Definition at line 83 of file math_bits_inline.c.

References bitscan_reverse_uint().

Referenced by blf_batch_draw().

◆ bitscan_reverse_uint()

MINLINE unsigned int bitscan_reverse_uint ( unsigned int a)

Definition at line 59 of file math_bits_inline.c.

References BLI_assert.

Referenced by bitscan_reverse_clear_uint(), bitscan_reverse_i(), and highest_order_bit_uint().

◆ bitscan_reverse_uint64()

MINLINE unsigned int bitscan_reverse_uint64 ( unsigned long long a)

Definition at line 71 of file math_bits_inline.c.

References BLI_assert.

◆ count_bits_i()

◆ count_bits_uint64()

MINLINE int count_bits_uint64 ( uint64_t a)

Definition at line 125 of file math_bits_inline.c.

References count_bits_i().

Referenced by TEST().

◆ float_as_int()

MINLINE int float_as_int ( float f)

Definition at line 131 of file math_bits_inline.c.

References v.

Referenced by _bli_math_fastpow(), isect_ray_tri_watertight_v3(), and xor_fl().

◆ float_as_uint()

MINLINE unsigned int float_as_uint ( float f)

Definition at line 141 of file math_bits_inline.c.

Referenced by initCurveShrinkFatten(), and object_mouse_select_menu().

◆ highest_order_bit_s()

MINLINE unsigned short highest_order_bit_s ( unsigned short n)

Definition at line 108 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 100 of file math_bits_inline.c.

References bitscan_reverse_uint(), and int.

◆ int_as_float()

MINLINE float int_as_float ( int i)

◆ uint_as_float()

MINLINE float uint_as_float ( unsigned int i)

Definition at line 161 of file math_bits_inline.c.

Referenced by applyCurveShrinkFatten().

◆ xor_fl()

MINLINE float xor_fl ( float x,
int y )

Definition at line 171 of file math_bits_inline.c.

References float_as_int(), and int_as_float().

Referenced by isect_ray_tri_watertight_v3().