Blender  V2.93
Namespaces | Classes | Typedefs | Functions | Variables
blender Namespace Reference

Namespaces

 attribute_math
 
 bke
 
 compositor
 
 deg
 
 dot
 
 draw
 
 ed
 
 fn
 
 gpu
 
 io
 
 meshintersect
 
 nodes
 
 opensubdiv
 
 robust_pred
 
 
 tests
 
 timeit
 

Classes

class  GuardedAllocator
 
class  RawAllocator
 
class  Array
 
struct  Color4f
 
struct  Color4b
 
class  DisjointSet
 
struct  double2
 
struct  double3
 
struct  float2
 
struct  float3
 
struct  float4x4
 
class  FunctionRef
 
class  FunctionRef< Ret(Params...)>
 
struct  DefaultHash
 
struct  DefaultHash< const T >
 
struct  DefaultHash< float >
 
struct  DefaultHash< bool >
 
struct  DefaultHash< std::string >
 
struct  DefaultHash< StringRef >
 
struct  DefaultHash< StringRefNull >
 
struct  DefaultHash< std::string_view >
 
struct  DefaultHash< T * >
 
struct  DefaultHash< std::unique_ptr< T > >
 
struct  DefaultHash< std::pair< T1, T2 > >
 
class  LoadFactor
 
struct  TemplatedKeyInfo
 
struct  PointerKeyInfo
 
class  HashTableStats
 
struct  DefaultEquality
 
class  IndexMask
 
class  Span
 
class  IndexRange
 
class  InplacePriorityQueue
 
class  LinearAllocator
 
class  ListBaseWrapper
 
class  Map
 
class  StdUnorderedMapWrapper
 
class  SimpleMapSlot
 
class  IntrusiveMapSlot
 
struct  DefaultMapSlot
 
struct  DefaultMapSlot< Key *, Value >
 
struct  DestructValueAtAddress
 
class  AlignedBuffer
 
class  TypedBuffer
 
class  DynamicStackBuffer
 
class  NoInitialization
 
class  NoExceptConstructor
 
class  MultiValueMap
 
class  LinearProbingStrategy
 
class  QuadraticProbingStrategy
 
class  PythonProbingStrategy
 
class  ShuffleProbingStrategy
 
class  RandomNumberGenerator
 
class  ResourceScope
 
class  Set
 
class  StdUnorderedSetWrapper
 
class  SimpleSetSlot
 
class  HashedSetSlot
 
class  IntrusiveSetSlot
 
struct  DefaultSetSlot
 
struct  DefaultSetSlot< std::string >
 
struct  DefaultSetSlot< StringRef >
 
struct  DefaultSetSlot< StringRefNull >
 
struct  DefaultSetSlot< Key * >
 
class  MutableSpan
 
struct  StackChunk
 
class  Stack
 
class  StringRefBase
 
class  StringRefNull
 
class  StringRef
 
class  UserCounter
 
class  NonCopyable
 
class  NonMovable
 
class  Vector
 
class  VectorAdaptor
 
class  VectorSet
 
class  SimpleVectorSetSlot
 
struct  DefaultVectorSetSlot
 
class  VArray
 
class  VArrayForSpan
 
class  VArrayForSingle
 
class  VVectorArray
 
struct  DefaultHash< tests::Type1 >
 
struct  DefaultHash< SpreadsheetColumnID >
 

Typedefs

template<typename T , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(T))>
using RawArray = Array< T, InlineBufferCapacity, RawAllocator >
 
template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality, typename Slot = typename DefaultMapSlot<Key, Value>::type>
using RawMap = Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, RawAllocator >
 
template<typename T >
using destruct_ptr = std::unique_ptr< T, DestructValueAtAddress< T > >
 
using DefaultProbingStrategy = PythonProbingStrategy<>
 
template<typename Key , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality, typename Slot = typename DefaultSetSlot<Key>::type>
using RawSet = Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, RawAllocator >
 
template<typename Int , Int EmptyValue, Int RemovedValue>
using IntegerSetSlot = IntrusiveSetSlot< Int, TemplatedKeyInfo< Int, EmptyValue, RemovedValue > >
 
template<typename T , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(T))>
using RawStack = Stack< T, InlineBufferCapacity, RawAllocator >
 
template<typename T , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(T))>
using RawVector = Vector< T, InlineBufferCapacity, RawAllocator >
 
template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality, typename Slot = typename DefaultVectorSetSlot<Key>::type>
using RawVectorSet = VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, RawAllocator >
 

Functions

 TEST_F (TrackingTest, BKE_tracking_marker_get)
 
 TEST_F (TrackingTest, BKE_tracking_marker_get_exact)
 
 TEST_F (TrackingTest, BKE_tracking_marker_get_interpolated)
 
 TRIVIAL_DEFAULT_INT_HASH (int8_t)
 
 TRIVIAL_DEFAULT_INT_HASH (uint8_t)
 
 TRIVIAL_DEFAULT_INT_HASH (int16_t)
 
 TRIVIAL_DEFAULT_INT_HASH (uint16_t)
 
 TRIVIAL_DEFAULT_INT_HASH (int32_t)
 
 TRIVIAL_DEFAULT_INT_HASH (uint32_t)
 
 TRIVIAL_DEFAULT_INT_HASH (int64_t)
 
 TRIVIAL_DEFAULT_INT_HASH (uint64_t)
 
uint64_t hash_string (StringRef str)
 
template<typename T >
uint64_t get_default_hash (const T &v)
 
template<typename T1 , typename T2 >
uint64_t get_default_hash_2 (const T1 &v1, const T2 &v2)
 
template<typename T1 , typename T2 , typename T3 >
uint64_t get_default_hash_3 (const T1 &v1, const T2 &v2, const T3 &v3)
 
template<typename Src1 , typename Src2 , typename Dst1 , typename Dst2 >
void initialize_pointer_pair (Src1 &&src1, Src2 &&src2, Dst1 *dst1, Dst2 *dst2)
 
int orient2d (const double2 &a, const double2 &b, const double2 &c)
 
int orient2d_fast (const double2 &a, const double2 &b, const double2 &c)
 
int incircle (const double2 &a, const double2 &b, const double2 &c, const double2 &d)
 
int incircle_fast (const double2 &a, const double2 &b, const double2 &c, const double2 &d)
 
int orient3d (const double3 &a, const double3 &b, const double3 &c, const double3 &d)
 
int orient3d_fast (const double3 &a, const double3 &b, const double3 &c, const double3 &d)
 
int insphere (const double3 &a, const double3 &b, const double3 &c, const double3 &d, const double3 &e)
 
int insphere_fast (const double3 &a, const double3 &b, const double3 &c, const double3 &d, const double3 &e)
 
template<typename T >
void destruct_n (T *ptr, int64_t n)
 
template<typename T >
void default_construct_n (T *ptr, int64_t n)
 
template<typename T >
void initialized_copy_n (const T *src, int64_t n, T *dst)
 
template<typename T >
void uninitialized_copy_n (const T *src, int64_t n, T *dst)
 
template<typename From , typename To >
void uninitialized_convert_n (const From *src, int64_t n, To *dst)
 
template<typename T >
void initialized_move_n (T *src, int64_t n, T *dst)
 
template<typename T >
void uninitialized_move_n (T *src, int64_t n, T *dst)
 
template<typename T >
void initialized_relocate_n (T *src, int64_t n, T *dst)
 
template<typename T >
void uninitialized_relocate_n (T *src, int64_t n, T *dst)
 
template<typename T >
void initialized_fill_n (T *dst, int64_t n, const T &value)
 
template<typename T >
void uninitialized_fill_n (T *dst, int64_t n, const T &value)
 
constexpr int64_t default_inline_buffer_capacity (size_t element_size)
 
template<typename Container >
Container & copy_assign_container (Container &dst, const Container &src)
 
template<typename Container >
Container & move_assign_container (Container &dst, Container &&src) noexcept(std::is_nothrow_move_constructible_v< Container >)
 
template<typename T1 , typename T2 >
constexpr void assert_same_size (const T1 &v1, const T2 &v2)
 
template<typename T1 , typename T2 , typename T3 >
constexpr void assert_same_size (const T1 &v1, const T2 &v2, const T3 &v3)
 
std::ostream & operator<< (std::ostream &stream, StringRef ref)
 
std::ostream & operator<< (std::ostream &stream, StringRefNull ref)
 
std::string operator+ (StringRef a, StringRef b)
 
constexpr bool operator== (StringRef a, StringRef b)
 
constexpr bool operator!= (StringRef a, StringRef b)
 
constexpr bool operator< (StringRef a, StringRef b)
 
constexpr bool operator> (StringRef a, StringRef b)
 
constexpr bool operator<= (StringRef a, StringRef b)
 
constexpr bool operator>= (StringRef a, StringRef b)
 
constexpr int64_t index_or_npos_to_int64 (size_t index)
 
template<typename Range , typename Function >
void parallel_for_each (Range &range, const Function &function)
 
template<typename Function >
void parallel_for (IndexRange range, int64_t grain_size, const Function &function)
 
template<typename T , typename Func >
void devirtualize_varray (const VArray< T > &varray, const Func &func, bool enable=true)
 
template<typename T1 , typename T2 , typename Func >
void devirtualize_varray2 (const VArray< T1 > &varray1, const VArray< T2 > &varray2, const Func &func, bool enable=true)
 
static int sgn (double x)
 
Constexpr Utility Functions

Those should eventually be de-duplicated with functions in BLI_math_base.h.

constexpr int64_t is_power_of_2_constexpr (const int64_t x)
 
constexpr int64_t log2_floor_constexpr (const int64_t x)
 
constexpr int64_t log2_ceil_constexpr (const int64_t x)
 
constexpr int64_t power_of_2_max_constexpr (const int64_t x)
 
template<typename IntT >
constexpr IntT ceil_division (const IntT x, const IntT y)
 
template<typename IntT >
constexpr IntT floor_division (const IntT x, const IntT y)
 
constexpr int64_t ceil_division_by_fraction (const int64_t x, const int64_t numerator, const int64_t denominator)
 
constexpr int64_t floor_multiplication_with_fraction (const int64_t x, const int64_t numerator, const int64_t denominator)
 
constexpr int64_t total_slot_amount_for_usable_slots (const int64_t min_usable_slots, const int64_t max_load_factor_numerator, const int64_t max_load_factor_denominator)
 

Variables

template<typename From , typename To >
constexpr bool is_convertible_pointer_v
 
template<typename From , typename To >
constexpr bool is_span_convertible_pointer_v
 
static RawVector< RawArray< int64_t, 0 > > arrays
 
static int64_t current_array_size = 0
 
static int64_tcurrent_array = nullptr
 
static std::mutex current_array_mutex
 

Typedef Documentation

◆ DefaultProbingStrategy

Having a specified default is convenient.

Definition at line 213 of file BLI_probing_strategies.hh.

◆ destruct_ptr

template<typename T >
using blender::destruct_ptr = typedef std::unique_ptr<T, DestructValueAtAddress<T> >

A destruct_ptr is like unique_ptr, but it will only call the destructor and will not free the memory. This is useful when using custom allocators.

Definition at line 322 of file BLI_memory_utils.hh.

◆ IntegerSetSlot

template<typename Int , Int EmptyValue, Int RemovedValue>
using blender::IntegerSetSlot = typedef IntrusiveSetSlot<Int, TemplatedKeyInfo<Int, EmptyValue, RemovedValue> >

This exists just to make it more convenient to define which special integer values can be used to indicate an empty and removed value.

Definition at line 348 of file BLI_set_slots.hh.

◆ RawArray

template<typename T , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(T))>
using blender::RawArray = typedef Array<T, InlineBufferCapacity, RawAllocator>

Same as a normal Array, but does not use Blender's guarded allocator. This is useful when allocating memory with static storage duration.

Definition at line 441 of file BLI_array.hh.

◆ RawMap

template<typename Key , typename Value , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key) + sizeof(Value)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality, typename Slot = typename DefaultMapSlot<Key, Value>::type>
using blender::RawMap = typedef Map<Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, RawAllocator>

Same as a normal Map, but does not use Blender's guarded allocator. This is useful when allocating memory with static storage duration.

Definition at line 1196 of file BLI_map.hh.

◆ RawSet

template<typename Key , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality, typename Slot = typename DefaultSetSlot<Key>::type>
using blender::RawSet = typedef Set<Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, RawAllocator>

Same as a normal Set, but does not use Blender's guarded allocator. This is useful when allocating memory with static storage duration.

Definition at line 923 of file BLI_set.hh.

◆ RawStack

template<typename T , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(T))>
using blender::RawStack = typedef Stack<T, InlineBufferCapacity, RawAllocator>

Same as a normal Stack, but does not use Blender's guarded allocator. This is useful when allocating memory with static storage duration.

Definition at line 417 of file BLI_stack.hh.

◆ RawVector

template<typename T , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(T))>
using blender::RawVector = typedef Vector<T, InlineBufferCapacity, RawAllocator>

Same as a normal Vector, but does not use Blender's guarded allocator. This is useful when allocating memory with static storage duration.

Definition at line 971 of file BLI_vector.hh.

◆ RawVectorSet

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality, typename Slot = typename DefaultVectorSetSlot<Key>::type>
using blender::RawVectorSet = typedef VectorSet<Key, ProbingStrategy, Hash, IsEqual, Slot, RawAllocator>

Same as a normal VectorSet, but does not use Blender's guarded allocator. This is useful when allocating memory with static storage duration.

Definition at line 778 of file BLI_vector_set.hh.

Function Documentation

◆ assert_same_size() [1/2]

template<typename T1 , typename T2 >
constexpr void blender::assert_same_size ( const T1 v1,
const T2 v2 
)
constexpr

Utilities to check that arrays have the same size in debug builds.

Definition at line 715 of file BLI_span.hh.

References BLI_assert, size(), UNUSED_VARS_NDEBUG, v1, and v2.

Referenced by blender::nodes::MFNetworkTreeMap::add(), and blender::fn::MFNetwork::add_dummy().

◆ assert_same_size() [2/2]

template<typename T1 , typename T2 , typename T3 >
constexpr void blender::assert_same_size ( const T1 v1,
const T2 v2,
const T3 v3 
)
constexpr

Definition at line 726 of file BLI_span.hh.

References BLI_assert, size(), UNUSED_VARS_NDEBUG, v1, and v2.

◆ ceil_division()

template<typename IntT >
constexpr IntT blender::ceil_division ( const IntT  x,
const IntT  y 
)
inlineconstexpr

Definition at line 69 of file BLI_hash_tables.hh.

References BLI_assert, x, and y.

Referenced by ceil_division_by_fraction().

◆ ceil_division_by_fraction()

constexpr int64_t blender::ceil_division_by_fraction ( const int64_t  x,
const int64_t  numerator,
const int64_t  denominator 
)
inlineconstexpr

Definition at line 83 of file BLI_hash_tables.hh.

References ceil_division(), and x.

Referenced by total_slot_amount_for_usable_slots().

◆ copy_assign_container()

template<typename Container >
Container& blender::copy_assign_container ( Container &  dst,
const Container &  src 
)

◆ default_construct_n()

template<typename T >
void blender::default_construct_n ( T ptr,
int64_t  n 
)

Call the default constructor on n consecutive elements. For trivially constructible types, this does nothing.

Exception Safety: Strong.

Before: ptr: uninitialized After: ptr: initialized

Definition at line 75 of file BLI_memory_utils.hh.

References BLI_assert, destruct_n(), ptr, and T.

Referenced by blender::fn::cpp_type_util::construct_default_n_cb(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::tests::TEST().

◆ default_inline_buffer_capacity()

constexpr int64_t blender::default_inline_buffer_capacity ( size_t  element_size)
inlineconstexpr

Inline buffers for small-object-optimization should be disable by default. Otherwise we might get large unexpected allocations on the stack.

Definition at line 498 of file BLI_memory_utils.hh.

◆ destruct_n()

template<typename T >
void blender::destruct_n ( T ptr,
int64_t  n 
)

◆ devirtualize_varray()

template<typename T , typename Func >
void blender::devirtualize_varray ( const VArray< T > &  varray,
const Func &  func,
bool  enable = true 
)
inline

Generate multiple versions of the given function optimized for different virtual arrays. One has to be careful with nesting multiple devirtualizations, because that results in an exponential number of function instantiations (increasing compile time and binary size).

Generally, this function should only be used when the virtual method call overhead to get an element from a virtual array is significant.

Definition at line 227 of file BLI_virtual_array.hh.

References blender::VArray< T >::get_single(), blender::VArray< T >::get_span(), blender::VArray< T >::is_single(), blender::VArray< T >::is_span(), and blender::VArray< T >::size().

Referenced by blender::fn::CustomMF_SI_SO< In1, Out1 >::create_function().

◆ devirtualize_varray2()

template<typename T1 , typename T2 , typename Func >
void blender::devirtualize_varray2 ( const VArray< T1 > &  varray1,
const VArray< T2 > &  varray2,
const Func &  func,
bool  enable = true 
)
inline

Same as devirtualize_varray, but devirtualizes two virtual arrays at the same time. This is better than nesting two calls to devirtualize_varray, because it instantiates fewer cases.

Definition at line 253 of file BLI_virtual_array.hh.

References blender::VArray< T >::get_single(), blender::VArray< T >::get_span(), blender::VArray< T >::is_single(), blender::VArray< T >::is_span(), and blender::VArray< T >::size().

Referenced by blender::fn::CustomMF_SI_SI_SO< In1, In2, Out1 >::create_function().

◆ floor_division()

template<typename IntT >
constexpr IntT blender::floor_division ( const IntT  x,
const IntT  y 
)
inlineconstexpr

Definition at line 76 of file BLI_hash_tables.hh.

References BLI_assert, x, and y.

◆ floor_multiplication_with_fraction()

constexpr int64_t blender::floor_multiplication_with_fraction ( const int64_t  x,
const int64_t  numerator,
const int64_t  denominator 
)
inlineconstexpr

Definition at line 92 of file BLI_hash_tables.hh.

References x.

Referenced by blender::LoadFactor::compute_total_and_usable_slots().

◆ get_default_hash()

template<typename T >
uint64_t blender::get_default_hash ( const T v)

◆ get_default_hash_2()

template<typename T1 , typename T2 >
uint64_t blender::get_default_hash_2 ( const T1 v1,
const T2 v2 
)

◆ get_default_hash_3()

template<typename T1 , typename T2 , typename T3 >
uint64_t blender::get_default_hash_3 ( const T1 v1,
const T2 v2,
const T3 v3 
)

Definition at line 222 of file BLI_hash.hh.

References get_default_hash(), v1, and v2.

◆ hash_string()

uint64_t blender::hash_string ( StringRef  str)
inline

◆ incircle()

int blender::incircle ( const double2 a,
const double2 b,
const double2 c,
const double2 d 
)

Definition at line 2501 of file math_boolean.cc.

References Freestyle::a, Freestyle::c, blender::robust_pred::incircle(), and sgn().

◆ incircle_fast()

int blender::incircle_fast ( const double2 a,
const double2 b,
const double2 c,
const double2 d 
)

◆ index_or_npos_to_int64()

constexpr int64_t blender::index_or_npos_to_int64 ( size_t  index)
inlineconstexpr

◆ initialize_pointer_pair()

template<typename Src1 , typename Src2 , typename Dst1 , typename Dst2 >
void blender::initialize_pointer_pair ( Src1 &&  src1,
Src2 &&  src2,
Dst1 *  dst1,
Dst2 *  dst2 
)

◆ initialized_copy_n()

template<typename T >
void blender::initialized_copy_n ( const T src,
int64_t  n,
T dst 
)

Copy n values from src to dst.

Exception Safety: Basic.

Before: src: initialized dst: initialized After: src: initialized dst: initialized

Definition at line 109 of file BLI_memory_utils.hh.

References BLI_assert.

Referenced by blender::MutableSpan< T >::copy_from().

◆ initialized_fill_n()

template<typename T >
void blender::initialized_fill_n ( T dst,
int64_t  n,
const T value 
)

Copy the value to n consecutive elements.

Exception Safety: Basic.

Before: dst: initialized After: dst: initialized

Definition at line 276 of file BLI_memory_utils.hh.

References BLI_assert.

Referenced by blender::MutableSpan< T >::fill(), blender::Array< T, InlineBufferCapacity, Allocator >::fill(), and blender::Vector< T, InlineBufferCapacity, Allocator >::fill().

◆ initialized_move_n()

template<typename T >
void blender::initialized_move_n ( T src,
int64_t  n,
T dst 
)

Move n values from src to dst.

Exception Safety: Basic.

Before: src: initialized dst: initialized After: src: initialized, moved-from dst: initialized

Definition at line 187 of file BLI_memory_utils.hh.

References BLI_assert.

Referenced by initialized_relocate_n(), blender::fn::cpp_type_util::move_to_initialized_cb(), and blender::fn::cpp_type_util::move_to_initialized_n_cb().

◆ initialized_relocate_n()

template<typename T >
void blender::initialized_relocate_n ( T src,
int64_t  n,
T dst 
)

Relocate n values from src to dst. Relocation is a move followed by destruction of the src value.

Exception Safety: Basic.

Before: src: initialized dst: initialized After: src: uninitialized dst: initialized

Definition at line 237 of file BLI_memory_utils.hh.

References BLI_assert, destruct_n(), and initialized_move_n().

Referenced by blender::fn::cpp_type_util::relocate_to_initialized_n_cb().

◆ insphere()

int blender::insphere ( const double3 a,
const double3 b,
const double3 c,
const double3 d,
const double3 e 
)

Definition at line 2521 of file math_boolean.cc.

References Freestyle::a, Freestyle::c, e, blender::robust_pred::insphere(), and sgn().

◆ insphere_fast()

int blender::insphere_fast ( const double3 a,
const double3 b,
const double3 c,
const double3 d,
const double3 e 
)

◆ is_power_of_2_constexpr()

constexpr int64_t blender::is_power_of_2_constexpr ( const int64_t  x)
inlineconstexpr

Definition at line 44 of file BLI_hash_tables.hh.

References BLI_assert, and x.

Referenced by log2_ceil_constexpr().

◆ log2_ceil_constexpr()

constexpr int64_t blender::log2_ceil_constexpr ( const int64_t  x)
inlineconstexpr

Definition at line 56 of file BLI_hash_tables.hh.

References BLI_assert, is_power_of_2_constexpr(), log2_floor_constexpr(), and x.

Referenced by power_of_2_max_constexpr().

◆ log2_floor_constexpr()

constexpr int64_t blender::log2_floor_constexpr ( const int64_t  x)
inlineconstexpr

Definition at line 50 of file BLI_hash_tables.hh.

References BLI_assert, and x.

Referenced by log2_ceil_constexpr().

◆ move_assign_container()

template<typename Container >
Container& blender::move_assign_container ( Container &  dst,
Container &&  src 
)
noexcept

◆ operator!=()

constexpr bool blender::operator!= ( StringRef  a,
StringRef  b 
)
inlineconstexpr

Definition at line 403 of file BLI_string_ref.hh.

References Freestyle::a.

Referenced by ccl_try_align().

◆ operator+()

std::string blender::operator+ ( StringRef  a,
StringRef  b 
)
inline

Adding two #StringRefs will allocate an std::string. This is not efficient, but convenient in most cases.

Definition at line 386 of file BLI_string_ref.hh.

References Freestyle::a.

◆ operator<()

constexpr bool blender::operator< ( StringRef  a,
StringRef  b 
)
inlineconstexpr

Definition at line 408 of file BLI_string_ref.hh.

References Freestyle::a.

◆ operator<<() [1/2]

std::ostream& blender::operator<< ( std::ostream &  stream,
StringRef  ref 
)
inline

Definition at line 370 of file BLI_string_ref.hh.

◆ operator<<() [2/2]

std::ostream& blender::operator<< ( std::ostream &  stream,
StringRefNull  ref 
)
inline

◆ operator<=()

constexpr bool blender::operator<= ( StringRef  a,
StringRef  b 
)
inlineconstexpr

Definition at line 418 of file BLI_string_ref.hh.

References Freestyle::a.

◆ operator==()

constexpr bool blender::operator== ( StringRef  a,
StringRef  b 
)
inlineconstexpr

◆ operator>()

constexpr bool blender::operator> ( StringRef  a,
StringRef  b 
)
inlineconstexpr

Definition at line 413 of file BLI_string_ref.hh.

References Freestyle::a.

◆ operator>=()

constexpr bool blender::operator>= ( StringRef  a,
StringRef  b 
)
inlineconstexpr

Definition at line 423 of file BLI_string_ref.hh.

References Freestyle::a.

◆ orient2d()

int blender::orient2d ( const double2 a,
const double2 b,
const double2 c 
)

Definition at line 2491 of file math_boolean.cc.

References Freestyle::a, Freestyle::c, blender::robust_pred::orient2d(), and sgn().

◆ orient2d_fast()

int blender::orient2d_fast ( const double2 a,
const double2 b,
const double2 c 
)

◆ orient3d()

int blender::orient3d ( const double3 a,
const double3 b,
const double3 c,
const double3 d 
)

Definition at line 2511 of file math_boolean.cc.

References Freestyle::a, Freestyle::c, blender::robust_pred::orient3d(), and sgn().

◆ orient3d_fast()

int blender::orient3d_fast ( const double3 a,
const double3 b,
const double3 c,
const double3 d 
)

◆ parallel_for()

template<typename Function >
void blender::parallel_for ( IndexRange  range,
int64_t  grain_size,
const Function &  function 
)

◆ parallel_for_each()

template<typename Range , typename Function >
void blender::parallel_for_each ( Range &  range,
const Function &  function 
)

◆ power_of_2_max_constexpr()

constexpr int64_t blender::power_of_2_max_constexpr ( const int64_t  x)
inlineconstexpr

Definition at line 63 of file BLI_hash_tables.hh.

References BLI_assert, log2_ceil_constexpr(), and x.

Referenced by total_slot_amount_for_usable_slots().

◆ sgn()

static int blender::sgn ( double  x)
static

◆ TEST_F() [1/3]

blender::TEST_F ( TrackingTest  ,
BKE_tracking_marker_get   
)

◆ TEST_F() [2/3]

blender::TEST_F ( TrackingTest  ,
BKE_tracking_marker_get_exact   
)

◆ TEST_F() [3/3]

blender::TEST_F ( TrackingTest  ,
BKE_tracking_marker_get_interpolated   
)

◆ total_slot_amount_for_usable_slots()

constexpr int64_t blender::total_slot_amount_for_usable_slots ( const int64_t  min_usable_slots,
const int64_t  max_load_factor_numerator,
const int64_t  max_load_factor_denominator 
)
inlineconstexpr

◆ TRIVIAL_DEFAULT_INT_HASH() [1/8]

blender::TRIVIAL_DEFAULT_INT_HASH ( int16_t  )

◆ TRIVIAL_DEFAULT_INT_HASH() [2/8]

blender::TRIVIAL_DEFAULT_INT_HASH ( int32_t  )

◆ TRIVIAL_DEFAULT_INT_HASH() [3/8]

blender::TRIVIAL_DEFAULT_INT_HASH ( int64_t  )

◆ TRIVIAL_DEFAULT_INT_HASH() [4/8]

blender::TRIVIAL_DEFAULT_INT_HASH ( int8_t  )

We cannot make any assumptions about the distribution of keys, so use a trivial hash function by default. The default probing strategy is designed to take all bits of the hash into account to avoid worst case behavior when the lower bits are all zero. Special hash functions can be implemented when more knowledge about a specific key distribution is available.

◆ TRIVIAL_DEFAULT_INT_HASH() [5/8]

blender::TRIVIAL_DEFAULT_INT_HASH ( uint16_t  )

◆ TRIVIAL_DEFAULT_INT_HASH() [6/8]

blender::TRIVIAL_DEFAULT_INT_HASH ( uint32_t  )

◆ TRIVIAL_DEFAULT_INT_HASH() [7/8]

blender::TRIVIAL_DEFAULT_INT_HASH ( uint64_t  )

◆ TRIVIAL_DEFAULT_INT_HASH() [8/8]

blender::TRIVIAL_DEFAULT_INT_HASH ( uint8_t  )

◆ uninitialized_convert_n()

template<typename From , typename To >
void blender::uninitialized_convert_n ( const From *  src,
int64_t  n,
To *  dst 
)

Convert n values from type From to type To.

Exception Safety: Strong.

Before: src: initialized dst: uninitialized After: src: initialized dst: initialized

Definition at line 159 of file BLI_memory_utils.hh.

References BLI_assert, and destruct_n().

◆ uninitialized_copy_n()

template<typename T >
void blender::uninitialized_copy_n ( const T src,
int64_t  n,
T dst 
)

◆ uninitialized_fill_n()

template<typename T >
void blender::uninitialized_fill_n ( T dst,
int64_t  n,
const T value 
)

Copy the value to n consecutive elements.

Exception Safety: Strong.

Before: dst: uninitialized After: dst: initialized

Definition at line 295 of file BLI_memory_utils.hh.

References BLI_assert, destruct_n(), and T.

Referenced by blender::Vector< T, InlineBufferCapacity, Allocator >::append_n_times(), blender::VectorAdaptor< T >::append_n_times(), blender::nodes::geo_node_point_distribute_exec(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::tests::TEST().

◆ uninitialized_move_n()

template<typename T >
void blender::uninitialized_move_n ( T src,
int64_t  n,
T dst 
)

Move n values from src to dst.

Exception Safety: Basic.

Before: src: initialized dst: uninitialized After: src: initialized, moved-from dst: initialized

Definition at line 208 of file BLI_memory_utils.hh.

References BLI_assert, destruct_n(), and T.

Referenced by blender::fn::cpp_type_util::move_to_uninitialized_cb(), blender::fn::cpp_type_util::move_to_uninitialized_n_cb(), and uninitialized_relocate_n().

◆ uninitialized_relocate_n()

template<typename T >
void blender::uninitialized_relocate_n ( T src,
int64_t  n,
T dst 
)

Relocate n values from src to dst. Relocation is a move followed by destruction of the src value.

Exception Safety: Basic.

Before: src: initialized dst: uninitialized After: src: uninitialized dst: initialized

Definition at line 258 of file BLI_memory_utils.hh.

References BLI_assert, destruct_n(), and uninitialized_move_n().

Referenced by blender::Array< T, InlineBufferCapacity, Allocator >::Array(), blender::fn::cpp_type_util::relocate_to_uninitialized_n_cb(), and blender::Vector< T, InlineBufferCapacity, Allocator >::Vector().

Variable Documentation

◆ arrays

RawVector<RawArray<int64_t, 0> > blender::arrays
static

◆ current_array

int64_t* blender::current_array = nullptr
static

Definition at line 29 of file BLI_index_range.cc.

Referenced by blender::IndexRange::as_span().

◆ current_array_mutex

std::mutex blender::current_array_mutex
static

Definition at line 30 of file BLI_index_range.cc.

Referenced by blender::IndexRange::as_span().

◆ current_array_size

int64_t blender::current_array_size = 0
static

Definition at line 28 of file BLI_index_range.cc.

Referenced by blender::IndexRange::as_span().

◆ is_convertible_pointer_v

template<typename From , typename To >
constexpr bool blender::is_convertible_pointer_v
inlineconstexpr
Initial value:
=
std::is_convertible_v<From, To> &&std::is_pointer_v<From> &&std::is_pointer_v<To>

Helper variable that checks if a pointer type can be converted into another pointer type without issues. Possible issues are casting away const and casting a pointer to a child class. Adding const or casting to a parent class is fine.

Definition at line 472 of file BLI_memory_utils.hh.

◆ is_span_convertible_pointer_v

template<typename From , typename To >
constexpr bool blender::is_span_convertible_pointer_v
inlineconstexpr
Initial value:
=
std::is_pointer_v<From> &&std::is_pointer_v<To> &&
(
std::is_same_v<From, To> ||
std::is_same_v<const std::remove_pointer_t<From>, std::remove_pointer_t<To>> ||
(!std::is_const_v<std::remove_pointer_t<From>> && std::is_same_v<To, void *>) ||
std::is_same_v<To, const void *>)

Helper variable that checks if a Span<From> can be converted to Span<To> safely, whereby From and To are pointers. Adding const and casting to a void pointer is allowed. Casting up and down a class hierarchy generally is not allowed, because this might change the pointer under some circumstances.

Definition at line 482 of file BLI_memory_utils.hh.