Blender V5.3
blender::fn::lazy_function Namespace Reference

Namespaces

namespace  detail
namespace  generic_graph_executor
namespace  tests

Classes

class  BasicParams
struct  Context
class  FunctionNode
class  Graph
class  GraphExecutor
class  GraphExecutorLogger
class  GraphExecutorNodeExecuteWrapper
class  GraphExecutorSideEffectProvider
struct  Input
class  InputSocket
class  InterfaceNode
class  LazyFunction
class  Node
struct  Output
class  OutputSocket
class  Params
class  RemappedParams
class  Socket

Typedefs

using GraphInputSocket = OutputSocket
using GraphOutputSocket = InputSocket

Enumerations

enum class  ValueUsage : uint8_t { Used , Maybe , Unused }

Functions

template<typename... Inputs, typename... Outputs>
void execute_lazy_function_eagerly (const LazyFunction &fn, UserData *user_data, LocalUserData *local_user_data, std::tuple< Inputs... > inputs, std::tuple< Outputs *... > outputs)

Typedef Documentation

◆ GraphInputSocket

Interface input sockets are actually output sockets on the input node. This renaming makes the code less confusing.

Definition at line 201 of file FN_lazy_function_graph.hh.

◆ GraphOutputSocket

Enumeration Type Documentation

◆ ValueUsage

Enumerator
Used 

The value is definitely used and therefore has to be computed.

Maybe 

It's unknown whether this value will be used or not. Computing it is ok but the result may be discarded.

Unused 

The value will definitely not be used. It can still be computed but the result will be discarded in all cases.

Definition at line 61 of file FN_lazy_function.hh.

Function Documentation

◆ execute_lazy_function_eagerly()

template<typename... Inputs, typename... Outputs>
void blender::fn::lazy_function::execute_lazy_function_eagerly ( const LazyFunction & fn,
UserData * user_data,
LocalUserData * local_user_data,
std::tuple< Inputs... > inputs,
std::tuple< Outputs *... > outputs )
inline

In some cases (mainly for tests), the set of inputs and outputs for a lazy-function is known at compile time and one just wants to compute the outputs based on the inputs, without any laziness.

This function does exactly that. It takes all inputs in a tuple and writes the outputs to points provided in a second tuple. Since all inputs have to be provided, the lazy-function has to compute all outputs.

Definition at line 141 of file FN_lazy_function_execute.hh.

References blender::BLI_assert(), execute_lazy_function_eagerly(), and blender::fn::lazy_function::detail::execute_lazy_function_eagerly_impl().

Referenced by execute_lazy_function_eagerly(), blender::fn::lazy_function::tests::TEST_F(), blender::fn::lazy_function::tests::TEST_F(), and blender::fn::lazy_function::tests::TEST_F().