Blender Git Loki

Git Commits -> Revision fd60f67

Revision fd60f67 by Jacques Lucke (master)
September 14, 2021, 12:52 (GMT)
Functions: support optional outputs in multi-function

Sometimes not all outputs of a multi-function are required by the
caller. In those cases it would be a waste of compute resources
to calculate the unused values anyway. Now, the caller of a
multi-function can specify when a specific output is not used.
The called function can check if an output is unused and may
ignore it. Multi-functions can still computed unused outputs as
before if they don't want to check if a specific output is unused.

The multi-function procedure system has been updated to support
ignored outputs in call instructions. An ignored output just has no
variable assigned to it.

The field system has been updated to generate a multi-function
procedure where unused outputs are ignored.

Commit Details:

Full Hash: fd60f6713a9d9e6f7d706b53bf1311f2f1cd9031
Parent Commit: 90a48fa
Lines Changed: +226, -27

9 Modified Paths:

/source/blender/blenlib/BLI_resource_scope.hh (+11, -0) (Diff)
/source/blender/functions/FN_multi_function.hh (+7, -2) (Diff)
/source/blender/functions/FN_multi_function_params.hh (+63, -5) (Diff)
/source/blender/functions/intern/field.cc (+36, -10) (Diff)
/source/blender/functions/intern/multi_function_procedure.cc (+14, -2) (Diff)
/source/blender/functions/intern/multi_function_procedure_executor.cc (+23, -8) (Diff)
/source/blender/functions/tests/FN_field_test.cc (+16, -0) (Diff)
/source/blender/functions/tests/FN_multi_function_test.cc (+27, -0) (Diff)
/source/blender/functions/tests/FN_multi_function_test_common.hh (+29, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021