Blender
V3.3
|
#include <BLI_vector.hh>
Public Types | |
using | value_type = T |
using | pointer = T * |
using | const_pointer = const T * |
using | reference = T & |
using | const_reference = const T & |
using | iterator = T * |
using | const_iterator = const T * |
using | size_type = int64_t |
Public Member Functions | |
Vector (Allocator allocator={}) noexcept | |
Vector (NoExceptConstructor, Allocator allocator={}) noexcept | |
Vector (int64_t size, Allocator allocator={}) | |
Vector (int64_t size, const T &value, Allocator allocator={}) | |
template<typename U , BLI_ENABLE_IF((std::is_convertible_v< U, T >)) > | |
Vector (Span< U > values, Allocator allocator={}) | |
template<typename U , BLI_ENABLE_IF((std::is_convertible_v< U, T >)) > | |
Vector (const std::initializer_list< U > &values) | |
Vector (const std::initializer_list< T > &values) | |
template<typename U , size_t N, BLI_ENABLE_IF((std::is_convertible_v< U, T >)) > | |
Vector (const std::array< U, N > &values) | |
template<typename InputIt , BLI_ENABLE_IF((!std::is_convertible_v< InputIt, int >)) > | |
Vector (InputIt first, InputIt last, Allocator allocator={}) | |
Vector (const ListBase &values, Allocator allocator={}) | |
Vector (const Vector &other) | |
template<int64_t OtherInlineBufferCapacity> | |
Vector (const Vector< T, OtherInlineBufferCapacity, Allocator > &other) | |
template<int64_t OtherInlineBufferCapacity> | |
Vector (Vector< T, OtherInlineBufferCapacity, Allocator > &&other) noexcept(std::is_nothrow_move_constructible_v< T >) | |
~Vector () | |
Vector & | operator= (const Vector &other) |
Vector & | operator= (Vector &&other) |
const T & | operator[] (int64_t index) const |
T & | operator[] (int64_t index) |
operator Span< T > () const | |
operator MutableSpan< T > () | |
template<typename U , BLI_ENABLE_IF((is_span_convertible_pointer_v< T, U >)) > | |
operator Span< U > () const | |
template<typename U , BLI_ENABLE_IF((is_span_convertible_pointer_v< T, U >)) > | |
operator MutableSpan< U > () | |
Span< T > | as_span () const |
MutableSpan< T > | as_mutable_span () |
void | reserve (const int64_t min_capacity) |
void | resize (const int64_t new_size) |
void | resize (const int64_t new_size, const T &value) |
void | reinitialize (const int64_t new_size) |
void | clear () |
void | clear_and_make_inline () |
void | append (const T &value) |
void | append (T &&value) |
template<typename... ForwardValue> | |
void | append_as (ForwardValue &&...value) |
int64_t | append_and_get_index (const T &value) |
int64_t | append_and_get_index (T &&value) |
template<typename... ForwardValue> | |
int64_t | append_and_get_index_as (ForwardValue &&...value) |
void | append_non_duplicates (const T &value) |
void | append_unchecked (const T &value) |
void | append_unchecked (T &&value) |
template<typename... ForwardT> | |
void | append_unchecked_as (ForwardT &&...value) |
void | append_n_times (const T &value, const int64_t n) |
void | increase_size_by_unchecked (const int64_t n) noexcept |
void | extend (Span< T > array) |
void | extend (const T *start, int64_t amount) |
void | extend_non_duplicates (Span< T > array) |
void | extend_unchecked (Span< T > array) |
void | extend_unchecked (const T *start, int64_t amount) |
template<typename InputIt > | |
void | extend (InputIt first, InputIt last) |
void | insert (const int64_t insert_index, const T &value) |
void | insert (const int64_t insert_index, T &&value) |
void | insert (const int64_t insert_index, Span< T > array) |
template<typename InputIt > | |
void | insert (const T *insert_position, InputIt first, InputIt last) |
template<typename InputIt > | |
void | insert (const int64_t insert_index, InputIt first, InputIt last) |
void | prepend (const T &value) |
void | prepend (T &&value) |
void | prepend (Span< T > values) |
template<typename InputIt > | |
void | prepend (InputIt first, InputIt last) |
const T & | last (const int64_t n=0) const |
T & | last (const int64_t n=0) |
const T & | first () const |
T & | first () |
int64_t | size () const |
bool | is_empty () const |
void | remove_last () |
T | pop_last () |
void | remove_and_reorder (const int64_t index) |
void | remove_first_occurrence_and_reorder (const T &value) |
void | remove (const int64_t index) |
void | remove (const int64_t start_index, const int64_t amount) |
int64_t | first_index_of_try (const T &value) const |
int64_t | first_index_of (const T &value) const |
bool | contains (const T &value) const |
void | fill (const T &value) const |
T * | data () |
const T * | data () const |
T * | begin () |
T * | end () |
const T * | begin () const |
const T * | end () const |
std::reverse_iterator< T * > | rbegin () |
std::reverse_iterator< T * > | rend () |
std::reverse_iterator< const T * > | rbegin () const |
std::reverse_iterator< const T * > | rend () const |
int64_t | capacity () const |
IndexRange | index_range () const |
void | print_stats (StringRef name="") const |
Friends | |
template<typename OtherT , int64_t OtherInlineBufferCapacity, typename OtherAllocator > | |
class | Vector |
bool | operator== (const Vector &a, const Vector &b) |
bool | operator!= (const Vector &a, const Vector &b) |
Definition at line 64 of file BLI_vector.hh.
using blender::Vector< T, InlineBufferCapacity, Allocator >::const_iterator = const T * |
Definition at line 72 of file BLI_vector.hh.
using blender::Vector< T, InlineBufferCapacity, Allocator >::const_pointer = const T * |
Definition at line 68 of file BLI_vector.hh.
using blender::Vector< T, InlineBufferCapacity, Allocator >::const_reference = const T & |
Definition at line 70 of file BLI_vector.hh.
using blender::Vector< T, InlineBufferCapacity, Allocator >::iterator = T * |
Definition at line 71 of file BLI_vector.hh.
using blender::Vector< T, InlineBufferCapacity, Allocator >::pointer = T * |
Definition at line 67 of file BLI_vector.hh.
using blender::Vector< T, InlineBufferCapacity, Allocator >::reference = T & |
Definition at line 69 of file BLI_vector.hh.
using blender::Vector< T, InlineBufferCapacity, Allocator >::size_type = int64_t |
Definition at line 73 of file BLI_vector.hh.
using blender::Vector< T, InlineBufferCapacity, Allocator >::value_type = T |
Definition at line 66 of file BLI_vector.hh.
|
inlinenoexcept |
Create an empty vector. This does not do any memory allocation.
Definition at line 117 of file BLI_vector.hh.
|
inlinenoexcept |
Definition at line 125 of file BLI_vector.hh.
|
inlineexplicit |
Create a vector with a specific size. The elements will be default constructed. If T is trivially constructible, the elements in the vector are not touched.
Definition at line 134 of file BLI_vector.hh.
|
inline |
Create a vector filled with a specific value.
Definition at line 143 of file BLI_vector.hh.
|
inline |
Create a vector from a span. The values in the vector are copy constructed.
Definition at line 153 of file BLI_vector.hh.
|
inline |
Create a vector that contains copies of the values in the initialized list.
This allows you to write code like: Vector<int> vec = {3, 4, 5};
Definition at line 168 of file BLI_vector.hh.
|
inline |
Definition at line 172 of file BLI_vector.hh.
|
inline |
Definition at line 177 of file BLI_vector.hh.
|
inline |
Definition at line 185 of file BLI_vector.hh.
|
inline |
Create a vector from a ListBase. The caller has to make sure that the values in the linked list have the correct type.
Example Usage: Vector<ModifierData *> modifiers(ob->modifiers);
Definition at line 200 of file BLI_vector.hh.
|
inline |
Create a copy of another vector. The other vector will not be changed. If the other vector has less than InlineBufferCapacity elements, no allocation will be made.
Definition at line 212 of file BLI_vector.hh.
|
inline |
Create a copy of a vector with a different InlineBufferCapacity. This needs to be handled separately, so that the other one is a valid copy constructor.
Definition at line 221 of file BLI_vector.hh.
|
inlinenoexcept |
Steal the elements from another vector. This does not do an allocation. The other vector will have zero elements afterwards.
Definition at line 231 of file BLI_vector.hh.
References AT, blender::Vector< T, InlineBufferCapacity, Allocator >::capacity(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), T, blender::uninitialized_relocate_n(), and UPDATE_VECTOR_SIZE.
|
inline |
Definition at line 267 of file BLI_vector.hh.
References blender::destruct_n(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::tests::TEST().
|
inline |
Insert a new element at the end of the vector. This might cause a reallocation with the capacity is exceeded.
This is similar to std::vector::push_back.
Definition at line 433 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_as().
Referenced by blender::fn::FieldEvaluator::add(), blender::ResourceScope::add(), blender::fn::MFProcedureBuilder::add_call(), blender::compositor::NodeOperationBuilder::add_complex_operation_buffers(), blender::geometry::add_curves_on_mesh(), blender::compositor::NodeOperationBuilder::add_datatype_conversions(), blender::nodes::node_geo_dual_mesh_cc::add_edge(), blender::deg::DepsgraphNodeBuilder::add_id_node(), blender::deg::Depsgraph::add_id_node(), InstancesComponent::add_instance(), blender::nodes::GatherLinkSearchOpParams::add_item(), CryptomatteSession::add_layer(), blender::io::obj::MTLWriter::add_materials(), blender::nodes::LinkSearchOpParams::add_node(), blender::compositor::CryptomatteOperation::add_object_index(), blender::compositor::NodeOperationBuilder::add_operation_input_constants(), blender::deg::DepsgraphNodeBuilder::add_operation_node(), CurveEval::add_spline(), blender::fn::FieldEvaluator::add_with_destination(), VolumeUniformBufPool::alloc(), blender::bke::pbvh::pixels::Triangles::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::append_non_duplicates(), GPUCodegenCreateInfo::NameBuffer::append_sampler_name(), blender::ed::spreadsheet::apply_filter_operation(), asset_operation_get_ids_from_context(), BLI_string_search_add(), BLI_string_search_query(), blender::ed::sculpt_paint::min_distance_edit::calculate_points_per_side(), blender::nodes::SeparateRGBAFunction::call(), blender::nodes::node_geo_raycast_cc::RaycastFunction::call(), blender::nodes::node_shader_sepcomb_xyz_cc::MF_SeparateXYZ::call(), blender::fn::combine_field_inputs(), compute_attributes_to_store(), compute_geometry(), compute_interpolated_polygons(), compute_vertex_mask__armature_mode(), blender::ui::context_path_add_generic(), blender::bke::copy_with_removed_curves(), blender::bke::copy_with_removed_points(), blender::fn::MFProcedureDotExport::create_entry_node(), blender::geometry::create_nurbs_to_bezier_handles(), CustomData_blend_write_prepare(), blender::deg::deg_graph_transitive_reduction(), blender::compositor::NodeOperationBuilder::determine_canvases(), blender::meshintersect::direct_mesh_boolean(), blender::nodes::node_geo_dual_mesh_cc::dissolve_redundant_verts(), DRW_view_data_create(), DRW_view_data_use_engine(), duplicate_exec(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points(), blender::nodes::node_geo_edge_paths_to_curves_cc::edge_paths_to_curves_convert(), blender::geometry::edges_to_curve_point_indices(), blender::eevee::VelocityModule::end_sync(), blender::draw::Texture::ensure_layer_views(), blender::draw::Texture::ensure_mip_views(), blender::fn::evaluate_fields(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::execute_multi_function_node(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::execute_multi_function_node__field(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::execute_multi_function_node__value(), blender::geometry::execute_realize_curve_tasks(), blender::geometry::execute_realize_mesh_tasks(), blender::geometry::execute_realize_pointcloud_tasks(), blender::nodes::GeoNodeExecParams::extract_multi_input(), blender::modifiers::geometry_nodes::NodeParamsProvider::extract_multi_input(), blender::string_search::extract_normalized_words(), blender::IndexMask::extract_ranges(), blender::IndexMask::extract_ranges_invert(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::io::obj::filter_supported_objects(), blender::gpu::GLShader::finalize(), blender::deg::ComponentNode::finalize_build(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(), blender::index_mask_ops::detail::find_indices_based_on_predicate__merge(), blender::bke::pbvh::pixels::find_nodes_to_update(), find_spreadsheet_editors(), blender::ed::space_node::viewer_linking::find_viewer_nodes(), blender::io::obj::fixup_invalid_polygon(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::forward_output(), blender::compositor::FullFrameExecutionModel::FullFrameExecutionModel(), blender::geometry::gather_generic_curve_attributes_to_propagate(), blender::geometry::gather_generic_mesh_attributes_to_propagate(), blender::geometry::gather_generic_pointcloud_attributes_to_propagate(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::bke::node_field_inferencing::gather_input_socket_dependencies(), gather_mutable_geometry_sets(), blender::ed::space_node::gather_socket_link_operations(), blender::compositor::generate_hashes(), generate_unique_instance_ids(), blender::io::obj::geom_add_curve_parameters(), blender::io::obj::geom_add_curve_vertex_indices(), blender::io::obj::geom_add_edge(), blender::bke::geometry_set_collect_recursive(), blender::io::obj::geometry_to_blender_objects(), blender::compositor::SharedOperationBuffers::get_areas_to_render(), GeometrySet::get_components_for_read(), blender::nodes::DInputSocket::get_corresponding_group_input_sockets(), blender::fn::get_field_context_inputs(), blender::fn::MFProcedureDotExport::get_instructions_in_block(), blender::bke::node_field_inferencing::get_node_field_inferencing_interface(), blender::compositor::get_operation_dependencies(), blender::geometry::get_selected_edges(), blender::ed::sculpt_paint::get_symmetry_brush_transforms(), blender::gpu::GLShaderInterface::GLShaderInterface(), GPU_debug_group_begin(), gpu_select_query_load_id(), GPU_shader_create_ex(), GPU_shader_create_from_info(), blender::render::texturemargin::TextureMarginMap::grow_dijkstra(), OutlinerLibOverrideData::id_root_add(), OutlinerLibOverrideData::id_root_set(), image_exr_from_scene_linear_to_output(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::initialize_node_state(), blender::fn::MFSignatureBuilder::input(), blender::fn::MFProcedureDotExport::instruction_to_string(), internal_dependencies_panel_draw(), blender::IndexMask::invert(), blender::nodes::node_geo_join_geometry_cc::join_component_type(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::load_unlinked_input_value(), blender::threading::EnumerableThreadSpecific< T >::local(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::log_socket_value(), blender::nodes::geometry_nodes_eval_log::NodeLog::lookup_available_attributes(), make_recursive_duplis(), blender::eevee::MaterialModule::material_array_get(), blender::draw::mesh_buffer_cache_create_requested(), blender::draw::mesh_buffer_cache_create_requested_subdiv(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), blender::nodes::geometry_nodes_eval_log::ModifierLog::ModifierLog(), blender::fn::MFSignatureBuilder::mutable_(), blender::ed::space_node::named_attribute_tooltip(), blender::nodes::node_geo_boolean_cc::node_geo_exec(), blender::nodes::node_geo_collection_info_cc::node_geo_exec(), blender::ed::space_node::node_get_extra_info(), blender::ed::space_node::node_group_ungroup(), object_clear_transform_generic_exec(), object_duplilist(), object_transform_axis_target_invoke(), blender::fn::MFSignatureBuilder::output(), blender::io::obj::OBJParser::parse(), blender::ed::space_node::pick_link(), blender::geometry::prepare_attribute_fallbacks(), blender::nodes::node_geo_scale_elements_cc::prepare_edge_islands(), blender::nodes::node_geo_scale_elements_cc::prepare_face_islands(), blender::gpu::Shader::print_log(), blender::LinearAllocator< Allocator >::provide_buffer(), blender::compositor::NodeOperationBuilder::prune_operations(), blender::deg::Relation::Relation(), blender::bke::MutableAttributeAccessor::remove_anonymous(), InstancesComponent::remove_unused_references(), blender::compositor::NodeOperationBuilder::resolve_proxies(), blender::geometry::retrieve_attribute_spans(), blender::bke::retrieve_attributes_for_transfer(), blender::ed::sculpt_paint::AddOperationExecutor::sample_in_center(), blender::nodes::node_geo_distribute_points_on_faces_cc::sample_mesh_surface(), blender::ed::sculpt_paint::AddOperationExecutor::sample_projected(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), blender::bke::mesh_surface_sample::sample_surface_points_projected(), blender::bke::mesh_surface_sample::sample_surface_points_spherical(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::schedule_node(), blender::string_search::score_query_against_words(), blender::nodes::search_link_ops_for_declarations(), blender::ed::sculpt_paint::select_grow::select_grow_invoke_per_curve(), blender::nodes::node_geo_material_selection_cc::select_mesh_by_material(), selected_indices_from_vertex_group(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::set_input_required(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::set_input_unused(), shader_to_rgba_node_gather(), blender::ed::space_node::snode_autoconnect(), blender::ed::space_node::sort_multi_input_socket_links(), blender::compositor::sort_operations_recursive(), standard_defines(), blender::tests::TEST(), blender::bke::tests::TEST(), blender::nodes::DerivedNodeTree::to_dot(), blender::nodes::NodeTreeRef::to_dot(), blender::bke::DynamicPointAttributeProvider::try_get_for_read(), blender::bke::DynamicPointAttributeProvider::try_get_for_write(), blender::ed::space_node::ui_node_link_items(), blender::ed::space_node::ui_node_menu_column(), ui_update_flexible_spacing(), blender::bke::NodeTreeMainUpdater::update(), view2d_major_step_x__time(), blender::geometry::weld_edge_ctx_alloc(), blender::geometry::weld_poly_loop_ctx_alloc(), blender::geometry::weld_vert_ctx_alloc_and_setup(), and blender::io::obj::write_mesh_objects().
|
inline |
Definition at line 437 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_as().
|
inline |
Append the value to the vector and return the index that can be used to access the newly added value.
Definition at line 452 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_and_get_index_as().
Referenced by blender::fn::FieldEvaluator::add(), and blender::tests::TEST().
|
inline |
Definition at line 456 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_and_get_index_as().
|
inline |
Definition at line 460 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_as(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::Vector< T, InlineBufferCapacity, Allocator >::append_and_get_index().
|
inline |
Definition at line 442 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_unchecked_as().
Referenced by blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::append_and_get_index_as(), blender::io::serialize::convert_from_json_to_object(), blender::nodes::node_geo_scale_elements_cc::prepare_edge_islands(), blender::nodes::node_geo_scale_elements_cc::prepare_face_islands(), blender::io::serialize::json::testing::TEST(), blender::tests::TEST(), and blender::deg::BuilderStack::trace().
|
inline |
Insert the same element n times at the end of the vector. This might result in a reallocation internally.
Definition at line 504 of file BLI_vector.hh.
References BLI_assert, blender::Vector< T, InlineBufferCapacity, Allocator >::increase_size_by_unchecked(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::uninitialized_fill_n().
Referenced by blender::bke::node_field_inferencing::get_dummy_field_inferencing_interface(), and blender::HashTableStats::HashTableStats().
|
inline |
Append the value if it is not yet in the vector. This has to do a linear search to check if the value is in the vector. Therefore, this should only be called when it is known that the vector is small.
Definition at line 472 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), and blender::Vector< T, InlineBufferCapacity, Allocator >::contains().
Referenced by blender::Vector< T, InlineBufferCapacity, Allocator >::extend_non_duplicates(), blender::bke::node_field_inferencing::find_group_output_dependencies(), gather_component_types_recursive(), GeometrySet::keep_only_during_modify(), and blender::tests::TEST().
|
inline |
Append the value and assume that vector has enough memory reserved. This invokes undefined behavior when not enough capacity has been reserved beforehand. Only use this in performance critical code.
Definition at line 484 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_unchecked_as().
Referenced by blender::fn::MFParamsBuilder::add_ignored_single_output(), blender::fn::MFParamsBuilder::add_readonly_vector_input(), blender::fn::MFParamsBuilder::add_single_mutable(), blender::fn::MFParamsBuilder::add_uninitialized_single_output(), blender::fn::MFParamsBuilder::add_vector_mutable(), blender::fn::MFParamsBuilder::add_vector_output(), BKE_mesh_merge_customdata_for_apply_modifier(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_mesh_data_from_poly_selection(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_mesh_data_from_poly_selection_edge_face(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_polygons_from_edge_selection(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_polygons_from_poly_selection(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_polygons_from_vertex_selection(), computed_masked_polygons(), and test_sin_cos_from_fraction_symmetry().
|
inline |
Definition at line 488 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_unchecked_as().
|
inline |
Definition at line 492 of file BLI_vector.hh.
References BLI_assert, T, and UPDATE_VECTOR_SIZE.
Referenced by blender::fn::MFParamsBuilder::add_readonly_single_input(), blender::fn::MFParamsBuilder::add_readonly_single_input_value(), blender::Vector< T, InlineBufferCapacity, Allocator >::append_as(), and blender::Vector< T, InlineBufferCapacity, Allocator >::append_unchecked().
|
inline |
|
inline |
Definition at line 325 of file BLI_vector.hh.
Referenced by BKE_mesh_merge_customdata_for_apply_modifier(), BLI_string_search_add(), blender::ed::space_node::context_path_add_node_tree_and_node_groups(), blender::nodes::node_geo_delete_geometry_cc::do_mesh_separation(), ED_spreadsheet_context_path_exists(), ED_spreadsheet_context_path_is_active(), blender::nodes::node_geo_edge_paths_to_curves_cc::edge_paths_to_curves_convert(), blender::bke::CurvesGeometry::evaluated_normals(), blender::index_mask_ops::detail::find_indices_based_on_predicate__merge(), blender::nodes::geometry_nodes_eval_log::ModifierLog::find_node_by_spreadsheet_editor_context(), find_sockets_to_preview_for_spreadsheet(), blender::nodes::geometry_nodes_eval_log::ModifierLog::find_tree_by_node_editor_context(), blender::bke::curves::nurbs::interpolate_to_evaluated(), interpolate_to_evaluated_impl(), blender::bke::curves::nurbs::interpolate_to_evaluated_rational(), blender::IndexMask::invert(), blender::fn::InstructionIndices::mask(), blender::GVArrayImpl_For_SlicedGVArray::materialize_compressed_to_uninitialized(), blender::IndexMask::slice_and_offset(), and blender::tests::TEST().
|
inline |
Definition at line 866 of file BLI_vector.hh.
Referenced by BLI_string_search_query(), blender::io::obj::OBJMesh::calc_poly_order(), blender::index_mask_ops::detail::find_indices_based_on_predicate__merge(), blender::compositor::get_operation_dependencies(), blender::nodes::geometry_nodes_eval_log::GFieldValueLog::GFieldValueLog(), blender::render::texturemargin::TextureMarginMap::grow_dijkstra(), internal_dependencies_panel_draw(), blender::ed::space_node::named_attribute_tooltip(), blender::nodes::node_geo_collection_info_cc::node_geo_exec(), blender::Vector< T, InlineBufferCapacity, Allocator >::rend(), blender::ed::space_node::snode_autoconnect(), blender::ed::space_node::sort_multi_input_socket_links(), blender::tests::TEST(), and test_sin_cos_from_fraction_symmetry().
|
inline |
Definition at line 875 of file BLI_vector.hh.
|
inline |
Get the current capacity of the vector, i.e. the maximum number of elements the vector can hold, before it has to reallocate.
Definition at line 906 of file BLI_vector.hh.
Referenced by blender::gpu::GLQueryPool::begin_query(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), and blender::Vector< T, InlineBufferCapacity, Allocator >::Vector().
|
inline |
Afterwards the vector has 0 elements, but will still have memory to be refilled again.
Definition at line 403 of file BLI_vector.hh.
References blender::destruct_n(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and UPDATE_VECTOR_SIZE.
Referenced by blender::deg::DepsgraphNodeBuilder::begin_build(), InstancesComponent::clear(), FloatBufferCache::clear(), blender::deg::Depsgraph::clear_id_nodes(), blender::deg::ComponentNode::clear_operations(), DRW_view_data_reset(), blender::bke::CurvesGeometry::evaluated_normals(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::draw::Texture::free(), blender::compositor::get_operation_dependencies(), blender::IndexMask::invert(), blender::io::obj::linked_sockets_to_dest_id(), blender::eevee::MaterialModule::material_array_get(), merge_uvs_for_vertex(), blender::gpu::GLSharedOrphanLists::orphans_clear(), and blender::Vector< T, InlineBufferCapacity, Allocator >::reinitialize().
|
inline |
Afterwards the vector has 0 elements and any allocated memory will be freed.
Definition at line 414 of file BLI_vector.hh.
References blender::destruct_n(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and UPDATE_VECTOR_SIZE.
Referenced by blender::io::obj::OBJMesh::clear().
|
inline |
Do a linear search to see of the value is in the vector. Return true when it exists, otherwise false.
Definition at line 837 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::first_index_of_try().
Referenced by CryptomatteSession::add_layer(), blender::Vector< T, InlineBufferCapacity, Allocator >::append_non_duplicates(), make_recursive_duplis(), blender::nodes::node_geo_curve_primitive_quadrilateral_cc::node_update(), and blender::tests::TEST().
|
inline |
Get access to the underlying array.
Definition at line 853 of file BLI_vector.hh.
Referenced by blender::fn::MFProcedureBuilder::add_call(), GPUCodegenCreateInfo::NameBuffer::append_sampler_name(), BKE_volume_grid_selection_surface(), BKE_volume_grid_wireframe(), blender::nodes::SeparateRGBAFunction::call(), blender::nodes::node_shader_sepcomb_xyz_cc::MF_SeparateXYZ::call(), DRW_view_data_enabled_engine_iter_begin(), extract_png_from_blend_file(), blender::nodes::node_geo_string_to_curves_cc::get_text_layout(), object_clear_transform_generic_exec(), blender::gpu::GLSharedOrphanLists::orphans_clear(), blender::eevee::SyncModule::sync_mesh(), blender::tests::TEST(), blender::ed::space_node::ui_node_menu_column(), view2d_major_step_x__time(), zlib_compress(), and blender::gpu::GLQueryPool::~GLQueryPool().
|
inline |
Get access to the underlying array.
Definition at line 861 of file BLI_vector.hh.
|
inline |
Definition at line 870 of file BLI_vector.hh.
Referenced by BLI_string_search_query(), blender::io::obj::OBJMesh::calc_poly_order(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::index_mask_ops::detail::find_indices_based_on_predicate__merge(), blender::compositor::get_operation_dependencies(), blender::nodes::geometry_nodes_eval_log::GFieldValueLog::GFieldValueLog(), blender::render::texturemargin::TextureMarginMap::grow_dijkstra(), internal_dependencies_panel_draw(), blender::ed::space_node::named_attribute_tooltip(), blender::nodes::node_geo_collection_info_cc::node_geo_exec(), blender::Vector< T, InlineBufferCapacity, Allocator >::rbegin(), blender::ed::space_node::snode_autoconnect(), blender::ed::space_node::sort_multi_input_socket_links(), blender::tests::TEST(), and test_sin_cos_from_fraction_symmetry().
|
inline |
Definition at line 879 of file BLI_vector.hh.
|
inline |
|
inline |
Definition at line 569 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::end(), blender::Vector< T, InlineBufferCapacity, Allocator >::insert(), and blender::Vector< T, InlineBufferCapacity, Allocator >::last().
|
inline |
Copy the elements of another array to the end of this vector.
This can be used to emulate parts of std::vector::insert.
Definition at line 530 of file BLI_vector.hh.
References blender::Span< T >::data(), and array< T, alignment >::size().
Referenced by BLI_string_search_query(), compute_geometry(), blender::fn::MFProcedureDotExport::create_nodes(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::bke::node_field_inferencing::gather_input_socket_dependencies(), blender::compositor::get_operation_dependencies(), blender::nodes::geometry_nodes_eval_log::GFieldValueLog::GFieldValueLog(), blender::gpu::GLShaderInterface::GLShaderInterface(), GPU_shader_create_from_info(), gpu_shader_create_info_compile_all(), blender::nodes::node_geo_curve_primitive_quadrilateral_cc::node_update(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), and blender::tests::TEST().
|
inline |
Adds all elements from the array that are not already in the vector. This is an expensive operation when the vector is large, but can be very cheap when it is known that the vector is small.
Definition at line 545 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_non_duplicates(), and T.
Referenced by GPUCodegen::generate_library(), and blender::tests::TEST().
|
inline |
Definition at line 560 of file BLI_vector.hh.
References BLI_assert, blender::uninitialized_copy_n(), and UPDATE_VECTOR_SIZE.
|
inline |
Extend the vector without bounds checking. It is assumed that enough memory has been reserved beforehand. Only use this in performance critical code.
Definition at line 556 of file BLI_vector.hh.
References blender::Span< T >::data(), and array< T, alignment >::size().
Referenced by blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), and merge_uvs_for_vertex().
|
inline |
Copies the given value to every element in the vector.
Definition at line 845 of file BLI_vector.hh.
References blender::initialized_fill_n(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::tests::TEST().
|
inline |
Definition at line 685 of file BLI_vector.hh.
References BLI_assert, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
|
inline |
Return a reference to the first element in the vector. This invokes undefined behavior when the vector is empty.
Definition at line 680 of file BLI_vector.hh.
References BLI_assert, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by CurveEval::assert_valid_point_attributes(), blender::fn::MFProcedureDotExport::create_nodes(), blender::Vector< T, InlineBufferCapacity, Allocator >::insert(), blender::ed::space_node::link_drag_search_exec_fn(), GeometrySet::modify_geometry_sets(), blender::ed::space_node::node_link_modal(), BezierSpline::segment_is_vector(), blender::bke::DynamicPointAttributeProvider::try_get_for_read(), and blender::bke::DynamicPointAttributeProvider::try_get_for_write().
|
inline |
Do a linear search to find the value in the vector and return the found index. This invokes undefined behavior when the value is not in the vector.
Definition at line 826 of file BLI_vector.hh.
References BLI_assert, and blender::Vector< T, InlineBufferCapacity, Allocator >::first_index_of_try().
Referenced by blender::Vector< T, InlineBufferCapacity, Allocator >::remove_first_occurrence_and_reorder(), and blender::tests::TEST().
|
inline |
Do a linear search to find the value in the vector. When found, return the first index, otherwise return -1.
Definition at line 812 of file BLI_vector.hh.
References T.
Referenced by blender::Vector< T, InlineBufferCapacity, Allocator >::contains(), DRW_view_data_free_unused(), blender::Vector< T, InlineBufferCapacity, Allocator >::first_index_of(), and blender::tests::TEST().
|
inlinenoexcept |
Enlarges the size of the internal buffer that is considered to be initialized. This invokes undefined behavior when the new size is larger than the capacity. The method can be useful when you want to call constructors in the vector yourself. This should only be done in very rare cases and has to be justified every time.
Definition at line 518 of file BLI_vector.hh.
References BLI_assert, and UPDATE_VECTOR_SIZE.
Referenced by blender::Vector< T, InlineBufferCapacity, Allocator >::append_n_times().
|
inline |
Get an index range that makes looping over all indices more convenient and less error prone. Obviously, this should only be used when you actually need the index in the loop.
Example: for (int64_t i : myvector.index_range()) { do_something(i, my_vector[i]); }
Definition at line 920 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by CurveEval::accumulated_spline_lengths(), BLI_string_search_query(), blender::eevee::Sampling::cdf_from_curvemapping(), blender::eevee::Sampling::cdf_invert(), CurveEval::control_point_offsets(), blender::bke::copy_with_removed_curves(), blender::bke::copy_with_removed_points(), blender::nodes::node_geo_string_to_curves_cc::create_attributes(), blender::nodes::node_geo_string_to_curves_cc::create_curve_instances(), blender::fn::MFProcedureDotExport::create_entry_node(), curve_eval_from_dna_curve(), blender::bke::curve_legacy_to_curves(), blender::geometry::edges_to_curve_point_indices(), blender::fn::evaluate_fields(), CurveEval::evaluated_point_offsets(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::execute_multi_function_node__value(), blender::IndexMask::extract_ranges_invert(), blender::index_mask_ops::detail::find_indices_based_on_predicate__merge(), blender::geometry::OrderedAttributes::index_range(), blender::fn::MFProcedureDotExport::instruction_to_string(), internal_dependencies_panel_draw(), blender::ed::space_node::named_attribute_tooltip(), blender::ed::space_node::node_draw_extra_info_panel(), blender::nodes::node_geo_string_join_cc::node_geo_exec(), object_transform_axis_target_modal(), blender::HashTableStats::print(), blender::gpu::Shader::print_log(), refresh_socket_list(), blender::ed::sculpt_paint::CombOperationExecutor::restore_segment_lengths(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), blender::nodes::search_link_ops_for_declarations(), blender::ed::sculpt_paint::select_grow::select_grow_invoke_per_curve(), blender::ed::space_node::sort_multi_input_socket_links(), and blender::eevee::SyncModule::sync_mesh().
|
inline |
Insert elements into the vector at the specified position. This has a running time of O(n) where n is the number of values that have to be moved. Undefined behavior is invoked when the insert position is out of bounds.
Definition at line 579 of file BLI_vector.hh.
Referenced by blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::Vector< T, InlineBufferCapacity, Allocator >::insert(), blender::Vector< T, InlineBufferCapacity, Allocator >::prepend(), and blender::tests::TEST().
|
inline |
Definition at line 597 of file BLI_vector.hh.
References BLI_assert, blender::destruct_n(), blender::math::distance(), blender::Vector< T, InlineBufferCapacity, Allocator >::first(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), T, blender::uninitialized_copy_n(), and UPDATE_VECTOR_SIZE.
|
inline |
Definition at line 588 of file BLI_vector.hh.
References array< T, alignment >::begin(), array< T, alignment >::end(), and blender::Vector< T, InlineBufferCapacity, Allocator >::insert().
|
inline |
Definition at line 583 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::insert().
|
inline |
|
inline |
Returns true when the vector contains no elements, otherwise false.
This is the same as std::vector::empty.
Definition at line 706 of file BLI_vector.hh.
Referenced by blender::compositor::NodeOperationBuilder::add_output_buffers(), blender::fn::combine_field_inputs(), blender::io::obj::CurveFromGeometry::create_curve(), blender::io::obj::create_geometry(), blender::deg::deg_debug_graphviz_node(), blender::deg::deg_graph_remove_unused_noops(), duplicate_exec(), ED_spreadsheet_context_path_exists(), ED_spreadsheet_context_path_is_active(), blender::nodes::node_geo_edge_paths_to_curves_cc::edge_paths_to_curves_convert(), blender::fn::evaluate_fields(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::index_mask_ops::detail::find_indices_based_on_predicate__merge(), blender::nodes::geometry_nodes_eval_log::ModifierLog::find_tree_by_node_editor_context(), blender::ed::space_node::viewer_linking::get_existing_viewer(), OutlinerLibOverrideData::id_root_set(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::initialize_node_state(), blender::geometry::interpolate_position_with_interpolation(), blender::deg::BuilderStack::is_empty(), blender::deg::is_unused_noop(), blender::ed::space_node::link_drag_search_exec_fn(), merge_uvs_for_vertex(), blender::draw::mesh_buffer_cache_create_requested(), blender::draw::mesh_buffer_cache_create_requested_subdiv(), object_clear_transform_generic_exec(), blender::gpu::GLSharedOrphanLists::orphans_clear(), blender::Vector< T, InlineBufferCapacity, Allocator >::pop_last(), blender::gpu::Shader::print_log(), blender::bke::MutableAttributeAccessor::remove_anonymous(), blender::Vector< T, InlineBufferCapacity, Allocator >::remove_last(), blender::string_search::score_query_against_words(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::set_input_required(), blender::ed::spreadsheet::spreadsheet_context_update_tag(), blender::ed::spreadsheet::spreadsheet_filter_rows(), blender::tests::TEST(), blender::io::obj::write_mesh_objects(), blender::gpu::GLContext::~GLContext(), and blender::deg::BuilderStack::ScopedEntry::~ScopedEntry().
|
inline |
Definition at line 669 of file BLI_vector.hh.
References BLI_assert, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
|
inline |
Return a reference to the nth last element. This invokes undefined behavior when the vector is too short.
Definition at line 663 of file BLI_vector.hh.
References BLI_assert, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::eevee::Sampling::cdf_from_curvemapping(), blender::fn::MFProcedureDotExport::create_nodes(), blender::nodes::node_geo_edge_paths_to_curves_cc::edge_paths_to_curves_convert(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::index_mask_ops::detail::find_indices_based_on_predicate__merge(), find_sockets_to_preview_for_spreadsheet(), blender::Vector< T, InlineBufferCapacity, Allocator >::insert(), object_transform_axis_target_invoke(), blender::Vector< T, InlineBufferCapacity, Allocator >::prepend(), blender::gpu::Shader::print_log(), BezierSpline::segment_is_vector(), blender::tests::TEST(), blender::bke::DynamicPointAttributeProvider::try_get_for_read(), and blender::bke::DynamicPointAttributeProvider::try_get_for_write().
|
inline |
Definition at line 308 of file BLI_vector.hh.
|
inline |
Definition at line 320 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::size().
|
inline |
Definition at line 303 of file BLI_vector.hh.
|
inline |
Definition at line 314 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::size().
|
inline |
Definition at line 275 of file BLI_vector.hh.
References blender::copy_assign_container().
|
inline |
Definition at line 280 of file BLI_vector.hh.
References blender::move_assign_container().
|
inline |
Definition at line 296 of file BLI_vector.hh.
References BLI_assert, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
|
inline |
Get the value at the given index. This invokes undefined behavior when the index is out of bounds.
Definition at line 289 of file BLI_vector.hh.
References BLI_assert, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
|
inline |
Remove the last element from the vector and return it. This invokes undefined behavior when the vector is empty.
This is similar to std::vector::pop_back.
Definition at line 729 of file BLI_vector.hh.
References BLI_assert, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), T, and UPDATE_VECTOR_SIZE.
Referenced by blender::geometry::create_nurbs_to_bezier_handles(), GPU_debug_group_end(), blender::render::texturemargin::TextureMarginMap::grow_dijkstra(), blender::bke::MutableAttributeAccessor::remove_anonymous(), blender::tests::TEST(), and blender::deg::BuilderStack::ScopedEntry::~ScopedEntry().
|
inline |
Insert values at the beginning of the vector. The has to move all the other elements, so it has a linear running time.
Definition at line 642 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::insert().
Referenced by blender::tests::TEST().
|
inline |
Definition at line 654 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::insert(), and blender::Vector< T, InlineBufferCapacity, Allocator >::last().
|
inline |
Definition at line 650 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::insert().
|
inline |
Definition at line 646 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::insert().
|
inline |
Print some debug information about the vector.
Definition at line 938 of file BLI_vector.hh.
References BLI_str_format_byte_unit(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
|
inline |
Definition at line 884 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::end().
Referenced by blender::tests::TEST().
|
inline |
Definition at line 893 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::end().
|
inline |
Reset the size of the vector so that it contains new_size elements. All existing elements are destructed, and not copied if the data must be reallocated.
Definition at line 393 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), and blender::Vector< T, InlineBufferCapacity, Allocator >::resize().
|
inline |
Remove the element at the given index and move all values coming after it one towards the front. This takes O(n) time. If the order is not important, remove_and_reorder should be used instead.
This is similar to std::vector::erase.
Definition at line 774 of file BLI_vector.hh.
References BLI_assert, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and UPDATE_VECTOR_SIZE.
Referenced by blender::tests::TEST().
|
inline |
Remove a contiguous chunk of elements and move all values coming after it towards the front. This takes O(n) time.
This is similar to std::vector::erase.
Definition at line 793 of file BLI_vector.hh.
References BLI_assert, blender::destruct_n(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and UPDATE_VECTOR_SIZE.
|
inline |
Delete any element in the vector. The empty space will be filled by the previously last element. This takes O(1) time.
Definition at line 743 of file BLI_vector.hh.
References BLI_assert, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), T, and UPDATE_VECTOR_SIZE.
Referenced by blender::nodes::node_geo_distribute_points_on_faces_cc::eliminate_points_based_on_mask(), refresh_socket_list(), blender::Vector< T, InlineBufferCapacity, Allocator >::remove_first_occurrence_and_reorder(), CurveEval::remove_splines(), FloatBufferCache::remove_unused_buffers(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), and blender::tests::TEST().
|
inline |
Finds the first occurrence of the value, removes it and copies the last element to the hole in the vector. This takes O(n) time.
Definition at line 761 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::first_index_of(), and blender::Vector< T, InlineBufferCapacity, Allocator >::remove_and_reorder().
Referenced by blender::tests::TEST(), and blender::deg::Relation::unlink().
|
inline |
Destructs the last element and decreases the size by one. This invokes undefined behavior when the vector is empty.
Definition at line 715 of file BLI_vector.hh.
References BLI_assert, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), and UPDATE_VECTOR_SIZE.
Referenced by blender::nodes::node_geo_string_to_curves_cc::get_text_layout(), make_recursive_duplis(), and blender::tests::TEST().
|
inline |
Definition at line 888 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::begin().
Referenced by blender::tests::TEST().
|
inline |
Definition at line 897 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::begin().
|
inline |
Make sure that enough memory is allocated to hold min_capacity elements. This won't necessarily make an allocation when min_capacity is small. The actual size of the vector does not change.
Definition at line 340 of file BLI_vector.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::capacity().
Referenced by blender::Vector< T, InlineBufferCapacity, Allocator >::append_n_times(), BKE_mesh_merge_customdata_for_apply_modifier(), blendthumb_create_png_data_from_thumb(), BMeshFairingContext::BMeshFairingContext(), blender::nodes::node_geo_raycast_cc::RaycastFunction::call(), compute_interpolated_polygons(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_mesh_data_from_poly_selection(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_mesh_data_from_poly_selection_edge_face(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_polygons_from_edge_selection(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_polygons_from_poly_selection(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_polygons_from_vertex_selection(), computed_masked_polygons(), DRW_view_data_create(), blender::geometry::edges_to_curve_point_indices(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::deg::ComponentNode::finalize_build(), blender::index_mask_ops::detail::find_indices_based_on_predicate__merge(), blender::bke::pbvh::pixels::find_nodes_to_update(), blender::io::obj::fixup_invalid_polygon(), blender::io::obj::geometry_to_blender_objects(), blender::Vector< T, InlineBufferCapacity, Allocator >::insert(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::log_socket_value(), merge_uvs_for_vertex(), MeshFairingContext::MeshFairingContext(), blender::nodes::node_geo_collection_info_cc::node_geo_exec(), blender::nodes::node_geo_scale_elements_cc::prepare_edge_islands(), blender::nodes::node_geo_scale_elements_cc::prepare_face_islands(), InstancesComponent::reserve(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::compositor::NodeOperationBuilder::sort_operations(), blender::ed::spreadsheet::spreadsheet_filter_rows(), blender::tests::TEST(), test_sin_cos_from_fraction_symmetry(), blender::bke::DynamicPointAttributeProvider::try_get_for_read(), blender::bke::DynamicPointAttributeProvider::try_get_for_write(), UniformVertexWeight::UniformVertexWeight(), VoronoiVertexWeight::VoronoiVertexWeight(), blender::geometry::weld_edge_ctx_alloc(), blender::geometry::weld_poly_loop_ctx_alloc(), blender::geometry::weld_vert_ctx_alloc_and_setup(), and blender::io::obj::write_mesh_objects().
|
inline |
Change the size of the vector so that it contains new_size elements. If new_size is smaller than the old size, the elements at the end of the vector are destructed. If new_size is larger than the old size, the new elements at the end are default constructed. If T is trivially constructible, the memory is not touched by this function.
Definition at line 353 of file BLI_vector.hh.
References BLI_assert, blender::default_construct_n(), blender::destruct_n(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and UPDATE_VECTOR_SIZE.
Referenced by blender::io::obj::MTLWriter::add_materials(), blender::gpu::GLQueryPool::begin_query(), blender::io::obj::OBJMesh::calc_poly_order(), NURBSpline::calculate_basis_cache(), blender::bke::curves::nurbs::calculate_basis_cache(), NURBSpline::calculate_knots(), BezierSpline::control_point_offsets(), Spline::evaluated_lengths(), BezierSpline::evaluated_mappings(), blender::bke::CurvesGeometry::evaluated_normals(), blender::fn::execute_call_instruction(), blender::index_mask_ops::detail::find_indices_based_on_predicate__merge(), blender::nodes::node_geo_string_to_curves_cc::get_text_layout(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::initialize_node_state(), blender::io::obj::linked_sockets_to_dest_id(), merge_uvs_for_vertex(), mesh_init_origspace(), blender::Vector< T, InlineBufferCapacity, Allocator >::reinitialize(), InstancesComponent::resize(), CurveEval::resize(), BezierSpline::resize(), NURBSpline::resize(), PolySpline::resize(), blender::IndexMask::slice_and_offset(), blender::tests::TEST(), blender::render::texturemargin::TextureMarginMap::TextureMarginMap(), blender::io::obj::OBJWriter::write_poly_elements(), and zlib_compress().
|
inline |
Change the size of the vector so that it contains new_size elements. If new_size is smaller than the old size, the elements at the end of the vector are destructed. If new_size is larger than the old size, the new elements will be copy constructed from the given value.
Definition at line 374 of file BLI_vector.hh.
References BLI_assert, blender::destruct_n(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::uninitialized_fill_n(), and UPDATE_VECTOR_SIZE.
|
inline |
Return how many values are currently stored in the vector.
Definition at line 694 of file BLI_vector.hh.
References BLI_assert.
Referenced by CurveEval::accumulated_spline_lengths(), blender::fn::MFProcedureBuilder::add_call(), blender::geometry::add_curves_on_mesh(), blender::nodes::node_geo_dual_mesh_cc::add_edge(), blender::io::obj::MTLWriter::add_materials(), VolumeUniformBufPool::alloc(), blender::Vector< T, InlineBufferCapacity, Allocator >::append_and_get_index_as(), blender::Vector< T, InlineBufferCapacity, Allocator >::append_n_times(), GPUCodegenCreateInfo::NameBuffer::append_sampler_name(), CurveEval::assert_valid_point_attributes(), asset_operation_get_id_vec_stats_from_context(), blender::gpu::GLQueryPool::begin_query(), BKE_volume_grid_selection_surface(), BKE_volume_grid_wireframe(), BLI_string_search_query(), blender::nodes::SeparateRGBAFunction::call(), blender::nodes::node_shader_sepcomb_xyz_cc::MF_SeparateXYZ::call(), blender::eevee::Sampling::cdf_from_curvemapping(), blender::eevee::Sampling::cdf_invert(), blender::nodes::node_geo_curve_fill_cc::cdt_to_mesh(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear_and_make_inline(), compute_interpolated_polygons(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_mesh_data_from_poly_selection(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_mesh_data_from_poly_selection_edge_face(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_polygons_from_edge_selection(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_polygons_from_poly_selection(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_polygons_from_vertex_selection(), computed_masked_polygons(), CurveEval::control_point_offsets(), blender::bke::copy_with_removed_points(), blender::compositor::CryptomatteNode::create_cryptomatte_operation(), blender::fn::MFProcedureDotExport::create_entry_node(), blender::io::obj::MeshFromGeometry::create_mesh(), curve_eval_from_dna_curve(), blender::bke::curve_legacy_to_curves(), CustomData_blend_write_prepare(), DEG_debug_compare(), DEG_debug_consistency_check(), DEG_iterator_ids_begin(), DEG_iterator_objects_begin(), DEG_stats_simple(), blender::nodes::node_geo_dual_mesh_cc::dissolve_redundant_verts(), DRW_view_data_enabled_engine_iter_begin(), ED_spreadsheet_context_path_exists(), ED_spreadsheet_context_path_is_active(), blender::nodes::node_geo_edge_paths_to_curves_cc::edge_paths_to_curves_convert(), blender::geometry::edges_to_curve_point_indices(), blender::eevee::VelocityModule::end_sync(), blender::draw::Texture::ensure_layer_views(), blender::draw::Texture::ensure_mip_views(), CurveEval::evaluated_point_offsets(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), extract_png_from_blend_file(), blender::Vector< T, InlineBufferCapacity, Allocator >::fill(), blender::index_mask_ops::detail::find_indices_based_on_predicate__merge(), blender::nodes::geometry_nodes_eval_log::ModifierLog::find_node_by_spreadsheet_editor_context(), find_sockets_to_preview_for_spreadsheet(), blender::Vector< T, InlineBufferCapacity, Allocator >::first(), blender::compositor::ConstantFolder::fold_operations(), blender::deg::ComponentNode::get_entry_operation(), blender::deg::ComponentNode::get_exit_operation(), blender::compositor::BuffersIteratorBuilder< T >::Iterator::get_num_inputs(), blender::compositor::NodeOperation::get_number_of_input_sockets(), blender::compositor::NodeOperation::get_number_of_output_sockets(), blender::compositor::get_operation_dependencies(), blender::nodes::node_geo_string_to_curves_cc::get_text_layout(), GPU_debug_get_groups_names(), GPU_debug_group_begin(), group_verify_socket_list(), blender::render::texturemargin::TextureMarginMap::grow_dijkstra(), blender::HashTableStats::HashTableStats(), blender::compositor::BuffersIteratorBuilder< T >::Iterator::in(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::initialize_node_state(), blender::Vector< T, InlineBufferCapacity, Allocator >::insert(), blender::fn::MFProcedureDotExport::instruction_to_string(), blender::bke::curves::nurbs::interpolate_to_evaluated(), blender::nodes::node_geo_join_geometry_cc::join_component_type(), NURBSpline::knots(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::ed::space_node::link_drag_search_exec_fn(), merge_uvs_for_vertex(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), blender::modifiers::geometry_nodes::MultiInputValue::missing_values(), GeometrySet::modify_geometry_sets(), blender::ed::space_node::node_draw_extra_info_panel(), blender::nodes::node_geo_collection_info_cc::node_geo_exec(), blender::nodes::node_geo_string_join_cc::node_geo_exec(), object_clear_transform_generic_exec(), object_transform_axis_target_modal(), blender::Vector< blender::bke::AttributeKind >::operator MutableSpan< blender::bke::AttributeKind >(), blender::Vector< T, InlineBufferCapacity, Allocator >::operator MutableSpan< U >(), blender::Vector< blender::bke::AttributeKind >::operator Span< blender::bke::AttributeKind >(), blender::Vector< T, InlineBufferCapacity, Allocator >::operator Span< U >(), blender::Vector< T, InlineBufferCapacity, Allocator >::operator[](), blender::gpu::GLSharedOrphanLists::orphans_clear(), blender::nodes::node_geo_scale_elements_cc::prepare_edge_islands(), blender::nodes::node_geo_scale_elements_cc::prepare_face_islands(), blender::gpu::Shader::print_log(), blender::Vector< T, InlineBufferCapacity, Allocator >::print_stats(), blender::io::obj::OBJMesh::remap_poly_index(), blender::Vector< T, InlineBufferCapacity, Allocator >::remove(), blender::Vector< T, InlineBufferCapacity, Allocator >::remove_and_reorder(), FloatBufferCache::remove_unused_buffers(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::ed::sculpt_paint::AddOperationExecutor::sample_projected(), blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical(), blender::bke::mesh_surface_sample::sample_surface_points_spherical(), blender::string_search::score_query_against_words(), blender::ed::sculpt_paint::select_grow::select_grow_invoke_per_curve(), blender::geometry::OrderedAttributes::size(), BezierSpline::size(), NURBSpline::size(), PolySpline::size(), blender::ed::spreadsheet::spreadsheet_context_update_tag(), blender::ed::spreadsheet::spreadsheet_filter_rows(), standard_defines(), blender::eevee::SyncModule::sync_mesh(), blender::bke::tests::TEST(), blender::tests::TEST(), blender::string_search::tests::TEST(), blender::bke::idprop::tests::test_array_to_value(), blender::bke::idprop::tests::test_idprop(), blender::bke::DynamicPointAttributeProvider::try_get_for_read(), blender::bke::DynamicPointAttributeProvider::try_get_for_write(), blender::ed::space_node::ui_node_menu_column(), blender::bke::pbvh::pixels::update_pixels(), blender::Vector< T, InlineBufferCapacity, Allocator >::Vector(), view2d_major_step_x__time(), blender::geometry::weld_mesh_context_create(), blender::geometry::weld_poly_loop_ctx_alloc(), blender::io::obj::OBJWriter::write_poly_normals(), blender::io::obj::OBJWriter::write_uv_coords(), blender::gpu::GLQueryPool::~GLQueryPool(), blender::ResourceScope::~ResourceScope(), and blender::Vector< T, InlineBufferCapacity, Allocator >::~Vector().
|
friend |
Definition at line 930 of file BLI_vector.hh.
|
friend |
Definition at line 925 of file BLI_vector.hh.
|
friend |
Be a friend with other vector instantiations. This is necessary to implement some memory management logic.
Definition at line 110 of file BLI_vector.hh.