Blender V5.3
blender::fn::FieldHashDeep Struct Reference

#include <FN_field.hh>

Public Member Functions

UniqueHash ensure (const GFieldRef &field)
UniqueHash lookup (const GFieldRef &field) const
bool contains (const GFieldRef &field) const

Public Attributes

Map< GFieldRef, UniqueHash > cache

Detailed Description

"Deep" hashing for fields that considers the operation and inputs semantically, rather than just the shallow data (i.e. memory address) of the field data, like the default "hash()" implementation. Because common field reuse would give this potentially exponential cost, this struct caches the hashes of intermediate fields.

Definition at line 306 of file FN_field.hh.

Member Function Documentation

◆ contains()

bool blender::fn::FieldHashDeep::contains ( const GFieldRef & field) const
inline

◆ ensure()

UniqueHash blender::fn::FieldHashDeep::ensure ( const GFieldRef & field)

Definition at line 113 of file field.cc.

References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::UniqueHashBytes::add(), BLI_assert_unreachable_static_t, cache, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::Span< T >::data(), blender::UniqueHashBytes::data, hash, blender::Stack< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Stack< T, InlineBufferCapacity, Allocator >::pop(), blender::Stack< T, InlineBufferCapacity, Allocator >::push(), blender::Span< T >::size(), T, blender::v, and blender::fn::GFieldRef::variant().

Referenced by blender::bke::EvaluateAtIndexInput::hash_unique(), blender::bke::EvaluateOnDomainInput::hash_unique(), blender::bke::mesh_surface_sample::BaryWeightSampleFn::hash_unique(), blender::bke::SampleIndexFunction::hash_unique(), blender::nodes::node_geo_accumulate_field_cc::AccumulateFieldInput::hash_unique(), blender::nodes::node_geo_accumulate_field_cc::TotalFieldInput::hash_unique(), blender::nodes::node_geo_blur_attribute_cc::BlurAttributeFieldInput::hash_unique(), blender::nodes::node_geo_cluster_by_distance_cc::ClusterByDistanceFieldInput::hash_unique(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::hash_unique(), blender::nodes::node_geo_curve_topology_points_of_curve_cc::PointsOfCurveInput::hash_unique(), blender::nodes::node_geo_edge_paths_to_selection_cc::PathToEdgeSelectionFieldInput::hash_unique(), blender::nodes::node_geo_edges_to_face_groups_cc::FaceSetFromBoundariesInput::hash_unique(), blender::nodes::node_geo_field_average_cc::FieldAverageInput::hash_unique(), blender::nodes::node_geo_field_min_and_max_cc::FieldMinMaxInput::hash_unique(), blender::nodes::node_geo_field_variance_cc::FieldVarianceInput::hash_unique(), blender::nodes::node_geo_index_of_nearest_cc::IndexOfNearestFieldInput::hash_unique(), blender::nodes::node_geo_input_cluster_by_connected_cc::ClusterByConnectedFieldInput::hash_unique(), blender::nodes::node_geo_input_mesh_face_is_planar_cc::PlanarFieldInput::hash_unique(), blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsCostFieldInput::hash_unique(), blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsNextVertFieldInput::hash_unique(), blender::nodes::node_geo_mesh_topology_corners_of_edge_cc::CornersOfEdgeInput::hash_unique(), blender::nodes::node_geo_mesh_topology_corners_of_vertex_cc::CornersOfVertInput::hash_unique(), blender::nodes::node_geo_proximity_cc::ProximityFunction::hash_unique(), blender::nodes::node_geo_sample_nearest_surface_cc::SampleNearestSurfaceFunction::hash_unique(), blender::nodes::node_geo_sample_uv_surface_cc::ReverseUVSampleFunction::hash_unique(), blender::nodes::node_geo_uv_tangent_cc::TangentFieldInput::hash_unique(), and blender::fn::preprocess_field_tree().

◆ lookup()

Member Data Documentation

◆ cache

Map<GFieldRef, UniqueHash> blender::fn::FieldHashDeep::cache

Definition at line 307 of file FN_field.hh.

Referenced by ensure().


The documentation for this struct was generated from the following files: