|
Blender V4.3
|
#include <FN_lazy_function.hh>
Inherited by blender::fn::lazy_function::BasicParams, blender::fn::lazy_function::GraphExecutorLFParams, and blender::fn::lazy_function::RemappedParams.
Public Attributes | |
| const LazyFunction & | fn_ |
| std::thread::id | main_thread_id_ |
| std::atomic< bool > | allow_multi_threading_ |
#Params Inline Methods | |
| Params (const LazyFunction &fn, bool allow_multi_threading_initially) | |
| void * | try_get_input_data_ptr (int index) const |
| void * | try_get_input_data_ptr_or_request (int index) |
| void * | get_output_data_ptr (int index) |
| void | output_set (int index) |
| bool | output_was_set (int index) const |
| ValueUsage | get_output_usage (int index) const |
| void | set_input_unused (int index) |
| template<typename T > | |
| T | extract_input (int index) |
| template<typename T > | |
| T & | get_input (int index) const |
| template<typename T > | |
| T * | try_get_input_data_ptr (int index) const |
| template<typename T > | |
| T * | try_get_input_data_ptr_or_request (int index) |
| template<typename T > | |
| void | set_output (int index, T &&value) |
| bool | try_enable_multi_threading () |
Defines the calling convention for a lazy-function. During execution, a lazy-function retrieves its inputs and sets the outputs through Params.
Definition at line 133 of file FN_lazy_function.hh.
|
inline |
Definition at line 378 of file FN_lazy_function.hh.
Typed utility methods that wrap the methods above.
Definition at line 435 of file FN_lazy_function.hh.
References BLI_assert, and try_get_input_data_ptr().
Referenced by blender::nodes::GeoNodeExecParams::extract_input().
Definition at line 444 of file FN_lazy_function.hh.
References BLI_assert, data, and try_get_input_data_ptr().
Referenced by blender::nodes::GeoNodeExecParams::anonymous_attribute_output_is_required(), blender::nodes::GeoNodeExecParams::get_attribute_filter(), and blender::nodes::GeoNodeExecParams::get_input().
|
inline |
Get a pointer to where the output value should be stored. The value at the pointer is in an uninitialized state at first. The #LazyFunction is responsible for initializing the value. After the output has been initialized to its final value, output_set has to be called.
Definition at line 402 of file FN_lazy_function.hh.
References BLI_assert, fn_, and blender::fn::lazy_function::LazyFunction::outputs().
Referenced by blender::fn::lazy_function::RemappedParams::get_output_data_ptr_impl(), and set_output().
|
inline |
Can be used to detect which outputs have to be computed.
Definition at line 422 of file FN_lazy_function.hh.
References BLI_assert, fn_, and blender::fn::lazy_function::LazyFunction::outputs().
Referenced by blender::fn::lazy_function::RemappedParams::get_output_usage_impl(), and blender::nodes::GeoNodeExecParams::output_is_required().
|
inline |
Call this after the output value is initialized. After this is called, the value must not be touched anymore. It may be moved or destructed immediately.
Definition at line 409 of file FN_lazy_function.hh.
References BLI_assert, fn_, and blender::fn::lazy_function::LazyFunction::outputs().
Referenced by blender::fn::lazy_function::RemappedParams::output_set_impl(), and set_output().
|
inline |
Allows the #LazyFunction to check whether an output was computed already without keeping track of it itself.
Definition at line 416 of file FN_lazy_function.hh.
References BLI_assert, fn_, and blender::fn::lazy_function::LazyFunction::outputs().
Referenced by blender::fn::lazy_function::RemappedParams::output_was_set_impl().
|
inline |
Tell the caller of the #LazyFunction that a specific input will definitely not be used. Only an input that was not ValueUsage::Used can become unused.
Definition at line 428 of file FN_lazy_function.hh.
References BLI_assert, fn_, and blender::fn::lazy_function::LazyFunction::inputs().
Referenced by blender::nodes::GeoNodeExecParams::set_input_unused(), and blender::fn::lazy_function::RemappedParams::set_input_unused_impl().
|
inline |
Definition at line 463 of file FN_lazy_function.hh.
References data, get_output_data_ptr(), and output_set().
Referenced by blender::nodes::GeoNodeExecParams::set_output().
|
inline |
Returns true when the lazy-function is now allowed to use multi-threading when interacting with this Params. That means, it is allowed to call non-const methods from different threads.
Definition at line 472 of file FN_lazy_function.hh.
References allow_multi_threading_.
Referenced by blender::fn::lazy_function::RemappedParams::try_enable_multi_threading_impl().
|
inline |
Get a pointer to an input value if the value is available already. Otherwise null is returned.
The #LazyFunction must leave returned object in an initialized state, but can move from it.
Definition at line 389 of file FN_lazy_function.hh.
References BLI_assert, fn_, and blender::fn::lazy_function::LazyFunction::inputs().
Referenced by extract_input(), get_input(), try_get_input_data_ptr(), and blender::fn::lazy_function::RemappedParams::try_get_input_data_ptr_impl().
|
inline |
Definition at line 451 of file FN_lazy_function.hh.
References try_get_input_data_ptr().
|
inline |
Same as try_get_input_data_ptr, but if the data is not yet available, request it. This makes sure that the data will be available in a future execution of the #LazyFunction.
Definition at line 395 of file FN_lazy_function.hh.
References BLI_assert, fn_, and blender::fn::lazy_function::LazyFunction::inputs().
Referenced by try_get_input_data_ptr_or_request(), and blender::fn::lazy_function::RemappedParams::try_get_input_data_ptr_or_request_impl().
|
inline |
Definition at line 457 of file FN_lazy_function.hh.
References try_get_input_data_ptr_or_request().
| std::atomic<bool> blender::fn::lazy_function::Params::allow_multi_threading_ |
Definition at line 141 of file FN_lazy_function.hh.
Referenced by try_enable_multi_threading().
| const LazyFunction& blender::fn::lazy_function::Params::fn_ |
The lazy-function this Params has been prepared for.
Definition at line 138 of file FN_lazy_function.hh.
Referenced by get_output_data_ptr(), get_output_usage(), output_set(), output_was_set(), set_input_unused(), try_get_input_data_ptr(), and try_get_input_data_ptr_or_request().
| std::thread::id blender::fn::lazy_function::Params::main_thread_id_ |
Definition at line 140 of file FN_lazy_function.hh.