Blender V5.0
blender::fn::multi_function::build::detail Namespace Reference

Classes

struct  MaterializeArgInfo
class  CustomMF

Enumerations

enum class  MaterializeArgMode { Unknown , Single , Span , Materialized }

Functions

template<typename MaskT, typename... Args, typename... ParamTags, size_t... I, typename ElementFn>
void execute_array (TypeSequence< ParamTags... >, std::index_sequence< I... >, ElementFn element_fn, MaskT mask, Args &&__restrict... args)
template<typename... ParamTags, typename ElementFn, typename... Chunks>
void execute_materialized_impl (TypeSequence< ParamTags... >, const ElementFn element_fn, const int64_t size, Chunks &&__restrict... chunks)
template<typename... ParamTags, size_t... I, typename ElementFn, typename... LoadedParams>
void execute_materialized (TypeSequence< ParamTags... >, std::index_sequence< I... >, const ElementFn element_fn, const IndexMaskSegment mask, const std::tuple< LoadedParams... > &loaded_params)
template<typename ElementFn, typename ExecPreset, typename... ParamTags, size_t... I>
void execute_element_fn_as_multi_function (const ElementFn element_fn, const ExecPreset exec_preset, const IndexMask &mask, Params params, TypeSequence< ParamTags... >, std::index_sequence< I... >)
template<typename ElementFn, typename ExecPreset, typename... ParamTags>
auto build_multi_function_call_from_element_fn (const ElementFn element_fn, const ExecPreset exec_preset, TypeSequence< ParamTags... >)
template<typename Out, typename... In, typename ElementFn, typename ExecPreset>
auto build_multi_function_with_n_inputs_one_output (const char *name, const ElementFn element_fn, const ExecPreset exec_preset, TypeSequence< In... >)
template<typename Out1, typename Out2, typename... In, typename ElementFn, typename ExecPreset>
auto build_multi_function_with_n_inputs_two_outputs (const char *name, const ElementFn element_fn, const ExecPreset exec_preset, TypeSequence< In... >)

Enumeration Type Documentation

◆ MaterializeArgMode

Enumerator
Unknown 
Single 
Span 
Materialized 

Definition at line 157 of file FN_multi_function_builder.hh.

Function Documentation

◆ build_multi_function_call_from_element_fn()

template<typename ElementFn, typename ExecPreset, typename... ParamTags>
auto blender::fn::multi_function::build::detail::build_multi_function_call_from_element_fn ( const ElementFn element_fn,
const ExecPreset exec_preset,
TypeSequence< ParamTags... >  )
inline

element_fn is expected to return nothing and to have the following parameters:

  • For single-inputs: const value or reference.
  • For single-mutables: non-const reference.
  • For single-outputs: non-const pointer.

Definition at line 488 of file FN_multi_function_builder.hh.

References execute_element_fn_as_multi_function(), mask(), and params.

Referenced by build_multi_function_with_n_inputs_one_output(), build_multi_function_with_n_inputs_two_outputs(), blender::fn::multi_function::build::SI1_SO3(), blender::fn::multi_function::build::SI1_SO4(), and blender::fn::multi_function::build::SM().

◆ build_multi_function_with_n_inputs_one_output()

template<typename Out, typename... In, typename ElementFn, typename ExecPreset>
auto blender::fn::multi_function::build::detail::build_multi_function_with_n_inputs_one_output ( const char * name,
const ElementFn element_fn,
const ExecPreset exec_preset,
TypeSequence< In... >  )
inline

◆ build_multi_function_with_n_inputs_two_outputs()

template<typename Out1, typename Out2, typename... In, typename ElementFn, typename ExecPreset>
auto blender::fn::multi_function::build::detail::build_multi_function_with_n_inputs_two_outputs ( const char * name,
const ElementFn element_fn,
const ExecPreset exec_preset,
TypeSequence< In... >  )
inline

◆ execute_array()

template<typename MaskT, typename... Args, typename... ParamTags, size_t... I, typename ElementFn>
void blender::fn::multi_function::build::detail::execute_array ( TypeSequence< ParamTags... > ,
std::index_sequence< I... > ,
ElementFn element_fn,
MaskT mask,
Args &&__restrict... args )
inline

Executes #element_fn for all indices in the mask. The passed in #args contain the input as well as output parameters. Usually types in #args are devirtualized (e.g. a Span<int> is passed in instead of a VArray<int>).

Definition at line 134 of file FN_multi_function_builder.hh.

References i, and mask().

Referenced by execute_element_fn_as_multi_function().

◆ execute_element_fn_as_multi_function()

template<typename ElementFn, typename ExecPreset, typename... ParamTags, size_t... I>
void blender::fn::multi_function::build::detail::execute_element_fn_as_multi_function ( const ElementFn element_fn,
const ExecPreset exec_preset,
const IndexMask & mask,
Params params,
TypeSequence< ParamTags... > ,
std::index_sequence< I... >  )
inline

◆ execute_materialized()

template<typename... ParamTags, size_t... I, typename ElementFn, typename... LoadedParams>
void blender::fn::multi_function::build::detail::execute_materialized ( TypeSequence< ParamTags... > ,
std::index_sequence< I... > ,
const ElementFn element_fn,
const IndexMaskSegment mask,
const std::tuple< LoadedParams... > & loaded_params )
inline

◆ execute_materialized_impl()

template<typename... ParamTags, typename ElementFn, typename... Chunks>
void blender::fn::multi_function::build::detail::execute_materialized_impl ( TypeSequence< ParamTags... > ,
const ElementFn element_fn,
const int64_t size,
Chunks &&__restrict... chunks )
inline

Similar to execute_array but is only used with arrays and does not need a mask.

Definition at line 176 of file FN_multi_function_builder.hh.

References i, and size().

Referenced by execute_materialized().