Blender V4.3
blender::fn::multi_function::MultiFunction Class Referenceabstract

#include <FN_multi_function.hh>

Inherits blender::NonCopyable, and blender::NonMovable.

Inherited by blender::bke::mesh_surface_sample::BaryWeightFromPositionFn, blender::bke::mesh_surface_sample::BaryWeightSampleFn, blender::bke::mesh_surface_sample::CornerBaryWeightFromPositionFn, blender::fn::multi_function::CustomMF_Constant< T >, blender::fn::multi_function::CustomMF_DefaultOutput, blender::fn::multi_function::CustomMF_GenericConstant, blender::fn::multi_function::CustomMF_GenericConstantArray, blender::fn::multi_function::CustomMF_GenericCopy, blender::fn::multi_function::ProcedureExecutor, blender::fn::multi_function::build::detail::CustomMF< CallFn, ParamTags >, blender::fn::multi_function::tests::AddPrefixFunction, blender::fn::multi_function::tests::AppendFunction, blender::fn::multi_function::tests::ConcatVectorsFunction, blender::fn::multi_function::tests::CreateRangeFunction, blender::fn::multi_function::tests::GenericAppendFunction, blender::fn::multi_function::tests::OptionalOutputsFunction, blender::fn::multi_function::tests::SumVectorFunction, blender::fn::tests::TwoOutputFunction, blender::nodes::node_fn_align_euler_to_vector_cc::MF_AlignEulerToVector, blender::nodes::node_fn_align_rotation_to_vector_cc::AlignRotationToVectorFunction, blender::nodes::node_fn_axes_to_rotation_cc::AxesToRotationFunction, blender::nodes::node_fn_combine_matrix_cc::CombineMatrixFunction, blender::nodes::node_fn_combine_transform_cc::CombineTransformFunction, blender::nodes::node_fn_input_special_characters_cc::MF_SpecialCharacters, blender::nodes::node_fn_invert_matrix_cc::InvertMatrixFunction, blender::nodes::node_fn_rotation_to_axis_angle_cc::QuaterniontoAxisAngleFunction, blender::nodes::node_fn_rotation_to_quaternion_cc::SeparateQuaternionFunction, blender::nodes::node_fn_separate_color_cc::SeparateHSLAFunction, blender::nodes::node_fn_separate_color_cc::SeparateHSVAFunction, blender::nodes::node_fn_separate_color_cc::SeparateRGBAFunction, blender::nodes::node_fn_separate_matrix_cc::SeparateMatrixFunction, blender::nodes::node_fn_separate_transform_cc::SeparateTransformFunction, blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction, blender::nodes::node_geo_curve_sample_cc::SampleFloatSegmentsFunction, blender::nodes::node_geo_image_texture_cc::ImageFieldsFunction, blender::nodes::node_geo_index_switch_cc::IndexSwitchFunction, blender::nodes::node_geo_menu_switch_cc::MenuSwitchFn, blender::nodes::node_geo_proximity_cc::ProximityFunction, blender::nodes::node_geo_raycast_cc::RaycastFunction, blender::nodes::node_geo_sample_index_cc::SampleIndexFunction, blender::nodes::node_geo_sample_nearest_cc::SampleNearestFunction, blender::nodes::node_geo_sample_nearest_surface_cc::SampleNearestSurfaceFunction, blender::nodes::node_geo_sample_uv_surface_cc::ReverseUVSampleFunction, blender::nodes::node_sh_mix_cc::MixColorFunction, blender::nodes::node_shader_color_ramp_cc::ColorBandFunction, blender::nodes::node_shader_curves_cc::flt::CurveFloatFunction, blender::nodes::node_shader_curves_cc::rgb::CurveRGBFunction, blender::nodes::node_shader_curves_cc::vec::CurveVecFunction, blender::nodes::node_shader_math_cc::ClampWrapperFunction, blender::nodes::node_shader_mix_rgb_cc::MixRGBFunction, blender::nodes::node_shader_sepcomb_rgb_cc::SeparateRGBFunction, blender::nodes::node_shader_sepcomb_xyz_cc::sep::MF_SeparateXYZ, blender::nodes::node_shader_tex_brick_cc::BrickFunction, blender::nodes::node_shader_tex_checker_cc::NodeTexChecker, blender::nodes::node_shader_tex_gabor_cc::GaborNoiseFunction, blender::nodes::node_shader_tex_gradient_cc::GradientFunction, blender::nodes::node_shader_tex_magic_cc::MagicFunction, blender::nodes::node_shader_tex_noise_cc::NoiseFunction, blender::nodes::node_shader_tex_voronoi_cc::VoronoiDistToEdgeFunction, blender::nodes::node_shader_tex_voronoi_cc::VoronoiMetricFunction, blender::nodes::node_shader_tex_voronoi_cc::VoronoiNSphereFunction, blender::nodes::node_shader_tex_wave_cc::WaveFunction, and blender::nodes::node_shader_tex_white_noise_cc::WhiteNoiseFunction.

Classes

struct  ExecutionHints
 

Public Member Functions

virtual ~MultiFunction ()
 
void call_auto (const IndexMask &mask, Params params, Context context) const
 
virtual void call (const IndexMask &mask, Params params, Context context) const =0
 
virtual uint64_t hash () const
 
virtual bool equals (const MultiFunction &) const
 
int param_amount () const
 
IndexRange param_indices () const
 
ParamType param_type (int param_index) const
 
StringRefNull param_name (int param_index) const
 
StringRefNull name () const
 
virtual std::string debug_name () const
 
const Signaturesignature () const
 
ExecutionHints execution_hints () const
 

Protected Member Functions

void set_signature (const Signature *signature)
 
virtual ExecutionHints get_execution_hints () const
 

Detailed Description

Definition at line 42 of file FN_multi_function.hh.

Constructor & Destructor Documentation

◆ ~MultiFunction()

virtual blender::fn::multi_function::MultiFunction::~MultiFunction ( )
inlinevirtual

Definition at line 47 of file FN_multi_function.hh.

Member Function Documentation

◆ call()

virtual void blender::fn::multi_function::MultiFunction::call ( const IndexMask & mask,
Params params,
Context context ) const
pure virtual

Implemented in blender::bke::mesh_surface_sample::BaryWeightFromPositionFn, blender::bke::mesh_surface_sample::BaryWeightSampleFn, blender::bke::mesh_surface_sample::CornerBaryWeightFromPositionFn, blender::fn::multi_function::build::detail::CustomMF< CallFn, ParamTags >, blender::fn::multi_function::CustomMF_Constant< T >, blender::fn::multi_function::CustomMF_DefaultOutput, blender::fn::multi_function::CustomMF_GenericConstant, blender::fn::multi_function::CustomMF_GenericConstantArray, blender::fn::multi_function::CustomMF_GenericCopy, blender::fn::multi_function::ProcedureExecutor, blender::fn::multi_function::tests::AddPrefixFunction, blender::fn::multi_function::tests::AppendFunction, blender::fn::multi_function::tests::ConcatVectorsFunction, blender::fn::multi_function::tests::CreateRangeFunction, blender::fn::multi_function::tests::GenericAppendFunction, blender::fn::multi_function::tests::OptionalOutputsFunction, blender::fn::multi_function::tests::SumVectorFunction, blender::fn::tests::TwoOutputFunction, blender::nodes::node_fn_align_euler_to_vector_cc::MF_AlignEulerToVector, blender::nodes::node_fn_align_rotation_to_vector_cc::AlignRotationToVectorFunction, blender::nodes::node_fn_axes_to_rotation_cc::AxesToRotationFunction, blender::nodes::node_fn_combine_matrix_cc::CombineMatrixFunction, blender::nodes::node_fn_combine_transform_cc::CombineTransformFunction, blender::nodes::node_fn_input_special_characters_cc::MF_SpecialCharacters, blender::nodes::node_fn_invert_matrix_cc::InvertMatrixFunction, blender::nodes::node_fn_rotation_to_axis_angle_cc::QuaterniontoAxisAngleFunction, blender::nodes::node_fn_rotation_to_quaternion_cc::SeparateQuaternionFunction, blender::nodes::node_fn_separate_color_cc::SeparateHSLAFunction, blender::nodes::node_fn_separate_color_cc::SeparateHSVAFunction, blender::nodes::node_fn_separate_color_cc::SeparateRGBAFunction, blender::nodes::node_fn_separate_matrix_cc::SeparateMatrixFunction, blender::nodes::node_fn_separate_transform_cc::SeparateTransformFunction, blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction, blender::nodes::node_geo_curve_sample_cc::SampleFloatSegmentsFunction, blender::nodes::node_geo_image_texture_cc::ImageFieldsFunction, blender::nodes::node_geo_index_switch_cc::IndexSwitchFunction, blender::nodes::node_geo_menu_switch_cc::MenuSwitchFn, blender::nodes::node_geo_proximity_cc::ProximityFunction, blender::nodes::node_geo_raycast_cc::RaycastFunction, blender::nodes::node_geo_sample_index_cc::SampleIndexFunction, blender::nodes::node_geo_sample_nearest_cc::SampleNearestFunction, blender::nodes::node_geo_sample_nearest_surface_cc::SampleNearestSurfaceFunction, blender::nodes::node_geo_sample_uv_surface_cc::ReverseUVSampleFunction, blender::nodes::node_sh_mix_cc::MixColorFunction, blender::nodes::node_shader_color_ramp_cc::ColorBandFunction, blender::nodes::node_shader_curves_cc::flt::CurveFloatFunction, blender::nodes::node_shader_curves_cc::rgb::CurveRGBFunction, blender::nodes::node_shader_curves_cc::vec::CurveVecFunction, blender::nodes::node_shader_math_cc::ClampWrapperFunction, blender::nodes::node_shader_mix_rgb_cc::MixRGBFunction, blender::nodes::node_shader_sepcomb_rgb_cc::SeparateRGBFunction, blender::nodes::node_shader_sepcomb_xyz_cc::sep::MF_SeparateXYZ, blender::nodes::node_shader_tex_brick_cc::BrickFunction, blender::nodes::node_shader_tex_checker_cc::NodeTexChecker, blender::nodes::node_shader_tex_gabor_cc::GaborNoiseFunction, blender::nodes::node_shader_tex_gradient_cc::GradientFunction, blender::nodes::node_shader_tex_magic_cc::MagicFunction, blender::nodes::node_shader_tex_noise_cc::NoiseFunction, blender::nodes::node_shader_tex_voronoi_cc::VoronoiDistToEdgeFunction, blender::nodes::node_shader_tex_voronoi_cc::VoronoiMetricFunction, blender::nodes::node_shader_tex_voronoi_cc::VoronoiNSphereFunction, blender::nodes::node_shader_tex_wave_cc::WaveFunction, and blender::nodes::node_shader_tex_white_noise_cc::WhiteNoiseFunction.

Referenced by blender::nodes::node_shader_math_cc::ClampWrapperFunction::call(), call_auto(), blender::fn::multi_function::execute_call_instruction(), blender::nodes::execute_multi_function_on_value_variant__single(), and blender::ed::curves::validate_value().

◆ call_auto()

void blender::fn::multi_function::MultiFunction::call_auto ( const IndexMask & mask,
Params params,
Context context ) const

The result is the same as using call directly but this method has some additional features.

  • Automatic multi-threading when possible and appropriate.
  • Automatic index mask offsetting to avoid large temporary intermediate arrays that are mostly unused.

Definition at line 116 of file multi_function.cc.

References blender::fn::multi_function::add_sliced_parameters(), call(), blender::fn::multi_function::compute_alignment(), blender::fn::multi_function::compute_grain_size(), execution_hints(), blender::threading::parallel_for_aligned(), params, blender::index_mask::IndexMask::slice_and_shift(), and blender::fn::multi_function::supports_threading_by_slicing_params().

Referenced by blender::bke::call_convert_to_uninitialized_fn(), and blender::fn::multi_function::execute_call_instruction().

◆ debug_name()

std::string blender::fn::multi_function::MultiFunction::debug_name ( ) const
virtual

◆ equals()

virtual bool blender::fn::multi_function::MultiFunction::equals ( const MultiFunction & ) const
inlinevirtual

◆ execution_hints()

ExecutionHints blender::fn::multi_function::MultiFunction::execution_hints ( ) const

Definition at line 14 of file multi_function.cc.

References get_execution_hints().

Referenced by call_auto().

◆ get_execution_hints()

◆ hash()

virtual uint64_t blender::fn::multi_function::MultiFunction::hash ( ) const
inlinevirtual

◆ name()

StringRefNull blender::fn::multi_function::MultiFunction::name ( ) const
inline

◆ param_amount()

◆ param_indices()

◆ param_name()

StringRefNull blender::fn::multi_function::MultiFunction::param_name ( int param_index) const
inline

◆ param_type()

◆ set_signature()

void blender::fn::multi_function::MultiFunction::set_signature ( const Signature * signature)
inlineprotected

Definition at line 131 of file FN_multi_function.hh.

References BLI_assert, and signature().

Referenced by blender::fn::multi_function::tests::AddPrefixFunction::AddPrefixFunction(), blender::nodes::node_fn_align_rotation_to_vector_cc::AlignRotationToVectorFunction::AlignRotationToVectorFunction(), blender::fn::multi_function::tests::AppendFunction::AppendFunction(), blender::nodes::node_fn_axes_to_rotation_cc::AxesToRotationFunction::AxesToRotationFunction(), blender::bke::mesh_surface_sample::BaryWeightFromPositionFn::BaryWeightFromPositionFn(), blender::bke::mesh_surface_sample::BaryWeightSampleFn::BaryWeightSampleFn(), blender::nodes::node_shader_tex_brick_cc::BrickFunction::BrickFunction(), blender::nodes::node_shader_math_cc::ClampWrapperFunction::ClampWrapperFunction(), blender::nodes::node_shader_color_ramp_cc::ColorBandFunction::ColorBandFunction(), blender::nodes::node_fn_combine_matrix_cc::CombineMatrixFunction::CombineMatrixFunction(), blender::nodes::node_fn_combine_transform_cc::CombineTransformFunction::CombineTransformFunction(), blender::fn::multi_function::tests::ConcatVectorsFunction::ConcatVectorsFunction(), blender::bke::mesh_surface_sample::CornerBaryWeightFromPositionFn::CornerBaryWeightFromPositionFn(), blender::fn::multi_function::tests::CreateRangeFunction::CreateRangeFunction(), blender::nodes::node_shader_curves_cc::flt::CurveFloatFunction::CurveFloatFunction(), blender::nodes::node_shader_curves_cc::rgb::CurveRGBFunction::CurveRGBFunction(), blender::nodes::node_shader_curves_cc::vec::CurveVecFunction::CurveVecFunction(), blender::fn::multi_function::build::detail::CustomMF< CallFn, ParamTags >::CustomMF(), blender::fn::multi_function::CustomMF_Constant< T >::CustomMF_Constant(), blender::fn::multi_function::CustomMF_DefaultOutput::CustomMF_DefaultOutput(), blender::fn::multi_function::CustomMF_GenericConstant::CustomMF_GenericConstant(), blender::fn::multi_function::CustomMF_GenericConstantArray::CustomMF_GenericConstantArray(), blender::fn::multi_function::CustomMF_GenericCopy::CustomMF_GenericCopy(), blender::nodes::node_shader_tex_gabor_cc::GaborNoiseFunction::GaborNoiseFunction(), blender::fn::multi_function::tests::GenericAppendFunction::GenericAppendFunction(), blender::nodes::node_shader_tex_gradient_cc::GradientFunction::GradientFunction(), blender::nodes::node_geo_image_texture_cc::ImageFieldsFunction::ImageFieldsFunction(), blender::nodes::node_geo_index_switch_cc::IndexSwitchFunction::IndexSwitchFunction(), blender::nodes::node_fn_invert_matrix_cc::InvertMatrixFunction::InvertMatrixFunction(), blender::nodes::node_shader_tex_magic_cc::MagicFunction::MagicFunction(), blender::nodes::node_geo_menu_switch_cc::MenuSwitchFn::MenuSwitchFn(), blender::nodes::node_fn_align_euler_to_vector_cc::MF_AlignEulerToVector::MF_AlignEulerToVector(), blender::nodes::node_shader_sepcomb_xyz_cc::sep::MF_SeparateXYZ::MF_SeparateXYZ(), blender::nodes::node_fn_input_special_characters_cc::MF_SpecialCharacters::MF_SpecialCharacters(), blender::nodes::node_sh_mix_cc::MixColorFunction::MixColorFunction(), blender::nodes::node_shader_mix_rgb_cc::MixRGBFunction::MixRGBFunction(), blender::nodes::node_shader_tex_checker_cc::NodeTexChecker::NodeTexChecker(), blender::nodes::node_shader_tex_noise_cc::NoiseFunction::NoiseFunction(), blender::fn::multi_function::tests::OptionalOutputsFunction::OptionalOutputsFunction(), blender::fn::multi_function::ProcedureExecutor::ProcedureExecutor(), blender::nodes::node_geo_proximity_cc::ProximityFunction::ProximityFunction(), blender::nodes::node_fn_rotation_to_axis_angle_cc::QuaterniontoAxisAngleFunction::QuaterniontoAxisAngleFunction(), blender::nodes::node_geo_sample_uv_surface_cc::ReverseUVSampleFunction::ReverseUVSampleFunction(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::SampleCurveFunction(), blender::nodes::node_geo_curve_sample_cc::SampleFloatSegmentsFunction::SampleFloatSegmentsFunction(), blender::nodes::node_geo_sample_index_cc::SampleIndexFunction::SampleIndexFunction(), blender::nodes::node_geo_sample_nearest_cc::SampleNearestFunction::SampleNearestFunction(), blender::nodes::node_geo_sample_nearest_surface_cc::SampleNearestSurfaceFunction::SampleNearestSurfaceFunction(), blender::nodes::node_fn_separate_color_cc::SeparateHSLAFunction::SeparateHSLAFunction(), blender::nodes::node_fn_separate_color_cc::SeparateHSVAFunction::SeparateHSVAFunction(), blender::nodes::node_fn_separate_matrix_cc::SeparateMatrixFunction::SeparateMatrixFunction(), blender::nodes::node_fn_rotation_to_quaternion_cc::SeparateQuaternionFunction::SeparateQuaternionFunction(), blender::nodes::node_fn_separate_color_cc::SeparateRGBAFunction::SeparateRGBAFunction(), blender::nodes::node_shader_sepcomb_rgb_cc::SeparateRGBFunction::SeparateRGBFunction(), blender::nodes::node_fn_separate_transform_cc::SeparateTransformFunction::SeparateTransformFunction(), blender::fn::multi_function::tests::SumVectorFunction::SumVectorFunction(), blender::fn::tests::TwoOutputFunction::TwoOutputFunction(), blender::nodes::node_shader_tex_voronoi_cc::VoronoiDistToEdgeFunction::VoronoiDistToEdgeFunction(), blender::nodes::node_shader_tex_voronoi_cc::VoronoiMetricFunction::VoronoiMetricFunction(), blender::nodes::node_shader_tex_voronoi_cc::VoronoiNSphereFunction::VoronoiNSphereFunction(), blender::nodes::node_shader_tex_wave_cc::WaveFunction::WaveFunction(), and blender::nodes::node_shader_tex_white_noise_cc::WhiteNoiseFunction::WhiteNoiseFunction().

◆ signature()

const Signature & blender::fn::multi_function::MultiFunction::signature ( ) const
inline

Definition at line 95 of file FN_multi_function.hh.

References BLI_assert.

Referenced by blender::fn::multi_function::tests::AddPrefixFunction::AddPrefixFunction(), blender::nodes::node_fn_align_rotation_to_vector_cc::AlignRotationToVectorFunction::AlignRotationToVectorFunction(), blender::fn::multi_function::tests::AppendFunction::AppendFunction(), blender::nodes::node_fn_axes_to_rotation_cc::AxesToRotationFunction::AxesToRotationFunction(), blender::bke::mesh_surface_sample::BaryWeightFromPositionFn::BaryWeightFromPositionFn(), blender::nodes::node_shader_tex_brick_cc::BrickFunction::BrickFunction(), blender::nodes::node_shader_math_cc::ClampWrapperFunction::ClampWrapperFunction(), blender::nodes::node_shader_color_ramp_cc::ColorBandFunction::ColorBandFunction(), blender::nodes::node_fn_combine_matrix_cc::CombineMatrixFunction::CombineMatrixFunction(), blender::nodes::node_fn_combine_transform_cc::CombineTransformFunction::CombineTransformFunction(), blender::fn::multi_function::tests::ConcatVectorsFunction::ConcatVectorsFunction(), blender::bke::mesh_surface_sample::CornerBaryWeightFromPositionFn::CornerBaryWeightFromPositionFn(), blender::nodes::node_shader_tex_gabor_cc::GaborNoiseFunction::create_signature(), blender::nodes::node_shader_tex_noise_cc::NoiseFunction::create_signature(), blender::nodes::node_shader_tex_voronoi_cc::VoronoiDistToEdgeFunction::create_signature(), blender::nodes::node_shader_tex_voronoi_cc::VoronoiMetricFunction::create_signature(), blender::nodes::node_shader_tex_voronoi_cc::VoronoiNSphereFunction::create_signature(), blender::nodes::node_shader_tex_white_noise_cc::WhiteNoiseFunction::create_signature(), blender::fn::multi_function::tests::CreateRangeFunction::CreateRangeFunction(), blender::nodes::node_shader_curves_cc::flt::CurveFloatFunction::CurveFloatFunction(), blender::nodes::node_shader_curves_cc::rgb::CurveRGBFunction::CurveRGBFunction(), blender::nodes::node_shader_curves_cc::vec::CurveVecFunction::CurveVecFunction(), blender::nodes::node_shader_tex_gradient_cc::GradientFunction::GradientFunction(), blender::nodes::node_geo_image_texture_cc::ImageFieldsFunction::ImageFieldsFunction(), blender::nodes::node_fn_invert_matrix_cc::InvertMatrixFunction::InvertMatrixFunction(), blender::nodes::node_shader_tex_magic_cc::MagicFunction::MagicFunction(), blender::nodes::node_fn_align_euler_to_vector_cc::MF_AlignEulerToVector::MF_AlignEulerToVector(), blender::nodes::node_shader_sepcomb_xyz_cc::sep::MF_SeparateXYZ::MF_SeparateXYZ(), blender::nodes::node_fn_input_special_characters_cc::MF_SpecialCharacters::MF_SpecialCharacters(), blender::nodes::node_sh_mix_cc::MixColorFunction::MixColorFunction(), blender::nodes::node_shader_mix_rgb_cc::MixRGBFunction::MixRGBFunction(), blender::nodes::node_shader_tex_checker_cc::NodeTexChecker::NodeTexChecker(), blender::fn::multi_function::tests::OptionalOutputsFunction::OptionalOutputsFunction(), blender::nodes::node_geo_proximity_cc::ProximityFunction::ProximityFunction(), blender::nodes::node_geo_sample_uv_surface_cc::ReverseUVSampleFunction::ReverseUVSampleFunction(), blender::nodes::node_geo_curve_sample_cc::SampleFloatSegmentsFunction::SampleFloatSegmentsFunction(), blender::nodes::node_geo_sample_nearest_surface_cc::SampleNearestSurfaceFunction::SampleNearestSurfaceFunction(), blender::nodes::node_fn_separate_color_cc::SeparateHSLAFunction::SeparateHSLAFunction(), blender::nodes::node_fn_separate_color_cc::SeparateHSVAFunction::SeparateHSVAFunction(), blender::nodes::node_fn_separate_matrix_cc::SeparateMatrixFunction::SeparateMatrixFunction(), blender::nodes::node_fn_separate_color_cc::SeparateRGBAFunction::SeparateRGBAFunction(), blender::nodes::node_shader_sepcomb_rgb_cc::SeparateRGBFunction::SeparateRGBFunction(), blender::nodes::node_fn_separate_transform_cc::SeparateTransformFunction::SeparateTransformFunction(), set_signature(), blender::fn::multi_function::tests::SumVectorFunction::SumVectorFunction(), and blender::nodes::node_shader_tex_wave_cc::WaveFunction::WaveFunction().


The documentation for this class was generated from the following files: