|
Blender
V2.93
|
Classes | |
| class | MyClass |
|
static |
Definition at line 248 of file multi_function_network_optimization.cc.
References blender::ResourceScope::add(), blender::fn::MFNetwork::add_function(), AT, buffer, blender::fn::MFDataType::category(), blender::ResourceScope::construct(), array< T, alignment >::data(), blender::fn::MFParamType::data_type(), blender::fn::MFNode::output(), blender::fn::MultiFunction::param_indices(), blender::fn::MultiFunction::param_type(), params, blender::fn::MFDataType::Single, blender::fn::MFDataType::single_type(), blender::IndexRange::size(), and blender::fn::MFDataType::Vector.
Referenced by compute_constant_sockets_and_add_folded_nodes().
| void blender::fn::mf_network_optimization::common_subnetwork_elimination | ( | MFNetwork & | network | ) |
Tries to detect duplicate sub-networks and eliminates them. This can help quite a lot when node groups were used to create the network.
Definition at line 492 of file multi_function_network_optimization.cc.
References compute_node_hashes(), group_nodes_by_hash(), and relink_duplicate_nodes().
|
static |
Definition at line 285 of file multi_function_network_optimization.cc.
References add_constant_folded_sockets(), context, params, and prepare_params_for_constant_folding().
Referenced by constant_folding().
|
static |
Definition at line 329 of file multi_function_network_optimization.cc.
References BLI_ghashutil_combine_hash(), BLI_rng_get_uint(), blender::fn::MFNode::id(), blender::fn::MFSocket::index(), node, and blender::fn::MFSocket::node().
Referenced by compute_node_hashes().
|
static |
Produces a hash for every node. Two nodes with the same hash should have a high probability of outputting the same values.
Definition at line 355 of file multi_function_network_optimization.cc.
References blender::fn::MFNode::as_function(), BLI_rng_free(), BLI_rng_get_uint(), BLI_rng_new(), compute_node_hash(), blender::fn::MFNetwork::dummy_nodes(), blender::fn::MFNetwork::function_nodes(), blender::fn::MFNode::id(), blender::Stack< T, InlineBufferCapacity, Allocator >::is_empty(), node, blender::fn::MFSocket::node(), blender::fn::MFNetwork::node_id_amount(), blender::Stack< T, InlineBufferCapacity, Allocator >::peek(), blender::Stack< T, InlineBufferCapacity, Allocator >::pop(), blender::Stack< T, InlineBufferCapacity, Allocator >::push(), and blender::Stack< T, InlineBufferCapacity, Allocator >::push_multiple().
Referenced by common_subnetwork_elimination().
| void blender::fn::mf_network_optimization::constant_folding | ( | MFNetwork & | network, |
| ResourceScope & | scope | ||
| ) |
Find function nodes that always output the same value and replace those with constant nodes.
Definition at line 304 of file multi_function_network_optimization.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), compute_constant_sockets_and_add_folded_nodes(), find_constant_inputs_to_fold(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::fn::MFNetwork::relink(), blender::fn::MFNetwork::remove(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
| void blender::fn::mf_network_optimization::dead_node_removal | ( | MFNetwork & | network | ) |
Unused nodes are all those nodes that no dummy node depends upon.
Definition at line 129 of file multi_function_network_optimization.cc.
References blender::fn::MFNetwork::dummy_nodes(), find_nodes_based_on_mask(), mask_nodes_to_the_left(), and blender::fn::MFNetwork::remove().
|
static |
Definition at line 190 of file multi_function_network_optimization.cc.
References blender::fn::MFNetwork::add_link(), blender::fn::MFNetwork::add_output(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::fn::MFNode::as_dummy(), find_nodes_based_on_mask(), find_non_constant_nodes(), mask_nodes_to_the_right(), node, blender::fn::MFSocket::node(), output_has_non_constant_target_node(), and try_find_dummy_target_socket().
Referenced by constant_folding().
|
static |
Definition at line 104 of file multi_function_network_optimization.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Span< T >::index_range(), node, and blender::fn::MFNetwork::node_or_null_by_id().
Referenced by dead_node_removal(), and find_constant_inputs_to_fold().
|
static |
Definition at line 154 of file multi_function_network_optimization.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::fn::MFNetwork::dummy_nodes(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), function_node_can_be_constant(), blender::fn::MFNetwork::function_nodes(), and node.
Referenced by find_constant_inputs_to_fold().
|
static |
Definition at line 143 of file multi_function_network_optimization.cc.
References node.
Referenced by find_non_constant_nodes().
|
static |
Definition at line 418 of file multi_function_network_optimization.cc.
References Freestyle::a.
Referenced by nodes_output_same_values().
|
static |
Definition at line 404 of file multi_function_network_optimization.cc.
References blender::MultiValueMap< Key, Value >::add(), id, node, blender::fn::MFNetwork::node_id_amount(), and blender::fn::MFNetwork::node_or_null_by_id().
Referenced by common_subnetwork_elimination().
|
static |
Definition at line 51 of file multi_function_network_optimization.cc.
References blender::fn::MFNode::id(), blender::Stack< T, InlineBufferCapacity, Allocator >::is_empty(), node, blender::fn::MFSocket::node(), blender::fn::MFNetwork::node_id_amount(), blender::Stack< T, InlineBufferCapacity, Allocator >::pop(), blender::Stack< T, InlineBufferCapacity, Allocator >::push(), and set_tag_and_check_if_modified().
Referenced by dead_node_removal().
|
static |
Definition at line 78 of file multi_function_network_optimization.cc.
References blender::fn::MFNode::id(), blender::Stack< T, InlineBufferCapacity, Allocator >::is_empty(), node, blender::fn::MFNetwork::node_id_amount(), blender::Stack< T, InlineBufferCapacity, Allocator >::pop(), blender::Stack< T, InlineBufferCapacity, Allocator >::push(), and set_tag_and_check_if_modified().
Referenced by find_constant_inputs_to_fold().
|
static |
Definition at line 429 of file multi_function_network_optimization.cc.
References Freestyle::a, blender::fn::MFNode::as_function(), blender::fn::MFFunctionNode::function(), functions_are_equal(), blender::fn::MFNode::id(), blender::DisjointSet::in_same_set(), blender::fn::MFNode::input(), blender::fn::MFNode::is_dummy(), blender::DisjointSet::join(), blender::fn::MFSocket::node(), and blender::fn::MFInputSocket::origin().
Referenced by relink_duplicate_nodes().
|
static |
Definition at line 167 of file multi_function_network_optimization.cc.
References blender::fn::MFNode::id(), and blender::fn::MFOutputSocket::targets().
Referenced by find_constant_inputs_to_fold().
|
static |
Definition at line 220 of file multi_function_network_optimization.cc.
References blender::fn::CPPType::alignment(), blender::LinearAllocator< Allocator >::allocate(), AT, buffer, blender::fn::MFDataType::category(), blender::ResourceScope::construct(), blender::fn::MFParamType::data_type(), blender::ResourceScope::linear_allocator(), blender::fn::MultiFunction::param_indices(), blender::fn::MultiFunction::param_type(), params, blender::fn::MFDataType::Single, blender::fn::MFDataType::single_type(), blender::fn::CPPType::size(), blender::fn::MFDataType::Vector, and blender::fn::MFDataType::vector_base_type().
Referenced by compute_constant_sockets_and_add_folded_nodes().
|
static |
Definition at line 456 of file multi_function_network_optimization.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), node, blender::fn::MFNetwork::node_id_amount(), nodes_output_same_values(), blender::fn::MFNode::output(), blender::fn::MFNode::outputs(), blender::fn::MFNetwork::relink(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::MultiValueMap< Key, Value >::values().
Referenced by common_subnetwork_elimination().
|
static |
Definition at line 41 of file multi_function_network_optimization.cc.
Referenced by mask_nodes_to_the_left(), and mask_nodes_to_the_right().
|
static |
Definition at line 180 of file multi_function_network_optimization.cc.
References blender::fn::MFOutputSocket::targets().
Referenced by find_constant_inputs_to_fold().