Blender
V3.3
|
#include <BLI_span.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 = const T * |
using | size_type = int64_t |
Public Member Functions | |
constexpr | Span ()=default |
constexpr | Span (const T *start, int64_t size) |
template<typename U , BLI_ENABLE_IF((is_span_convertible_pointer_v< U, T >)) > | |
constexpr | Span (const U *start, int64_t size) |
constexpr | Span (const std::initializer_list< T > &list) |
constexpr | Span (const std::vector< T > &vector) |
template<std::size_t N> | |
constexpr | Span (const std::array< T, N > &array) |
template<typename U , BLI_ENABLE_IF((is_span_convertible_pointer_v< U, T >)) > | |
constexpr | Span (Span< U > span) |
constexpr Span | slice (int64_t start, int64_t size) const |
constexpr Span | slice (IndexRange range) const |
constexpr Span | drop_front (int64_t n) const |
constexpr Span | drop_back (int64_t n) const |
constexpr Span | take_front (int64_t n) const |
constexpr Span | take_back (int64_t n) const |
constexpr const T * | data () const |
constexpr const T * | begin () const |
constexpr const T * | end () const |
constexpr std::reverse_iterator< const T * > | rbegin () const |
constexpr std::reverse_iterator< const T * > | rend () const |
constexpr const T & | operator[] (int64_t index) const |
constexpr int64_t | size () const |
constexpr bool | is_empty () const |
constexpr int64_t | size_in_bytes () const |
constexpr bool | contains (const T &value) const |
constexpr bool | contains_ptr (const T *ptr) const |
constexpr int64_t | count (const T &value) const |
constexpr const T & | first () const |
constexpr const T & | last (const int64_t n=0) const |
constexpr T | get (int64_t index, const T &fallback) const |
constexpr bool | has_duplicates__linear_search () const |
constexpr bool | intersects__linear_search (Span other) const |
constexpr int64_t | first_index (const T &search_value) const |
constexpr int64_t | first_index_try (const T &search_value) const |
constexpr IndexRange | index_range () const |
template<typename NewT > | |
constexpr Span< NewT > | cast () const |
template<typename PrintLineF > | |
void | print_as_lines (std::string name, PrintLineF print_line) const |
void | print_as_lines (std::string name) const |
Protected Attributes | |
const T * | data_ = nullptr |
int64_t | size_ = 0 |
Friends | |
bool | operator== (const Span< T > a, const Span< T > b) |
bool | operator!= (const Span< T > a, const Span< T > b) |
References an array of type T that is owned by someone else. The data in the array cannot be modified.
Definition at line 73 of file BLI_span.hh.
using blender::Span< T >::const_pointer = const T * |
Definition at line 77 of file BLI_span.hh.
using blender::Span< T >::const_reference = const T & |
Definition at line 79 of file BLI_span.hh.
using blender::Span< T >::iterator = const T * |
Definition at line 80 of file BLI_span.hh.
using blender::Span< T >::pointer = T * |
Definition at line 76 of file BLI_span.hh.
using blender::Span< T >::reference = T & |
Definition at line 78 of file BLI_span.hh.
using blender::Span< T >::size_type = int64_t |
Definition at line 81 of file BLI_span.hh.
using blender::Span< T >::value_type = T |
Definition at line 75 of file BLI_span.hh.
|
constexprdefault |
Create a reference to an empty array.
Referenced by blender::Span< T >::drop_back(), blender::Span< T >::drop_front(), blender::Span< T >::slice(), blender::Span< T >::take_back(), and blender::Span< T >::take_front().
|
inlineconstexpr |
Definition at line 93 of file BLI_span.hh.
References BLI_assert, and blender::Span< T >::size().
|
inlineconstexpr |
Definition at line 99 of file BLI_span.hh.
References BLI_assert, and blender::Span< T >::size().
|
inlineconstexpr |
Reference an initializer_list. Note that the data in the initializer_list is only valid until the expression containing it is fully computed.
Do: call_function_with_array({1, 2, 3, 4});
Don't: Span<int> span = {1, 2, 3, 4}; call_function_with_array(span);
Definition at line 115 of file BLI_span.hh.
|
inlineconstexpr |
Definition at line 120 of file BLI_span.hh.
|
inlineconstexpr |
Definition at line 125 of file BLI_span.hh.
|
inlineconstexpr |
Support implicit conversions like the one below: Span<T *> -> Span<const T *>
Definition at line 134 of file BLI_span.hh.
|
inlineconstexpr |
Definition at line 208 of file BLI_span.hh.
References blender::Span< T >::data_.
Referenced by blender::IndexMask::begin(), blender::Span< T >::contains_ptr(), blender::nodes::node_geo_curve_trim_cc::lookup_control_point_position(), Spline::lookup_evaluated_length(), blender::bke::lookup_point_indices(), blender::Span< T >::rend(), blender::length_parameterize::sample_at_length(), blender::length_parameterize::sample_at_lengths(), blender::length_parameterize::sample_uniform(), blender::ed::sculpt_paint::select_grow::select_grow_update(), and blender::tests::TEST().
|
inlineconstexpr |
Returns a new Span to the same underlying memory buffer. No conversions are done.
Definition at line 409 of file BLI_span.hh.
References BLI_assert, blender::Span< T >::data_, blender::Span< T >::size_, and T.
Referenced by blender::tests::TEST().
|
inlineconstexpr |
Does a linear search to see of the value is in the array. Returns true if it is, otherwise false.
Definition at line 265 of file BLI_span.hh.
Referenced by blender::fn::build_multi_function_procedure_for_fields(), blender::nodes::GeoNodeExecParams::check_input_geometry_set(), blender::nodes::node_geo_delete_geometry_cc::copy_attributes(), copy_attributes_between_components(), blender::nodes::node_geo_join_geometry_cc::get_final_attribute_info(), blender::Span< T >::intersects__linear_search(), GeometrySet::keep_only(), and blender::tests::TEST().
|
inlineconstexpr |
Does a constant time check to see if the pointer points to a value in the referenced array. Return true if it is, otherwise false.
Definition at line 279 of file BLI_span.hh.
References blender::Span< T >::begin(), blender::Span< T >::end(), and ptr.
Referenced by blender::tests::TEST().
|
inlineconstexpr |
Does a linear search to count how often the value is in the array. Returns the number of occurrences.
Definition at line 288 of file BLI_span.hh.
References counter, element, and T.
Referenced by blender::tests::TEST().
|
inlineconstexpr |
Returns the pointer to the beginning of the referenced array. This may be nullptr when the size is zero.
Definition at line 203 of file BLI_span.hh.
References blender::Span< T >::data_.
Referenced by blender::MutableSpan< T >::copy_from(), blender::bke::idprop::create_array(), CustomData_blend_write(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::VectorAdaptor< T >::extend(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend_unchecked(), blender::VArray< T >::ForDerivedSpan(), get_dupliface_transform_from_coords(), blender::gpu::Shader::print_log(), blender::Stack< T, InlineBufferCapacity, Allocator >::push_multiple(), blender::io::obj::set_property_of_socket(), blender::bke::tests::TEST(), blender::tests::TEST(), blender::gpu::GLShader::transform_feedback_names_set(), blender::bke::BuiltinPointAttributeProvider< T >::try_get_for_read(), blender::bke::DynamicPointAttributeProvider::try_get_for_read(), and blender::VArray< T >::VArray().
|
inlineconstexpr |
Returns a new Span with n elements removed from the beginning. This invokes undefined behavior when n is negative.
Definition at line 170 of file BLI_span.hh.
References BLI_assert, blender::Span< T >::data_, blender::Span< T >::size_, and blender::Span< T >::Span().
Referenced by compute_geometry(), blender::nodes::geometry_nodes_eval_log::ModifierLog::find_node_by_spreadsheet_editor_context(), and blender::tests::TEST().
|
inlineconstexpr |
Returns a new Span with n elements removed from the beginning. This invokes undefined behavior when n is negative.
Definition at line 159 of file BLI_span.hh.
References BLI_assert, blender::Span< T >::data_, blender::Span< T >::size_, and blender::Span< T >::Span().
Referenced by blender::fn::MFProcedureBuilder::add_call(), compute_geometry(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::forward_to_sockets_with_same_type(), blender::InplacePriorityQueue< T, FirstHasHigherPriority >::inactive_indices(), blender::Stack< T, InlineBufferCapacity, Allocator >::push_multiple(), and blender::tests::TEST().
|
inlineconstexpr |
Definition at line 212 of file BLI_span.hh.
References blender::Span< T >::data_, and blender::Span< T >::size_.
Referenced by blender::Span< T >::contains_ptr(), blender::IndexMask::end(), blender::nodes::node_geo_curve_trim_cc::lookup_control_point_position(), Spline::lookup_evaluated_length(), blender::bke::lookup_point_indices(), blender::Span< T >::rbegin(), blender::length_parameterize::sample_at_length(), blender::length_parameterize::sample_at_lengths(), blender::length_parameterize::sample_uniform(), and blender::ed::sculpt_paint::select_grow::select_grow_update().
|
inlineconstexpr |
Return a reference to the first element in the array. This invokes undefined behavior when the array is empty.
Definition at line 303 of file BLI_span.hh.
References BLI_assert, blender::Span< T >::data_, and blender::Span< T >::size_.
Referenced by blender::length_parameterize::accumulate_lengths(), blender::fn::MFProcedureBuilder::add_call(), blender::IndexMask::as_range(), blender::geometry::calculate_angles(), blender::bke::curves::bezier::calculate_auto_handles(), blender::bke::curves::bezier::calculate_evaluated_positions(), blender::geometry::catmull_rom_to_bezier_handles(), blender::IndexMask::contained_in(), blender::geometry::execute_realize_curve_tasks(), blender::geometry::execute_realize_mesh_tasks(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_edges(), blender::bke::fill_mesh_positions(), blender::ed::curves::convert_to_particle_system::find_mface_for_root_position(), blender::IndexMask::indices_are_valid_index_mask(), blender::bke::curves::bezier::interpolate_to_evaluated(), blender::IndexMask::is_range(), blender::bke::curves::bezier::last_cyclic_segment_is_vector(), blender::geometry::limit_radii(), blender::io::obj::linked_sockets_to_dest_id(), blender::bounds::min_max(), blender::bounds::min_max_with_radii(), blender::nodes::NodeTreeRef::NodeTreeRef(), blender::tests::TEST(), and blender::length_parameterize::tests::test_uniform_lengths().
|
inlineconstexpr |
Returns the index of the first occurrence of the given value. This invokes undefined behavior when the value is not in the array.
Definition at line 377 of file BLI_span.hh.
References BLI_assert, and blender::Span< T >::first_index_try().
Referenced by blender::tests::TEST().
|
inlineconstexpr |
Returns the index of the first occurrence of the given value or -1 if it does not exist.
Definition at line 387 of file BLI_span.hh.
References blender::Span< T >::data_, and blender::Span< T >::size_.
Referenced by blender::Span< T >::first_index().
|
inlineconstexpr |
Returns the element at the given index. If the index is out of range, return the fallback value.
Definition at line 324 of file BLI_span.hh.
References blender::Span< T >::data_.
Referenced by compute_vertex_mask__armature_mode(), and blender::tests::TEST().
|
inlineconstexpr |
Check if the array contains duplicates. Does a linear search for every element. So the total running time is O(n^2). Only use this for small arrays.
Definition at line 336 of file BLI_span.hh.
References BLI_assert, blender::Span< T >::data_, blender::Span< T >::size_, and T.
|
inlineconstexpr |
Utility to make it more convenient to iterate over all indices that can be used with this array.
Definition at line 401 of file BLI_span.hh.
References blender::Span< T >::size_.
Referenced by blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), add_interpolated_polys_to_new_mesh(), attribute_search_update_fn(), blender::geometry::bezier_positions_to_nurbs(), bm_face_create_from_mpoly(), blender::geometry::calculate_angles(), blender::geometry::calculate_bezier_handles_bezier_mode(), blender::geometry::calculate_bezier_handles_poly_mode(), blender::geometry::calculate_fillet_positions(), blender::nodes::calculate_uvs(), blender::geometry::catmull_rom_to_bezier_handles(), blender::nodes::node_geo_distribute_points_on_faces_cc::compute_attribute_outputs(), compute_interpolated_polygons(), blender::nodes::node_geo_delete_geometry_cc::copy_data_based_on_map(), blender::bke::copy_indices_to_offset_ranges(), blender::nodes::node_geo_delete_geometry_cc::copy_masked_polys_to_new_mesh(), copy_masked_vertices_to_new_mesh(), blender::nodes::node_geo_delete_geometry_cc::copy_masked_vertices_to_new_mesh(), blender::bke::curves::copy_point_data(), blender::nodes::node_geo_input_mesh_edge_angle_cc::create_edge_map(), blender::ed::space_node::create_inspection_string_for_gfield(), blender::nodes::node_geo_extrude_mesh_cc::create_vert_to_edge_map(), curves_batch_cache_fill_segments_proc_pos(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_byte_color(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_float_vector(), ED_spreadsheet_context_path_exists(), blender::fn::evaluate_fields(), blender::ed::sculpt_paint::ShrinkCurvesEffect::execute(), blender::ed::sculpt_paint::ScaleCurvesEffect::execute(), 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::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::bke::curves::fill_curve_counts(), blender::fn::find_varying_fields(), blender::geometry::gather_realize_tasks_for_instances(), generate_unique_instance_ids(), blender::string_search::get_shortest_word_index_that_startswith(), blender::nodes::node_geo_input_mesh_face_is_planar_cc::PlanarFieldInput::get_varray_for_context(), blender::string_search::get_word_index_that_fuzzy_matches(), blender::IndexMask::index_range(), blender::bke::curves::nurbs::interpolate_to_evaluated(), interpolate_to_evaluated_impl(), blender::bke::curves::nurbs::interpolate_to_evaluated_rational(), blender::nodes::node_geo_join_geometry_cc::join_components(), make_duplis_geometry_set_impl(), blender::bke::VArray_For_SplineToPoint< T >::materialize(), blender::bke::VArray_For_SplineToPoint< T >::materialize_to_uninitialized(), blender::nodes::node_geo_extrude_mesh_cc::mesh_calculate_polys_of_edge(), blender::bounds::min_max(), blender::bounds::min_max_with_radii(), blender::ed::space_node::node_draw_nodetree(), blender::ed::space_node::node_uiblocks_init(), blender::ed::space_node::node_update_nodetree(), blender::ed::sculpt_paint::PinchOperationExecutor::restore_segment_lengths(), blender::geometry::retrieve_attribute_spans(), blender::geometry::ReverseUVSampler::ReverseUVSampler(), blender::geometry::ReverseUVSampler::sample_many(), blender::nodes::node_geo_scale_elements_cc::scale_vertex_islands_on_axis(), blender::nodes::node_geo_scale_elements_cc::scale_vertex_islands_uniformly(), blender::string_search::score_query_against_words(), blender::nodes::search_link_ops_for_declarations(), blender::bke::curves::bezier::segment_is_vector(), selected_indices_from_vertex_group(), selection_array_from_vertex_group(), blender::fn::MFCallInstruction::set_params(), blender::ed::sculpt_paint::SlideOperationExecutor::slide(), blender::geometry::subdivide_bezier_positions(), blender::ui::template_breadcrumbs(), blender::bke::tests::TEST(), blender::length_parameterize::tests::test_uniform_lengths(), blender::nodes::node_geo_duplicate_elements_cc::threaded_mapped_copy(), blender::nodes::node_geo_distribute_points_on_faces_cc::update_elimination_mask_based_on_density_factors(), blender::geometry::weld_edge_ctx_alloc(), blender::geometry::weld_poly_loop_ctx_alloc(), blender::geometry::weld_vert_ctx_alloc_and_setup(), and blender::geometry::weld_vert_groups_setup().
|
inlineconstexpr |
Returns true when this and the other array have an element in common. This should only be called on small arrays, because it has a running time of O(n*m) where n and m are the sizes of the arrays.
Definition at line 358 of file BLI_span.hh.
References BLI_assert, blender::Span< T >::contains(), blender::Span< T >::data_, blender::Span< T >::size_, and T.
|
inlineconstexpr |
Returns true if the size is zero.
Definition at line 248 of file BLI_span.hh.
References blender::Span< T >::size_.
Referenced by blender::fn::MFProcedureBuilder::add_call(), calculate_weld(), blender::nodes::GeoNodeExecParams::check_input_geometry_set(), compute_geometry(), blender::IndexMask::contained_in(), blender::compositor::NodeOperationBuilder::convert_to_operations(), blender::ed::space_node::create_inspection_string_for_geometry(), blender::ed::space_node::create_inspection_string_for_gfield(), blender::geometry::create_result_ids(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_float_vector(), ED_spreadsheet_context_path_exists(), ED_spreadsheet_context_path_is_active(), blender::fn::evaluate_fields(), blender::bke::CurvesGeometry::evaluated_length_total_for_curve(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::fn::materialize_detail::execute_materialized(), blender::geometry::execute_realize_curve_task(), blender::geometry::execute_realize_curve_tasks(), blender::geometry::execute_realize_mesh_tasks(), blender::geometry::execute_realize_pointcloud_tasks(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::forward_to_sockets_with_same_type(), blender::geometry::gather_realize_tasks_for_instances(), blender::IndexMask::indices_are_valid_index_mask(), blender::IndexMask::invert(), blender::IndexMask::is_empty(), Spline::length(), blender::geometry::mesh_merge_by_distance_connected(), blender::bounds::min_max(), blender::bounds::min_max_with_radii(), modifyGeometry(), blender::ed::space_node::node_add_error_message_button(), blender::nodes::NodeTreeRef::NodeTreeRef(), blender::Stack< T, InlineBufferCapacity, Allocator >::push_multiple(), blender::nodes::node_geo_distribute_points_on_faces_cc::sample_mesh_surface(), blender::ed::curves::snap_curves_to_surface::snap_curves_to_surface_exec_object(), blender::tests::TEST(), blender::bke::crazyspace::GeometryDeformation::translation_from_deformed_to_original(), and blender::bke::NodeTreeMainUpdater::update_rooted().
|
inlineconstexpr |
Returns a reference to the nth last element. This invokes undefined behavior when the span is too short.
Definition at line 313 of file BLI_span.hh.
References BLI_assert, blender::Span< T >::data_, and blender::Span< T >::size_.
Referenced by blender::length_parameterize::accumulate_lengths(), blender::geometry::calculate_angles(), blender::bke::curves::bezier::calculate_auto_handles(), blender::bke::curves::bezier::calculate_evaluated_positions(), blender::geometry::catmull_rom_to_bezier_handles(), blender::IndexMask::contained_in(), blender::ed::space_node::create_inspection_string_for_geometry(), ED_spreadsheet_context_path_is_active(), blender::bke::CurvesGeometry::evaluated_length_total_for_curve(), blender::bke::CurvesGeometry::evaluated_points_num(), BezierSpline::evaluated_points_num(), blender::geometry::execute_realize_curve_tasks(), blender::geometry::execute_realize_mesh_tasks(), blender::geometry::execute_realize_pointcloud_tasks(), blender::geometry::fillet_curves(), blender::nodes::geometry_nodes_eval_log::ModifierLog::find_node_by_spreadsheet_editor_context(), blender::io::obj::fixup_invalid_polygon(), blender::bke::curves::bezier::interpolate_to_evaluated(), blender::IndexMask::is_range(), blender::IndexMask::last(), blender::bke::curves::bezier::last_cyclic_segment_is_vector(), Spline::length(), blender::geometry::limit_radii(), blender::IndexMask::min_array_size(), blender::bke::point_attribute_materialize(), blender::bke::point_attribute_materialize_to_uninitialized(), blender::length_parameterize::sample_at_length(), blender::nodes::node_geo_curve_sample_cc::sample_indices_and_factors_to_compressed(), blender::nodes::node_geo_curve_sample_cc::sample_indices_and_lengths(), blender::length_parameterize::sample_uniform(), blender::geometry::subdivide_curves(), blender::tests::TEST(), blender::length_parameterize::tests::test_uniform_lengths(), blender::nodes::node_geo_duplicate_elements_cc::threaded_id_offset_copy(), and blender::nodes::node_geo_duplicate_elements_cc::threaded_slice_fill().
|
inlineconstexpr |
Access an element in the array. This invokes undefined behavior when the index is out of bounds.
Definition at line 230 of file BLI_span.hh.
References BLI_assert, blender::Span< T >::data_, and blender::Span< T >::size_.
|
inline |
A debug utility to print the content of the span. Every element be printed on a separate line.
Definition at line 447 of file BLI_span.hh.
References blender::Span< T >::print_as_lines(), and T.
|
inline |
A debug utility to print the content of the Span. Every element will be printed on a separate line using the given callback.
Definition at line 433 of file BLI_span.hh.
References blender::Span< T >::size_, and T.
Referenced by blender::Span< T >::print_as_lines().
|
inlineconstexpr |
Definition at line 217 of file BLI_span.hh.
References blender::Span< T >::end().
Referenced by blender::tests::TEST().
|
inlineconstexpr |
Definition at line 221 of file BLI_span.hh.
References blender::Span< T >::begin().
Referenced by blender::tests::TEST().
|
inlineconstexpr |
Returns the number of elements in the referenced array.
Definition at line 240 of file BLI_span.hh.
References blender::Span< T >::size_.
Referenced by blender::length_parameterize::accumulate_lengths(), blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), add_interp_verts_copy_edges_to_new_mesh(), add_interpolated_polys_to_new_mesh(), InstancesComponent::almost_unique_ids(), blender::IndexMask::as_range(), attribute_search_update_fn(), bm_face_create_from_mpoly(), blender::fn::build_multi_function_procedure_for_fields(), calculate_basis_for_point(), blender::bke::curves::nurbs::calculate_basis_for_point(), blender::bke::curves::bezier::calculate_evaluated_offsets(), blender::bke::curves::bezier::calculate_evaluated_positions(), NURBSpline::calculate_knots(), blender::length_parameterize::tests::calculate_lengths(), blender::geometry::catmull_rom_to_bezier_handles(), blender::geometry::catmull_rom_to_nurbs_positions(), compute_interpolated_polygons(), compute_masked_vertices(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_edges_from_edge_selection(), 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_poly_selection(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_polygons_from_vertex_selection(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_vertices_and_edges_from_edge_selection(), blender::nodes::node_geo_delete_geometry_cc::compute_selected_vertices_from_vertex_selection(), computed_masked_polygons(), blender::IndexMask::contained_in(), blender::MutableSpan< T >::copy_from(), blender::nodes::node_geo_delete_geometry_cc::copy_masked_edges_to_new_mesh(), copy_masked_edges_to_new_mesh(), copy_masked_vertices_to_new_mesh(), blender::nodes::node_geo_delete_geometry_cc::copy_masked_vertices_to_new_mesh(), blender::bke::idprop::create_array(), blender::geometry::create_curve_from_vert_indices(), blender::ed::space_node::create_inspection_string_for_gfield(), blender::geometry::create_nurbs_to_bezier_handles(), blender::gpu::ShaderInterface::debug_print(), blender::meshintersect::direct_mesh_boolean(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_byte_color(), blender::ed::spreadsheet::SpreadsheetLayoutDrawer::draw_float_vector(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_edges(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_faces(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_mesh(), ED_spreadsheet_context_path_is_active(), blender::fn::evaluate_fields(), blender::VectorAdaptor< T >::extend(), blender::draw::extract_lines_loose_geom_subdiv(), blender::IndexMask::extract_ranges(), blender::nodes::node_geo_extrude_mesh_cc::extrude_individual_mesh_faces(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_edges(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::geometry::find_curve_neighbors(), blender::ed::curves::convert_to_particle_system::find_mface_for_root_position(), blender::io::obj::fixup_invalid_polygon(), blender::VArray< T >::ForDerivedSpan(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::forward_to_sockets_with_same_type(), generate_unique_instance_ids(), blender::nodes::DOutputSocket::get_active_corresponding_group_output_socket(), get_dupliface_transform_from_coords(), gpu_select_query_end(), blender::IndexMask::indices_are_valid_index_mask(), blender::geometry::interpolate_position_with_interpolation(), blender::geometry::interpolate_position_without_interpolation(), blender::bke::curves::bezier::interpolate_to_evaluated(), blender::length_parameterize::interpolate_to_masked(), blender::IndexMask::invert(), blender::IndexMask::is_range(), blender::nodes::node_geo_join_geometry_cc::join_components(), blender::io::obj::linked_sockets_to_dest_id(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::log_socket_value(), blender::nodes::geometry_nodes_eval_log::NodeLog::lookup_socket_log(), blender::string_search::match_word_initials(), merge_uvs_for_vertex(), blender::bke::mesh_surface_sample::MeshAttributeInterpolator::MeshAttributeInterpolator(), blender::IndexMask::min_array_size(), blender::bounds::min_max_with_radii(), modifyGeometry(), blender::fn::procedure_optimization::move_destructs_up(), blender::ed::space_node::node_uiblocks_init(), blender::nodes::NodeTreeRef::NodeTreeRef(), blender::dot::NodeWithSocketsRef::NodeWithSocketsRef(), blender::bke::offsets_to_range(), blender::ed::sculpt_paint::DensityAddOperationExecutor::prepare_curve_roots_kdtrees(), blender::gpu::Shader::print_log(), blender::ed::sculpt_paint::PuffOperationExecutor::puff(), blender::Stack< T, InlineBufferCapacity, Allocator >::push_multiple(), blender::bke::CustomDataAttributes::reorder(), blender::geometry::ReverseUVSampler::ReverseUVSampler(), blender::length_parameterize::sample_at_length(), blender::length_parameterize::sample_at_lengths(), blender::geometry::ReverseUVSampler::sample_many(), blender::length_parameterize::sample_uniform(), Spline::sample_uniform_index_factors(), blender::string_search::score_query_against_words(), selection_array_from_vertex_group(), blender::fn::MFCallInstruction::set_params(), blender::io::obj::set_property_of_socket(), blender::IndexMask::size(), blender::Span< T >::slice(), blender::Span< T >::Span(), blender::bke::tests::TEST(), blender::tests::TEST(), blender::tests::test_ref_from_initializer_list(), blender::length_parameterize::tests::test_uniform_lengths(), blender::nodes::node_geo_duplicate_elements_cc::threaded_id_offset_copy(), blender::nodes::node_geo_duplicate_elements_cc::threaded_slice_fill(), blender::nodes::toposort_from_start_node(), blender::gpu::GLShader::transform_feedback_names_set(), blender::bke::BuiltinPointAttributeProvider< T >::try_get_for_read(), blender::bke::DynamicPointAttributeProvider::try_get_for_read(), blender::bke::NodeTreeMainUpdater::update_rooted(), blender::VArray< T >::VArray(), blender::nodes::node_geo_extrude_mesh_cc::vert_indices_from_edges(), blender::geometry::weld_edge_ctx_alloc(), blender::geometry::weld_poly_loop_ctx_alloc(), blender::geometry::weld_vert_ctx_alloc_and_setup(), and blender::geometry::weld_vert_groups_setup().
|
inlineconstexpr |
Returns the number of bytes referenced by this Span.
Definition at line 256 of file BLI_span.hh.
References blender::Span< T >::size_, and T.
Referenced by blender::tests::TEST().
|
inlineconstexpr |
Definition at line 150 of file BLI_span.hh.
References blender::IndexRange::size(), blender::Span< T >::slice(), and blender::IndexRange::start().
|
inlineconstexpr |
Returns a contiguous part of the array. This invokes undefined behavior when the start or size is negative.
Definition at line 142 of file BLI_span.hh.
References BLI_assert, blender::Span< T >::data_, min, blender::Span< T >::size(), blender::Span< T >::size_, and blender::Span< T >::Span().
Referenced by blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::nodes::node_geo_input_mesh_edge_angle_cc::create_edge_map(), blender::bke::curve_to_mesh_sweep(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_instances(), blender::bke::CurvesGeometry::ensure_evaluated_lengths(), blender::bke::CurvesGeometry::evaluated_normals(), blender::bke::CurvesGeometry::evaluated_positions(), blender::bke::CurvesGeometry::evaluated_tangents(), blender::fn::materialize_detail::execute_materialized(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::bke::curves::nurbs::interpolate_to_evaluated(), blender::bke::CurvesGeometry::interpolate_to_evaluated(), interpolate_to_evaluated_impl(), blender::bke::curves::nurbs::interpolate_to_evaluated_rational(), blender::nodes::node_geo_extrude_mesh_cc::mesh_calculate_polys_of_edge(), mesh_flush_select_from_verts(), blender::ed::sculpt_paint::select_grow::select_grow_update(), blender::Span< T >::slice(), blender::IndexMask::slice(), blender::IndexMask::slice_and_offset(), and blender::tests::TEST().
|
inlineconstexpr |
Returns a new Span that only contains the last n elements. This invokes undefined behavior when n is negative.
Definition at line 192 of file BLI_span.hh.
References BLI_assert, blender::Span< T >::data_, blender::Span< T >::size_, and blender::Span< T >::Span().
Referenced by blender::nodes::node_geo_edge_paths_to_curves_cc::edge_paths_to_curves_convert(), blender::length_parameterize::tests::TEST(), and blender::tests::TEST().
|
inlineconstexpr |
Returns a new Span that only contains the first n elements. This invokes undefined behavior when n is negative.
Definition at line 181 of file BLI_span.hh.
References BLI_assert, blender::Span< T >::data_, blender::Span< T >::size_, and blender::Span< T >::Span().
Referenced by blender::InplacePriorityQueue< T, FirstHasHigherPriority >::active_indices(), and blender::tests::TEST().
Definition at line 424 of file BLI_span.hh.
Definition at line 416 of file BLI_span.hh.
|
protected |
Definition at line 84 of file BLI_span.hh.
Referenced by blender::Span< T >::begin(), blender::Span< T >::cast(), blender::Span< T >::data(), blender::Span< T >::drop_back(), blender::Span< T >::drop_front(), blender::Span< T >::end(), blender::Span< T >::first(), blender::Span< T >::first_index_try(), blender::Span< T >::get(), blender::Span< T >::has_duplicates__linear_search(), blender::Span< T >::intersects__linear_search(), blender::Span< T >::last(), blender::Span< T >::operator[](), blender::Span< T >::slice(), blender::Span< T >::take_back(), and blender::Span< T >::take_front().
|
protected |
Definition at line 85 of file BLI_span.hh.
Referenced by blender::Span< T >::cast(), blender::Span< T >::drop_back(), blender::Span< T >::drop_front(), blender::Span< T >::end(), blender::Span< T >::first(), blender::Span< T >::first_index_try(), blender::Span< T >::has_duplicates__linear_search(), blender::Span< T >::index_range(), blender::Span< T >::intersects__linear_search(), blender::Span< T >::is_empty(), blender::Span< T >::last(), blender::Span< T >::operator[](), blender::Span< T >::print_as_lines(), blender::Span< T >::size(), blender::Span< T >::size_in_bytes(), blender::Span< T >::slice(), blender::Span< T >::take_back(), and blender::Span< T >::take_front().