Blender V5.3
BLI_array_utils.hh File Reference
#include <numeric>
#include "BLI_execution_mode.hh"
#include "BLI_generic_span.hh"
#include "BLI_generic_virtual_array.hh"
#include "BLI_index_mask.hh"
#include "BLI_math_base_c.hh"
#include "BLI_offset_indices.hh"
#include "BLI_task.hh"
#include "BLI_virtual_array.hh"
#include "PRF_profile.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::array_utils

Enumerations

enum class  blender::array_utils::BooleanMix { blender::array_utils::None , blender::array_utils::AllFalse , blender::array_utils::AllTrue , blender::array_utils::Mixed }

Functions

constexpr int64_t blender::array_utils::calc_copy_grain_size (const exec_mode::Tag auto mode, const int64_t type_size)
constexpr int64_t blender::array_utils::calc_copy_grain_size (const exec_mode::Mode mode, const int64_t type_size)
template<exec_mode::Tag Mode>
constexpr auto blender::array_utils::exec_mode_tag_for_copy (const Mode mode, const int64_t type_size)
void blender::array_utils::copy (const GVArray &src, GMutableSpan dst, exec_mode::Mode mode=exec_mode::parallel)
template<typename T, exec_mode::Tag Mode = exec_mode::Parallel>
void blender::array_utils::copy (const VArray< T > &src, MutableSpan< T > dst, const Mode mode={})
template<typename T, exec_mode::Tag Mode = exec_mode::Parallel>
void blender::array_utils::copy (const Span< T > src, MutableSpan< T > dst, const Mode mode={})
void blender::array_utils::copy (const GVArray &src, const IndexMask &selection, GMutableSpan dst, exec_mode::Mode mode=exec_mode::parallel)
template<typename T, exec_mode::Tag Mode = exec_mode::Parallel>
void blender::array_utils::copy (const Span< T > src, const IndexMask &selection, MutableSpan< T > dst, const Mode mode={})
template<typename T>
T blender::array_utils::compute_sum (const Span< T > data)
template<typename T, typename IndexT, exec_mode::Tag Mode = exec_mode::Parallel>
void blender::array_utils::scatter (const Span< T > src, const Span< IndexT > indices, MutableSpan< T > dst, const Mode mode={})
template<typename T, exec_mode::Tag Mode = exec_mode::Parallel>
void blender::array_utils::scatter (const Span< T > src, const IndexMask &indices, MutableSpan< T > dst, const Mode mode={})
void blender::array_utils::gather (const GVArray &src, const IndexMask &indices, GMutableSpan dst, exec_mode::Mode mode=exec_mode::parallel)
void blender::array_utils::gather (GSpan src, const IndexMask &indices, GMutableSpan dst, exec_mode::Mode mode=exec_mode::parallel)
template<typename T, exec_mode::Tag Mode = exec_mode::Parallel>
void blender::array_utils::gather (const VArray< T > &src, const IndexMask &indices, MutableSpan< T > dst, const Mode mode={})
template<typename T, typename IndexT, exec_mode::Tag Mode = exec_mode::Parallel>
void blender::array_utils::gather (const Span< T > src, const Span< IndexT > indices, const IndexMask &dst_mask, MutableSpan< T > dst, const Mode mode={})
template<typename T, typename IndexT, exec_mode::Tag Mode = exec_mode::Parallel>
void blender::array_utils::gather (const Span< T > src, const Span< IndexT > indices, MutableSpan< T > dst, const Mode mode={})
template<typename T, typename IndexT, exec_mode::Tag Mode = exec_mode::Parallel>
void blender::array_utils::gather (const VArray< T > &src, const Span< IndexT > indices, const IndexMask &dst_mask, MutableSpan< T > dst, const Mode mode={})
template<typename T, typename IndexT, exec_mode::Tag Mode = exec_mode::Parallel>
void blender::array_utils::gather (const VArray< T > &src, const Span< IndexT > indices, MutableSpan< T > dst, const Mode mode={})
template<typename T>
void blender::array_utils::gather_group_to_group (const OffsetIndices< int > src_offsets, const OffsetIndices< int > dst_offsets, const IndexMask &selection, const Span< T > src, MutableSpan< T > dst)
template<typename T>
void blender::array_utils::gather_group_to_group (const OffsetIndices< int > src_offsets, const OffsetIndices< int > dst_offsets, const Span< int > selection, const Span< T > src, MutableSpan< T > dst)
template<typename T>
void blender::array_utils::gather_group_to_group (const OffsetIndices< int > src_offsets, const OffsetIndices< int > dst_offsets, const IndexMask &selection, const VArray< T > src, MutableSpan< T > dst)
template<typename T>
void blender::array_utils::gather_to_groups (const OffsetIndices< int > dst_offsets, const IndexMask &src_selection, const Span< T > src, MutableSpan< T > dst)
void blender::array_utils::copy_group_to_group (OffsetIndices< int > src_offsets, OffsetIndices< int > dst_offsets, const IndexMask &selection, GSpan src, GMutableSpan dst)
template<typename T>
void blender::array_utils::copy_group_to_group (OffsetIndices< int > src_offsets, OffsetIndices< int > dst_offsets, const IndexMask &selection, Span< T > src, MutableSpan< T > dst)
void blender::array_utils::count_indices (Span< int > indices, MutableSpan< int > counts)
int blender::array_utils::group_ids_to_indices (Span< int > ids, const IndexMask &mask, MutableSpan< int > r_group_indices, Vector< int > *r_first_indices=nullptr)
void blender::array_utils::invert_booleans (MutableSpan< bool > span)
void blender::array_utils::invert_booleans (MutableSpan< bool > span, const IndexMask &mask)
int64_t blender::array_utils::count_booleans (const VArray< bool > &varray)
int64_t blender::array_utils::count_booleans (const VArray< bool > &varray, const IndexMask &mask)
BooleanMix blender::array_utils::booleans_mix_calc (const VArray< bool > &varray, IndexRange range_to_check)
BooleanMix blender::array_utils::booleans_mix_calc (const VArray< bool > &varray)
bool blender::array_utils::contains (const VArray< bool > &varray, const IndexMask &indices_to_check, bool value)
IndexMask blender::array_utils::indices_non_negative (const IndexMask &universe, Span< int > values, LinearAllocator<> &memory)
IndexMask blender::array_utils::indices_in_range (const IndexMask &universe, Span< int > values, IndexRange range, LinearAllocator<> &memory)
template<typename T>
Vector< IndexRange > blender::array_utils::find_all_ranges (const Span< T > span, const T &value)
template<typename T>
void blender::array_utils::fill_index_range (MutableSpan< T > span, const T start=0)
template<typename T, exec_mode::Tag Mode = exec_mode::Parallel>
void blender::array_utils::fill_index_range (const IndexMask &mask, MutableSpan< T > span, const Mode mode={})
template<typename T, exec_mode::Tag Mode = exec_mode::Parallel>
void blender::array_utils::fill_index_range (const IndexMask &mask, MutableSpan< T > span, const T start, const Mode mode={})
template<typename T>
bool blender::array_utils::indexed_data_equal (const Span< T > all_values, const Span< int > indices, const Span< T > values)
bool blender::array_utils::indices_are_range (Span< int > indices, IndexRange range)
template<typename T>
std::optional< int64_t > blender::array_utils::max_element_index (const Span< T > &span, const int64_t grain_size=8192)
template<typename T>
std::optional< int64_t > blender::array_utils::max_element_index (const VArray< T > &array, const int64_t grain_size=8192)