Blender V5.3
blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > Class Template Reference

#include <BLI_vector_set.hh>

Public Types

using value_type = Key
using pointer = Key *
using const_pointer = const Key *
using reference = Key &
using const_reference = const Key &
using iterator = Key *
using const_iterator = const Key *
using size_type = int64_t
using VectorT = Vector<Key, default_inline_buffer_capacity(sizeof(Key)), Allocator>

Public Member Functions

 VectorSet (Allocator allocator={}) noexcept
 VectorSet (Hash hash, IsEqual is_equal)
 VectorSet (NoExceptConstructor, Allocator allocator={})
 VectorSet (Span< Key > keys, Allocator allocator={})
 VectorSet (const std::initializer_list< Key > &keys, Allocator allocator={})
 ~VectorSet ()
 VectorSet (const VectorSet &other)
template<int64_t OtherInlineBufferCapacity>
 VectorSet (VectorSet< Key, OtherInlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > &&other) noexcept
VectorSet & operator= (const VectorSet &other)
VectorSet & operator= (VectorSet &&other)
const Key & operator[] (const int64_t index) const
 operator Span< Key > () const
Span< Key > as_span () const
void add_new (const Key &key)
void add_new (Key &&key)
bool add (const Key &key)
bool add (Key &&key)
template<typename ForwardKey>
bool add_as (ForwardKey &&key)
bool add_overwrite (const Key &key)
bool add_overwrite (Key &&key)
template<typename ForwardKey>
bool add_overwrite_as (ForwardKey &&key)
void add_multiple (Span< Key > keys)
bool contains (const Key &key) const
template<typename ForwardKey>
bool contains_as (const ForwardKey &key) const
bool remove (const Key &key)
template<typename ForwardKey>
bool remove_as (const ForwardKey &key)
void remove_contained (const Key &key)
template<typename ForwardKey>
void remove_contained_as (const ForwardKey &key)
template<typename Predicate>
int64_t remove_if (Predicate &&predicate)
Key pop ()
int64_t index_of (const Key &key) const
template<typename ForwardKey>
int64_t index_of_as (const ForwardKey &key) const
int64_t index_of_try (const Key &key) const
template<typename ForwardKey>
int64_t index_of_try_as (const ForwardKey &key) const
int64_t index_of_or_add (const Key &key)
int64_t index_of_or_add (Key &&key)
template<typename ForwardKey>
int64_t index_of_or_add_as (ForwardKey &&key)
const Key & lookup_key (const Key &key) const
template<typename ForwardKey>
const Key & lookup_key_as (const ForwardKey &key) const
Key lookup_key_default (const Key &key, const Key &default_value) const
template<typename ForwardKey, typename... ForwardDefault>
Key lookup_key_default_as (const ForwardKey &key, ForwardDefault &&...default_key) const
const Key * lookup_key_ptr (const Key &key) const
template<typename ForwardKey>
const Key * lookup_key_ptr_as (const ForwardKey &key) const
const Key * data () const
const Key * begin () const
const Key * end () const
IndexRange index_range () const
void print_stats (const char *name) const
bool is_inline () const
int64_t size () const
bool is_empty () const
int64_t capacity () const
int64_t removed_amount () const
int64_t size_per_element () const
int64_t size_in_bytes () const
void reserve (const int64_t n)
void clear ()
void clear_and_keep_capacity ()
int64_t count_collisions (const Key &key) const
VectorT extract_vector ()

Friends

template<typename Other, int64_t OtherInlineBufferCapacity, typename OtherProbingStrategy, typename OtherHash, typename OtherIsEqual, typename OtherSlot, typename OtherAllocator>
class VectorSet
bool operator== (const VectorSet &a, const VectorSet &b)

Detailed Description

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
class blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >
Template Parameters
KeyType of the elements that are stored in this set. It has to be movable. Furthermore, the hash and is-equal functions have to support it.
InlineBufferCapacityThe number of values that can be stored in the container without a heap allocation.
ProbingStrategyThe strategy used to deal with collisions. They are defined in BLI_probing_strategies.hh.
HashThe hash function used to hash the keys. There is a default for many types. See BLI_hash.hh for examples on how to define a custom hash function.
IsEqualThe equality operator used to compare keys. By default it will simply compare keys using the == operator.
SlotThis is what will actually be stored in the hash table array. At a minimum a slot has to be able to hold an array index and information about whether the slot is empty, occupied or removed. Using a non-standard slot type can improve performance for some types. Also see BLI_vector_set_slots.hh.
AllocatorThe allocator used by this set. Should rarely be changed, except when you don't want that MEM_* etc. is used internally.

Definition at line 94 of file BLI_vector_set.hh.

Member Typedef Documentation

◆ const_iterator

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::const_iterator = const Key *

Definition at line 102 of file BLI_vector_set.hh.

◆ const_pointer

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::const_pointer = const Key *

Definition at line 98 of file BLI_vector_set.hh.

◆ const_reference

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::const_reference = const Key &

Definition at line 100 of file BLI_vector_set.hh.

◆ iterator

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::iterator = Key *

Definition at line 101 of file BLI_vector_set.hh.

◆ pointer

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pointer = Key *

Definition at line 97 of file BLI_vector_set.hh.

◆ reference

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reference = Key &

Definition at line 99 of file BLI_vector_set.hh.

◆ size_type

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size_type = int64_t

Definition at line 103 of file BLI_vector_set.hh.

◆ value_type

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::value_type = Key

Definition at line 96 of file BLI_vector_set.hh.

◆ VectorT

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorT = Vector<Key, default_inline_buffer_capacity(sizeof(Key)), Allocator>

Definition at line 704 of file BLI_vector_set.hh.

Constructor & Destructor Documentation

◆ VectorSet() [1/7]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet ( Allocator allocator = {})
inlinenoexcept

Initialize an empty vector set. This is a cheap operation and won't do an allocation. This is necessary to avoid a high cost when no elements are added at all. An optimized grow operation is performed on the first insertion.

Definition at line 178 of file BLI_vector_set.hh.

◆ VectorSet() [2/7]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet ( Hash hash,
IsEqual is_equal )
inline

Definition at line 188 of file BLI_vector_set.hh.

◆ VectorSet() [3/7]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet ( NoExceptConstructor ,
Allocator allocator = {} )
inline

Definition at line 194 of file BLI_vector_set.hh.

◆ VectorSet() [4/7]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet ( Span< Key > keys,
Allocator allocator = {} )
inline

Definition at line 196 of file BLI_vector_set.hh.

◆ VectorSet() [5/7]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet ( const std::initializer_list< Key > & keys,
Allocator allocator = {} )
inline

Construct a vector set that contains the given keys. Duplicates will be removed automatically.

Definition at line 204 of file BLI_vector_set.hh.

◆ ~VectorSet()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::~VectorSet ( )
inline

Definition at line 209 of file BLI_vector_set.hh.

◆ VectorSet() [6/7]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet ( const VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & other)
inline

Definition at line 217 of file BLI_vector_set.hh.

◆ VectorSet() [7/7]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<int64_t OtherInlineBufferCapacity>
blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet ( VectorSet< Key, OtherInlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > && other)
inlinenoexcept

Definition at line 245 of file BLI_vector_set.hh.

Member Function Documentation

◆ add() [1/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add ( const Key & key)
inline

Add a key to the vector set. If the key exists in the set already, nothing is done. The return value is true if the key was newly added.

This is similar to std::unordered_set::insert.

Definition at line 351 of file BLI_vector_set.hh.

Referenced by blender::bke::calc_edges::add_existing_edges_to_hash_maps(), blender::bke::calc_edges::add_face_edges_to_hash_maps(), blender::TypeTable::add_struct(), blender::meshintersect::add_to_input_ids(), blender::animdata_filter_dopesheet_scene(), blender::ed::greasepencil::apply_eval_grease_pencil_data(), blender::BKE_fcurves_calc_keyed_frames_ex(), blender::BKE_library_main_rebuild_hierarchy(), blender::BKE_main_id_indirect_linked_update(), blender::BKE_mesh_calc_edges_tessface(), blender::BKE_pbvh_bmesh_node_save_orig(), blender::bm_edgering_pair_calc(), blender::bmo_flatten_exec(), blender::collect_verts_from_faces(), blender::bke::compositor::Cache::compute_frame_ranges(), blender::compositor::compute_schedule(), blender::seq::connect(), blender::seq::connected_strips_get(), blender::delete_key_vse_without_keying_set(), blender::seq::edit_move_strip_to_meta(), blender::seq::edit_strips_split(), blender::ed::sculpt_paint::ensure_editable_drawings(), blender::seq::expand_strips(), blender::seq::extract_standalone_strips(), blender::draw::extract_tan_init_common(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::ed::object::find_collections_containing_object(), blender::bke::find_edges_duplicates(), blender::compositor::find_node_dependency_nodes(), blender::compositor::find_zone_dependency_nodes(), blender::follow_edge_loop(), blender::follow_face_loop(), blender::ed::transform::freeSeqData(), blender::geometry::gather_all_fill_ids(), blender::geometry::gather_curve_attributes_to_interpolate(), blender::geometry::gather_curves_to_realize(), blender::geometry::gather_grease_pencils_to_realize(), blender::geometry::gather_meshes_to_realize(), blender::geometry::gather_point_attributes_to_interpolate(), blender::geometry::gather_pointclouds_to_realize(), blender::modifier::greasepencil::get_drawings_for_write(), blender::get_layer_names(), blender::get_node_names(), blender::ed::geometry::get_node_tools_type_data(), blender::get_scenes_that_needs_render_by_node_group(), blender::ed::space_node::get_selected_nodes(), blender::io::fbx::get_skin_bone_name_set(), blender::ed::curves::get_unique_editable_curves(), blender::ed::pointcloud::get_unique_editable_pointclouds(), blender::GPU_backend_type_selection_detect(), blender::group_ids_to_indices_test(), blender::bke::blendfile::PartialWriteContext::id_add(), blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::init_auto_masking(), blender::ed::curves::pen_tool::CurvesPenToolOperation::initialize(), blender::memory_cache::invalidate_outdated_caches_if_necessary(), blender::ed::mesh::join_materials(), blender::lib_override_root_is_valid(), blender::draw::mesh_cd_calc_used_gpu_layers(), blender::draw::mesh_extract_uv_format_init(), blender::ed::object::mesh_to_grease_pencil_get_material_list(), blender::nodes::node_geo_boolean_cc::node_geo_exec(), blender::nodes::node_geo_join_bundle::node_geo_exec(), blender::ntree_update_reroute_nodes(), blender::object_duplilist_legacy_instances(), blender::pack_linked_ids(), blender::paintvert_select_loop(), blender::seq::query_all_strips(), blender::seq::query_all_strips_recursive(), blender::seq::query_selected_strips(), blender::ed::transform::query_selected_strips_no_handles(), blender::ed::transform::query_strip_sources_timeline(), blender::ed::transform::query_strip_targets_timeline(), blender::seq::query_strips_at_frame(), blender::seq::query_strips_recursive_at_frame(), blender::ed::transform::query_time_dependent_strips_strips(), blender::seq::query_unselected_strips(), blender::ed::transform::recalcData_sequencer_retiming(), blender::render_result_new_from_exr(), blender::seq::retiming_key_overlap(), blender::ed::greasepencil::retrieve_editable_drawings_grouped_per_frame(), blender::geometry::ReverseUVSampler::ReverseUVSampler(), blender::ed::vse::segment_speed_set(), blender::ed::greasepencil::select_fill_exec(), blender::ed::vse::select_grouped_visual_overlap(), blender::bke::greasepencil::selected_mask_to_fills(), blender::ed::curves::separate_exec(), blender::ed::pointcloud::separate_exec(), blender::bke::greasepencil::separate_fill_ids(), blender::ed::vse::seq_load_apply_generic_options(), blender::ed::transform::seq_transform_collection_from_transdata(), blender::ed::vse::sequencer_add_images(), blender::ed::vse::sequencer_add_movie_strips_single_file(), blender::ed::vse::sequencer_add_sound_multiple_strips(), blender::ed::vse::sequencer_box_blade_exec(), blender::ed::vse::sequencer_clipboard_copy_exec(), blender::ed::vse::sequencer_clipboard_paste_exec(), blender::ed::vse::sequencer_copy_handles_to_selected_strips(), blender::ed::vse::sequencer_meta_make_exec(), blender::ed::vse::sequencer_meta_separate_exec(), blender::ed::vse::sequencer_offset_clear_exec(), blender::ed::vse::sequencer_reload_exec(), blender::ed::vse::sequencer_retiming_data_show_exec(), blender::ed::vse::sequencer_ripple_trim_exec(), blender::ed::vse::sequencer_select_connected_strips(), blender::ed::vse::sequencer_separate_images_exec(), blender::ed::vse::sequencer_snap_exec(), blender::ed::vse::slip_data_init(), blender::ed::transform::special_aftertrans_update__object(), blender::ed::vse::split_expand_strips(), blender::ed::sculpt_paint::store_mesh_from_eval(), blender::seq::strip_by_compositor_node_group_lookup_build(), blender::seq::strip_by_scene_lookup_build(), blender::ed::vse::strip_effect_get_new_inputs(), blender::seq::strip_lookup_append_effect(), blender::seq::strip_transform_handle_overwrite(), blender::seq::strip_transform_handle_overwrite_trim(), blender::seq::strip_transform_handle_shuffle(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes(), blender::bke::try_detect_native_field_domain(), blender::nodes::node_geo_extrude_mesh_cc::vert_indices_from_edges(), and blender::write_sdna_blob().

◆ add() [2/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add ( Key && key)
inline

Definition at line 355 of file BLI_vector_set.hh.

◆ add_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
bool blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as ( ForwardKey && key)
inline

◆ add_multiple()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_multiple ( Span< Key > keys)
inline

◆ add_new() [1/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new ( const Key & key)
inline

Add a new key to the vector set. This invokes undefined behavior when the key is in the set already. When you know for certain that a key is not in the set yet, use this method for better performance. This also expresses the intent better.

Definition at line 336 of file BLI_vector_set.hh.

Referenced by blender::TypeTable::add_builtin(), blender::ed::greasepencil::apply_eval_grease_pencil_data(), blender::nodes::LazyFunctionForForeachGeometryElementZone::build_graph_contents(), blender::nodes::node_geo_proximity_cc::ProximityFunction::build_group_trees(), blender::seq::edit_flag_for_removal(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::geometry::gather_point_attributes_to_interpolate(), blender::bke::get_direct_zone_relations(), blender::ed::greasepencil::get_hidden_material_indices(), blender::ed::greasepencil::get_locked_material_indices(), blender::get_mloopcol_names(), blender::get_scenes_that_needs_render_by_node_group(), blender::ed::curves::get_unique_editable_curves(), blender::ed::pointcloud::get_unique_editable_pointclouds(), blender::ed::curves::pen_tool::CurvesPenToolOperation::initialize(), blender::ed::mesh::join_shape_keys(), blender::ed::object::make_override_library_invoke(), blender::ed::greasepencil::merge_layers(), blender::draw::mesh_extract_uv_format_init(), blender::bke::node_add_node(), blender::bke::node_copy_with_mapping(), blender::nodes::node_geo_attribute_capture_cc::node_geo_exec(), blender::bke::node_rebuild_id_vector(), blender::bke::node_tree_blend_read_data(), blender::bke::node_unique_id(), blender::ui::popup_persistent_layout_panel_states(), blender::nodes::refresh_node_socket(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), and blender::text_update_shader_text_recursive().

◆ add_new() [2/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new ( Key && key)
inline

Definition at line 340 of file BLI_vector_set.hh.

◆ add_overwrite() [1/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite ( const Key & key)
inline

Similar to add but reinserts the key if it already exists. Using this only makes sense if the key contains additional data besides what affects the hash.

Note
This is different from first removing and then adding the key again, because add_overwrite does not change the index where the value is stored. Removing an element can change the order of elements.
Returns
True if the key was newly added, false if it was already present and was overwritten.

Definition at line 374 of file BLI_vector_set.hh.

Referenced by blender::tests::TEST().

◆ add_overwrite() [2/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite ( Key && key)
inline

Definition at line 378 of file BLI_vector_set.hh.

◆ add_overwrite_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
bool blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite_as ( ForwardKey && key)
inline

Definition at line 382 of file BLI_vector_set.hh.

◆ as_span()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
Span< Key > blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::as_span ( ) const
inline

Get a Span referencing the keys vector. The referenced memory buffer is only valid as long as the vector set is not changed.

The keys must not be changed, because this would change their hash value.

Definition at line 326 of file BLI_vector_set.hh.

Referenced by blender::meshintersect::add_list_to_input_ids(), blender::BKE_library_main_rebuild_hierarchy(), blender::draw::drw_attributes_merge(), blender::seq::edit_strips_split(), blender::draw::extract_tan_init_common(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::meshintersect::get_cdt_output(), blender::bke::get_direct_zone_relations(), blender::modifier::greasepencil::get_drawings_for_write(), blender::seq::lookup_effects_by_strip(), blender::seq::lookup_strips_by_compositor_node_group(), blender::seq::lookup_strips_by_scene(), blender::bke::mesh_calc_edges(), blender::draw::mesh_extract_uv_format_init(), blender::bke::node_free_node(), blender::nodes::node_geo_attribute_capture_cc::node_geo_exec(), blender::ed::space_node::node_group_separate_selected(), blender::ed::space_node::node_join_in_frame_exec(), blender::VectorSet< int, 0, DefaultProbingStrategy, DefaultHash< int >, DefaultEquality< int >, SimpleVectorSetSlot< int, LocalVertMapIndexT >, GuardedAllocator >::operator==, blender::pack_linked_ids(), blender::paintface_select_loop(), blender::geometry::ReverseUVSampler::ReverseUVSampler(), blender::bke::calc_edges::serialize_and_initialize_deduplicated_edges(), blender::bke::pbvh::MeshNode::shared_verts(), blender::ed::vse::split_expand_strips(), blender::ed::sculpt_paint::store_mesh_from_eval(), blender::io::obj::OBJMesh::store_normal_coords_and_indices(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), and blender::bke::pbvh::MeshNode::verts().

◆ begin()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key * blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::begin ( ) const
inline

◆ capacity()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::capacity ( ) const
inline

Returns the number of available slots. This is mostly for debugging purposes.

Definition at line 627 of file BLI_vector_set.hh.

◆ clear()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear ( )
inline

◆ clear_and_keep_capacity()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear_and_keep_capacity ( )
inline

Remove all elements, but don't free the underlying memory.

This can be more efficient than using clear if approximately the same or more elements are added again afterwards. If way fewer elements are added instead, the cost of maintaining a large hash table can lead to very bad worst-case performance.

Definition at line 683 of file BLI_vector_set.hh.

Referenced by blender::draw::DRW_MeshCDMask::clear(), and blender::bke::mix_deform_verts().

◆ contains()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains ( const Key & key) const
inline

Returns true if the key is in the vector set.

This is similar to std::unordered_set::find() != std::unordered_set::end().

Definition at line 406 of file BLI_vector_set.hh.

Referenced by blender::ed::greasepencil::apply_eval_grease_pencil_data(), blender::seq::are_strips_connected_together(), blender::BKE_library_main_rebuild_hierarchy(), blender::geometry::construct::build_output_mesh(), blender::nodes::node_geo_attribute_capture_cc::clean_unused_attributes(), blender::compositor::compute_output_reference_count(), blender::seq::cut_outside_connections(), blender::do_render_compositor(), blender::draw::drw_attributes_overlap(), blender::dynamicPaint_createUVSurface(), blender::seq::edit_strips_split(), blender::ed::sculpt_paint::ensure_editable_drawings(), blender::draw::extract_tan_init_common(), blender::bke::find_faces_missing_edges(), blender::ed::space_node::find_nested_node_id_in_root(), blender::compositor::find_node_dependency_nodes(), blender::compositor::find_zone_dependency_nodes(), blender::follow_edge_loop(), blender::follow_face_loop(), blender::bke::get_direct_zone_relations(), blender::get_scenes_that_needs_render_by_node_group(), blender::ed::mesh::join_generic_attributes(), blender::ed::space_node::join_group_inputs(), blender::compositor::PixelOperation::log_data(), blender::MOD_get_texture_coords(), blender::ed::space_node::node_group_make_test_selected(), blender::ed::space_node::node_join_attach_recursive(), blender::bke::ntree_copy_data(), blender::ed::transform::query_strip_targets_timeline(), blender::ed::transform::query_time_dependent_strips_strips(), blender::nodes::refresh_node_sockets_and_panels(), blender::ed::greasepencil::retrieve_editable_points(), blender::ed::greasepencil::retrieve_editable_strokes(), blender::ed::greasepencil::retrieve_editable_strokes_by_material(), blender::ed::greasepencil::retrieve_visible_points(), blender::ed::greasepencil::retrieve_visible_strokes(), blender::ed::greasepencil::select_fill_exec(), blender::bke::greasepencil::selected_mask_to_fills(), blender::ed::vse::sequencer_select_grouped_exec(), blender::ed::geometry::set_active_default_status_on_add(), blender::ed::vse::split_expand_strips(), blender::ed::sculpt_paint::store_mesh_from_eval(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::text_update_shader_exec(), blender::text_update_shader_text_recursive(), blender::ed::transform::transform_tied_to_other_node(), blender::unique_layer_name(), blender::unique_node_name(), and blender::bke::node_tree_runtime::update_link_vector().

◆ contains_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
bool blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains_as ( const ForwardKey & key) const
inline

◆ count_collisions()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::count_collisions ( const Key & key) const
inline

Get the number of collisions that the probing strategy has to go through to find the key or determine that it is not in the set.

Definition at line 699 of file BLI_vector_set.hh.

◆ data()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key * blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::data ( ) const
inline

◆ end()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key * blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::end ( ) const
inline

◆ extract_vector()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
VectorT blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::extract_vector ( )
inline

◆ index_of()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of ( const Key & key) const
inline

◆ index_of_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of_as ( const ForwardKey & key) const
inline

◆ index_of_or_add() [1/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of_or_add ( const Key & key)
inline

◆ index_of_or_add() [2/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of_or_add ( Key && key)
inline

Definition at line 509 of file BLI_vector_set.hh.

◆ index_of_or_add_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of_or_add_as ( ForwardKey && key)
inline

Definition at line 513 of file BLI_vector_set.hh.

◆ index_of_try()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of_try ( const Key & key) const
inline

◆ index_of_try_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of_try_as ( const ForwardKey & key) const
inline

Definition at line 496 of file BLI_vector_set.hh.

◆ index_range()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
IndexRange blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_range ( ) const
inline

◆ is_empty()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty ( ) const
inline

Returns true if no keys are stored.

Definition at line 619 of file BLI_vector_set.hh.

Referenced by blender::bmo_subdivide_edgering_exec(), blender::bke::id_hash::compute_linked_id_deep_hashes(), blender::ed::transform::createTransSeqImageData(), blender::draw::DRW_mesh_batch_cache_create_requested(), blender::dynamicPaint_createUVSurface(), blender::ED_grease_pencil_join_objects_exec(), blender::seq::edit_strips_split(), blender::draw::extract_tan_init_common(), blender::draw::extract_uv_maps(), blender::draw::extract_uv_maps_subdiv(), blender::ed::transform::gizmo2d_calc_transform_pivot(), blender::bke::blendfile::PartialWriteContext::id_add(), blender::io::fbx::import_skin_vertex_groups(), blender::memory_cache::invalidate_outdated_caches_if_necessary(), blender::ed::mesh::join_vertex_groups(), blender::ed::object::make_override_library_invoke(), blender::MOD_get_texture_coords(), blender::modify_mesh(), blender::ed::space_node::node_add_error_message_button(), blender::nodes::node_geo_join_bundle::node_geo_exec(), blender::ed::space_node::node_group_make_test_selected(), blender::ed::geometry::register_node_group_operators(), blender::render_result_new_from_exr(), blender::ed::greasepencil::retrieve_editable_points(), blender::ed::greasepencil::retrieve_editable_strokes(), blender::ed::greasepencil::retrieve_visible_fills(), blender::ed::greasepencil::retrieve_visible_points(), blender::ed::greasepencil::retrieve_visible_strokes(), blender::ed::vse::select_grouped_visual_overlap(), blender::ed::transform::seq_get_strip_pivot_median(), blender::ed::vse::sequencer_add_movie_strip_exec(), blender::ed::vse::sequencer_clipboard_copy_exec(), blender::ed::vse::sequencer_connect_exec(), blender::ed::vse::sequencer_meta_make_exec(), blender::ed::vse::sequencer_retiming_data_show_exec(), blender::ed::vse::sequencer_retiming_key_add_exec(), blender::ed::vse::sequencer_ripple_delete_exec(), blender::ed::vse::sequencer_ripple_trim_exec(), blender::ed::vse::sequencer_snap_exec(), blender::ed::vse::sequencer_strip_color_tag_set_exec(), blender::ed::vse::sequencer_view_selected_exec(), blender::ed::vse::slip_data_init(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST_F(), blender::draw::texpaint_request_active_uv(), and blender::write_sdna_blob().

◆ is_inline()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_inline ( ) const
inline

Definition at line 603 of file BLI_vector_set.hh.

◆ lookup_key()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key & blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key ( const Key & key) const
inline

Returns the key that is stored in the vector set that compares equal to the given key. This invokes undefined behavior when the key is not in the set.

Definition at line 522 of file BLI_vector_set.hh.

Referenced by blender::tests::TEST(), and blender::tests::TEST().

◆ lookup_key_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
const Key & blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_as ( const ForwardKey & key) const
inline

◆ lookup_key_default()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
Key blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_default ( const Key & key,
const Key & default_value ) const
inline

Returns the key that compares equal to the given key. If the key is not in the set, the given default value is returned instead.

Definition at line 537 of file BLI_vector_set.hh.

Referenced by blender::tests::TEST(), and blender::tests::TEST().

◆ lookup_key_default_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey, typename... ForwardDefault>
Key blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_default_as ( const ForwardKey & key,
ForwardDefault &&... default_key ) const
inline

Definition at line 542 of file BLI_vector_set.hh.

◆ lookup_key_ptr()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key * blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_ptr ( const Key & key) const
inline

Returns a pointer to the key that is stored in the vector set that compares equal to the given key. If the key is not in the set, null is returned.

Definition at line 555 of file BLI_vector_set.hh.

Referenced by blender::tests::TEST().

◆ lookup_key_ptr_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
const Key * blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_ptr_as ( const ForwardKey & key) const
inline

Definition at line 559 of file BLI_vector_set.hh.

Referenced by blender::tests::TEST().

◆ operator Span< Key >()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator Span< Key > ( ) const
inline

Definition at line 310 of file BLI_vector_set.hh.

◆ operator=() [1/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
VectorSet & blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator= ( const VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & other)
inline

Definition at line 290 of file BLI_vector_set.hh.

◆ operator=() [2/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
VectorSet & blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator= ( VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > && other)
inline

Definition at line 295 of file BLI_vector_set.hh.

◆ operator[]()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key & blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator[] ( const int64_t index) const
inline

Get the key stored at the given position in the vector.

Definition at line 303 of file BLI_vector_set.hh.

◆ pop()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
Key blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop ( )
inline

Delete and return a key from the set. This will remove the last element in the vector. The order of the remaining elements in the set is not changed.

Definition at line 470 of file BLI_vector_set.hh.

Referenced by blender::bke::blendfile::PartialWriteContext::id_add(), blender::ed::object::make_override_library_invoke(), blender::bke::node_free_node(), blender::tests::TEST(), and blender::tests::TEST().

◆ print_stats()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::print_stats ( const char * name) const
inline

Print common statistics like size and collision count. This is useful for debugging purposes.

Definition at line 597 of file BLI_vector_set.hh.

◆ remove()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove ( const Key & key)
inline

Deletes the key from the set. Returns true when the key existed in the set and is now removed.

This might change the order of elements in the vector. However, this will never affect the order of any element added before the removed one.

This is similar to std::unordered_set::erase.

Definition at line 423 of file BLI_vector_set.hh.

Referenced by blender::ed::space_node::get_nodes_to_group(), blender::seq::retiming_key_overlap(), blender::ed::vse::sequencer_copy_handles_to_selected_strips(), blender::ed::vse::sequencer_select_exec(), blender::ed::vse::strip_modifier_copy_exec(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().

◆ remove_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
bool blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_as ( const ForwardKey & key)
inline

Definition at line 427 of file BLI_vector_set.hh.

◆ remove_contained()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_contained ( const Key & key)
inline

Deletes the key from the set. This invokes undefined behavior when the key is not in the set. It might change the order of elements in the vector.

Definition at line 436 of file BLI_vector_set.hh.

Referenced by blender::geometry::gather_point_attributes_to_interpolate(), and blender::tests::TEST().

◆ remove_contained_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
void blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_contained_as ( const ForwardKey & key)
inline

Definition at line 440 of file BLI_vector_set.hh.

◆ remove_if()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename Predicate>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_if ( Predicate && predicate)
inline

Remove all values for which the given predicate is true and return the number or values removed. This may change the order of elements in the vector.

This is similar to std::erase_if.

Definition at line 451 of file BLI_vector_set.hh.

Referenced by blender::seq::collection_filter_channel_up_to_incl(), blender::seq::collection_filter_rendered_strips(), blender::seq::connect(), blender::ed::transform::createTransSeqImageData(), blender::ed::transform::freeSeqData(), blender::ed::vse::freeze_frame_add_from_strip_selection(), blender::ed::space_node::get_nodes_to_group(), blender::ed::vse::get_scene_strip_for_time_sync(), blender::ed::transform::gizmo2d_calc_bounds(), blender::ed::transform::gizmo2d_calc_rotation(), blender::ed::transform::gizmo2d_calc_transform_orientation(), blender::ed::transform::gizmo2d_calc_transform_pivot(), blender::nodes::node_geo_transfer_attributes_cc::node_geo_exec(), blender::ed::space_node::node_group_separate_selected(), blender::seq::query_overwrite_targets(), blender::ed::transform::query_strip_sources_preview(), blender::ed::transform::query_strip_sources_timeline(), blender::ed::transform::query_strip_targets_preview(), blender::ed::transform::query_strip_targets_timeline(), blender::ed::transform::query_time_dependent_strips_strips(), blender::ed::geometry::register_node_group_operators(), blender::ed::vse::selected_strips_from_context(), blender::ed::transform::seq_get_strip_pivot_median(), blender::ed::vse::sequencer_retiming_data_show_exec(), blender::ed::vse::sequencer_retiming_segment_speed_set_exec(), blender::ed::vse::sequencer_ripple_trim_exec(), blender::ed::vse::sequencer_select_exec(), blender::ed::vse::sequencer_snap_exec(), blender::ed::vse::slip_data_init(), blender::ed::vse::strip_effect_get_new_inputs(), and blender::tests::TEST().

◆ removed_amount()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::removed_amount ( ) const
inline

Returns the amount of removed slots in the set. This is mostly for debugging purposes.

Definition at line 635 of file BLI_vector_set.hh.

◆ reserve()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve ( const int64_t n)
inline

◆ size()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size ( ) const
inline

Returns the number of keys stored in the vector set.

Definition at line 611 of file BLI_vector_set.hh.

Referenced by blender::TypeTable::add_builtin(), blender::seq::are_strips_connected_together(), blender::arrayModifier_doArray(), blender::BKE_fcurves_calc_keyed_frames_ex(), blender::BKE_library_main_rebuild_hierarchy(), blender::BKE_main_id_indirect_linked_update(), blender::BKE_mesh_calc_edges_tessface(), blender::bmo_subdivide_edgering_exec(), blender::meshintersect::cdt_draw(), blender::io::hydra::copy_submesh(), blender::ed::transform::createTransSeqImageData(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::draw::drw_attributes_add_request(), blender::ed::object::dt_layers_select_src_itemf(), blender::ED_grease_pencil_join_objects_exec(), blender::bke::node_tree_runtime::ensure_topology_cache(), blender::geometry::execute_realize_mesh_tasks(), blender::seq::expand_strips(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::geometry::gather_realize_tasks_recursive(), blender::ed::transform::gizmo2d_calc_bounds(), blender::ed::transform::gizmo2d_calc_rotation(), blender::ed::transform::gizmo2d_calc_transform_orientation(), blender::group_ids_to_indices_test(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group_lazyness(), blender::geometry::identifiers_to_indices(), blender::ed::mesh::join_materials(), blender::ed::mesh::join_objects_exec(), blender::lib_override_root_is_valid(), blender::ed::object::make_override_library_invoke(), blender::mesh_loops_to_tessdata(), blender::bke::mix_deform_verts(), blender::modify_mesh(), blender::nodes::node_geo_boolean_cc::node_geo_exec(), blender::ed::space_node::node_group_make_exec(), blender::ed::space_node::node_join_nodes_exec(), blender::ntree_update_reroute_nodes(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::ed::greasepencil::retrieve_editable_drawings_grouped_per_frame(), blender::ed::curves::separate_exec(), blender::ed::pointcloud::separate_exec(), blender::ed::vse::sequencer_add_effect_strip_exec(), blender::ed::vse::sequencer_box_blade_exec(), blender::ed::vse::sequencer_clipboard_copy_exec(), blender::ed::vse::sequencer_reassign_inputs_exec(), blender::ed::vse::strip_effect_get_new_inputs(), blender::seq::strip_transform_handle_overwrite(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::ed::transform::transform_seq_slide_cursor_get(), blender::bke::try_detect_native_field_domain(), blender::bke::node_tree_runtime::update_toposort(), blender::VectorSet< int, 0, DefaultProbingStrategy, DefaultHash< int >, DefaultEquality< int >, SimpleVectorSetSlot< int, LocalVertMapIndexT >, GuardedAllocator >::VectorSet(), and blender::write_sdna_blob().

◆ size_in_bytes()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size_in_bytes ( ) const
inline

Returns the approximate memory requirements of the set in bytes. This is more correct for larger sets.

Definition at line 652 of file BLI_vector_set.hh.

◆ size_per_element()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size_per_element ( ) const
inline

Returns the bytes required per element. This is mostly for debugging purposes.

Definition at line 643 of file BLI_vector_set.hh.

◆ operator==

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool operator== ( const VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & a,
const VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & b )
friend

Definition at line 315 of file BLI_vector_set.hh.

◆ VectorSet

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename Other, int64_t OtherInlineBufferCapacity, typename OtherProbingStrategy, typename OtherHash, typename OtherIsEqual, typename OtherSlot, typename OtherAllocator>
friend class VectorSet
friend

The documentation for this class was generated from the following file: