|
Blender V5.0
|
#include <BLI_compute_context.hh>
Inherited by blender::bke::ForeachGeometryElementZoneComputeContext, blender::bke::ModifierComputeContext, blender::bke::NodeComputeContext, blender::bke::OperatorComputeContext, blender::bke::RepeatZoneComputeContext, blender::bke::ShaderComputeContext, and blender::bke::SimulationZoneComputeContext.
Public Member Functions | |
| ComputeContext (const ComputeContext *parent) | |
| virtual | ~ComputeContext ()=default |
| const ComputeContextHash & | hash () const |
| const ComputeContext * | parent () const |
| void | print_stack (std::ostream &stream, StringRef name) const |
| virtual void | print_current_in_line (std::ostream &stream) const =0 |
Protected Attributes | |
| const ComputeContext * | parent_ = nullptr |
| ComputeContextHash | hash_ |
Friends | |
| std::ostream & | operator<< (std::ostream &stream, const ComputeContext &compute_context) |
Identifies the context in which a computation happens. This context can be used to identify values logged during the computation. For more details, see the comment at the top of the file.
This class should be subclassed to implement specific contexts.
Definition at line 92 of file BLI_compute_context.hh.
|
inline |
Definition at line 111 of file BLI_compute_context.hh.
References ComputeContext(), parent(), and parent_.
Referenced by ComputeContext(), blender::bke::EvaluateClosureComputeContext::EvaluateClosureComputeContext(), blender::bke::ForeachGeometryElementZoneComputeContext::ForeachGeometryElementZoneComputeContext(), blender::bke::ForeachGeometryElementZoneComputeContext::ForeachGeometryElementZoneComputeContext(), blender::bke::EvaluateClosureComputeContext::is_recursive(), blender::bke::ModifierComputeContext::ModifierComputeContext(), blender::bke::ModifierComputeContext::ModifierComputeContext(), blender::bke::NodeComputeContext::NodeComputeContext(), operator<<, blender::bke::OperatorComputeContext::OperatorComputeContext(), blender::bke::OperatorComputeContext::OperatorComputeContext(), parent(), print_current_in_line(), print_stack(), blender::bke::RepeatZoneComputeContext::RepeatZoneComputeContext(), blender::bke::RepeatZoneComputeContext::RepeatZoneComputeContext(), blender::bke::ShaderComputeContext::ShaderComputeContext(), blender::bke::SimulationZoneComputeContext::SimulationZoneComputeContext(), and blender::bke::SimulationZoneComputeContext::SimulationZoneComputeContext().
|
virtualdefault |
|
inline |
Definition at line 114 of file BLI_compute_context.hh.
References hash_.
Referenced by blender::nodes::LazyFunctionForGeometryNode::anonymous_attribute_name_for_output(), blender::nodes::gizmos::apply_gizmo_change(), blender::ed::viewer_path::compute_context_for_viewer_path_elem(), blender::ed::space_node::compute_context_for_zone(), blender::nodes::LazyFunctionForGroupNode::execute_impl(), blender::nodes::LazyFunctionForSimulationInputsUsage::execute_impl(), blender::nodes::LazyFunctionForSimulationZone::execute_impl(), blender::nodes::LazyFunctionForViewerInputUsage::execute_impl(), blender::nodes::ForeachGeometryElementNodeExecuteWrapper::execute_node(), blender::nodes::RepeatBodyNodeExecuteWrapper::execute_node(), blender::find_side_effect_nodes_for_active_gizmos(), blender::ed::space_node::find_sockets_on_active_gizmo_paths(), blender::nodes::geo_eval_log::find_tree_zone_hash_recursive(), blender::nodes::geo_eval_log::GeoNodesLog::find_viewer_node_log_for_path(), blender::ComputeContextHash::from(), blender::ed::space_node::get_compute_context_hash_for_node_editor(), blender::nodes::geo_eval_log::GeoNodesLog::get_context_hash_by_zone_for_node_editor(), blender::nodes::gizmos::get_editable_gizmo_elem(), blender::nodes::geo_eval_log::GeoNodesLog::get_local_tree_logger(), blender::nodes::ClosureIntermediateGraphSideEffectProvider::get_nodes_with_side_effects(), blender::nodes::ForeachGeometryElementZoneSideEffectProvider::get_nodes_with_side_effects(), blender::nodes::GeometryNodesLazyFunctionSideEffectProvider::get_nodes_with_side_effects(), blender::nodes::RepeatZoneSideEffectProvider::get_nodes_with_side_effects(), blender::nodes::get_root_tree_log(), blender::nodes::gizmo_is_used(), blender::nodes::node_geo_bake_cc::LazyFunctionForBakeNode::make_attribute_field(), blender::nodes::node_geo_simulation_cc::make_attribute_field(), blender::ed::geometry::run_node_group_exec(), blender::ed::geometry::run_node_group_ui(), blender::try_add_side_effect_node(), and blender::ed::view3d::geometry_nodes_gizmos::WIDGETGROUP_geometry_nodes_refresh().
|
inline |
Definition at line 120 of file BLI_compute_context.hh.
References ComputeContext(), and parent_.
Referenced by ComputeContext(), blender::nodes::partial_eval::eval_upstream(), blender::bke::EvaluateClosureComputeContext::EvaluateClosureComputeContext(), blender::nodes::find_origin_sockets_through_contexts(), blender::nodes::find_target_sockets_through_contexts(), blender::bke::ForeachGeometryElementZoneComputeContext::ForeachGeometryElementZoneComputeContext(), blender::bke::ForeachGeometryElementZoneComputeContext::ForeachGeometryElementZoneComputeContext(), blender::nodes::geo_eval_log::GeoNodesLog::get_local_tree_logger(), blender::bke::EvaluateClosureComputeContext::is_recursive(), blender::bke::ModifierComputeContext::ModifierComputeContext(), blender::bke::ModifierComputeContext::ModifierComputeContext(), blender::bke::NodeComputeContext::NodeComputeContext(), blender::bke::OperatorComputeContext::OperatorComputeContext(), blender::bke::OperatorComputeContext::OperatorComputeContext(), blender::bke::RepeatZoneComputeContext::RepeatZoneComputeContext(), blender::bke::RepeatZoneComputeContext::RepeatZoneComputeContext(), blender::nodes::report_from_multi_function(), blender::bke::ShaderComputeContext::ShaderComputeContext(), blender::bke::SimulationZoneComputeContext::SimulationZoneComputeContext(), blender::bke::SimulationZoneComputeContext::SimulationZoneComputeContext(), and blender::try_add_side_effect_node().
|
pure virtual |
Print information about this specific context. This has to be implemented by each subclass.
References ComputeContext().
Referenced by print_stack().
| void blender::ComputeContext::print_stack | ( | std::ostream & | stream, |
| StringRef | name ) const |
Print the entire nested context stack.
Definition at line 35 of file compute_context.cc.
References ComputeContext(), hash_, blender::Stack< T, InlineBufferCapacity, Allocator >::is_empty(), name, blender::Stack< T, InlineBufferCapacity, Allocator >::pop(), print_current_in_line(), and blender::Stack< T, InlineBufferCapacity, Allocator >::push().
Referenced by blender::nodes::GeometryNodesLazyFunctionLogger::dump_when_input_is_set_twice(), blender::nodes::GeometryNodesLazyFunctionLogger::dump_when_outputs_are_missing(), and operator<<.
|
friend |
Definition at line 51 of file compute_context.cc.
References ComputeContext(), and print_stack().
|
mutableprotected |
The hash that uniquely identifies this context. It's a combined hash of this context as well as all the parent contexts. It's computed lazily to keep initial construction of compute contexts very cheap.
Definition at line 105 of file BLI_compute_context.hh.
Referenced by hash(), and print_stack().
|
protected |
Pointer to the context that this context is child of. That allows nesting compute contexts.
Definition at line 98 of file BLI_compute_context.hh.
Referenced by ComputeContext(), blender::bke::EvaluateClosureComputeContext::is_recursive(), and parent().