Blender V4.3
blender::bits::detail Namespace Reference

Functions

template<typename ExprFn , typename FirstBitSpanT , typename... BitSpanT>
void mix_into_first_expr (ExprFn &&expr, const FirstBitSpanT &first_arg, const BitSpanT &...args)
 
template<typename ExprFn , typename FirstBitSpanT , typename... BitSpanT>
bool any_set_expr (ExprFn &&expr, const FirstBitSpanT &first_arg, const BitSpanT &...args)
 
template<typename ExprFn , typename HandleFn , typename FirstBitSpanT , typename... BitSpanT>
void foreach_1_index_expr (ExprFn &&expr, HandleFn &&handle, const FirstBitSpanT &first_arg, const BitSpanT &...args)
 

Function Documentation

◆ any_set_expr()

template<typename ExprFn , typename FirstBitSpanT , typename... BitSpanT>
bool blender::bits::detail::any_set_expr ( ExprFn && expr,
const FirstBitSpanT & first_arg,
const BitSpanT &... args )
inline

Evaluates the expression on one or more bit spans and returns true when the result contains a 1 anywhere.

The expected type for the expression is: (BitInt ...one_or_more_args) -> BitInt

Definition at line 67 of file BLI_bit_span_ops.hh.

References blender::bits::all_bounded_spans, BLI_assert, and blender::bits::mask_first_n_bits().

Referenced by blender::bits::any_set_expr().

◆ foreach_1_index_expr()

template<typename ExprFn , typename HandleFn , typename FirstBitSpanT , typename... BitSpanT>
void blender::bits::detail::foreach_1_index_expr ( ExprFn && expr,
HandleFn && handle,
const FirstBitSpanT & first_arg,
const BitSpanT &... args )
inline

Evaluates the expression on one or more bit spans and calls the handle function for each bit index where the result is 1.

The expected type for the expression is: (BitInt ...one_or_more_args) -> BitInt

Definition at line 117 of file BLI_bit_span_ops.hh.

References blender::bits::all_bounded_spans, bitscan_forward_uint64(), blender::bits::BitToIntIndexShift, BLI_assert, and blender::bits::mask_first_n_bits().

Referenced by blender::bits::foreach_1_index_expr().

◆ mix_into_first_expr()

template<typename ExprFn , typename FirstBitSpanT , typename... BitSpanT>
void blender::bits::detail::mix_into_first_expr ( ExprFn && expr,
const FirstBitSpanT & first_arg,
const BitSpanT &... args )
inline

Evaluates the expression on one or more bit spans and stores the result in the first.

The expected type for the expression is: (BitInt ...one_or_more_args) -> BitInt

Definition at line 21 of file BLI_bit_span_ops.hh.

References blender::bits::all_bounded_spans, BLI_assert, and blender::bits::mask_range_bits().

Referenced by blender::bits::mix_into_first_expr().