Blender
V3.3
|
Typedefs | |
template<typename T , int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(T))> | |
using | RawArray = Array< T, InlineBufferCapacity, RawAllocator > |
using | ColorTheme4b = ColorTheme4< uint8_t > |
using | ColorTheme4f = ColorTheme4< float > |
using | ColorGeometry4f = ColorSceneLinear4f< eAlpha::Premultiplied > |
using | ColorGeometry4b = ColorSceneLinearByteEncoded4b< eAlpha::Premultiplied > |
using | ColorPaint4f = ColorSceneLinear4f< eAlpha::Straight > |
using | ColorPaint4b = ColorSceneLinearByteEncoded4b< eAlpha::Straight > |
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 | as_uint_type = std::conditional_t< sizeof(T)==sizeof(uint8_t), uint8_t, std::conditional_t< sizeof(T)==sizeof(uint16_t), uint16_t, std::conditional_t< sizeof(T)==sizeof(uint32_t), uint32_t, std::conditional_t< sizeof(T)==sizeof(uint64_t), uint64_t, void > >> > |
using | int2 = vec_base< int32_t, 2 > |
using | int3 = vec_base< int32_t, 3 > |
using | int4 = vec_base< int32_t, 4 > |
using | uint2 = vec_base< uint32_t, 2 > |
using | uint3 = vec_base< uint32_t, 3 > |
using | uint4 = vec_base< uint32_t, 4 > |
using | ushort2 = vec_base< uint16_t, 2 > |
using | float2 = vec_base< float, 2 > |
using | float3 = vec_base< float, 3 > |
using | float4 = vec_base< float, 4 > |
using | double2 = vec_base< double, 2 > |
using | double3 = vec_base< double, 3 > |
using | double4 = vec_base< double, 4 > |
template<typename T > | |
using | destruct_ptr = std::unique_ptr< T, DestructValueAtAddress< T > > |
template<typename T , T Value, size_t Size> | |
using | make_value_sequence = decltype(detail::make_value_sequence_impl< T, Value >(std::make_index_sequence< Size >())) |
template<typename T , T Value1, T Value2, size_t Size, size_t... Value1Indices> | |
using | make_two_value_sequence = decltype(detail::make_two_value_sequence_impl< T, Value1, Value2 >(ValueSequence< size_t, Value1Indices... >(), std::make_index_sequence< Size >())) |
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 > |
Enumerations | |
enum class | eAlpha { Straight , Premultiplied } |
enum class | eSpace { Theme , SceneLinear , SceneLinearByteEncoded } |
Functions | |
TEST_F (TrackingTest, BKE_tracking_marker_get) | |
TEST_F (TrackingTest, BKE_tracking_marker_get_exact) | |
TEST_F (TrackingTest, BKE_tracking_marker_get_interpolated) | |
std::ostream & | operator<< (std::ostream &stream, const eAlpha &space) |
std::ostream & | operator<< (std::ostream &stream, const eSpace &space) |
BLI_INLINE ColorTheme4< float > | BLI_color_convert_to_theme4f (const ColorTheme4< uint8_t > &srgb4b) |
BLI_INLINE ColorTheme4< uint8_t > | BLI_color_convert_to_theme4b (const ColorTheme4< float > &srgb4f) |
BLI_INLINE ColorTheme4f | BLI_color_convert_to_theme4f (const ColorTheme4b &theme4b) |
BLI_INLINE ColorSceneLinear4f< eAlpha::Straight > | BLI_color_convert_to_scene_linear (const ColorTheme4f &theme4f) |
BLI_INLINE ColorSceneLinear4f< eAlpha::Straight > | BLI_color_convert_to_scene_linear (const ColorTheme4b &theme4b) |
BLI_INLINE ColorTheme4f | BLI_color_convert_to_theme4f (const ColorSceneLinear4f< eAlpha::Straight > &scene_linear) |
BLI_INLINE ColorTheme4b | BLI_color_convert_to_theme4b (const ColorSceneLinear4f< eAlpha::Straight > &scene_linear) |
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) |
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 T1 , typename T2 , typename T3 , typename T4 > | |
uint64_t | get_default_hash_4 (const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4) |
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 T > | |
bool | assign_if_different (T &old_value, T new_value) |
template<typename RandomAccessIterator > | |
void | parallel_sort (RandomAccessIterator begin, RandomAccessIterator end) |
template<typename RandomAccessIterator , typename Compare > | |
void | parallel_sort (RandomAccessIterator begin, RandomAccessIterator end, const Compare &comp) |
static int | sgn (double x) |
bool | operator== (const bUUID uuid1, const bUUID uuid2) |
bool | operator!= (const bUUID uuid1, const bUUID uuid2) |
bool | operator< (const bUUID uuid1, const bUUID uuid2) |
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) |
#StringRefBase Inline Methods | |
constexpr int64_t | index_or_npos_to_int64 (size_t index) |
Operator Overloads | |
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) |
Variables | |
template<typename T > | |
constexpr bool | is_trivial_extended_v = std::is_trivial_v<T> |
template<typename T > | |
constexpr bool | is_trivially_destructible_extended_v |
template<typename T > | |
constexpr bool | is_trivially_copy_constructible_extended_v |
template<typename T > | |
constexpr bool | is_trivially_move_constructible_extended_v |
template<typename From , typename To > | |
constexpr bool | is_convertible_pointer_v |
template<typename From , typename To > | |
constexpr bool | is_span_convertible_pointer_v |
template<typename T , typename... Args> | |
constexpr bool | is_same_any_v = (std::is_same_v<T, Args> || ...) |
template<typename T > | |
constexpr bool | is_trivial_extended_v< VArrayImpl_For_Span_final< T > > = true |
template<typename T > | |
constexpr bool | is_trivial_extended_v< VArrayImpl_For_Single< T > > = is_trivial_extended_v<T> |
template<typename StructT , typename ElemT , ElemT(*)(const StructT &) GetFunc, void(*)(StructT &, ElemT) SetFunc> | |
constexpr bool | is_trivial_extended_v< VArrayImpl_For_DerivedSpan< StructT, ElemT, GetFunc, SetFunc > > = true |
template<typename T > | |
static constexpr bool | is_VArray_v = false |
template<typename T > | |
static constexpr bool | is_VArray_v< VArray< T > > = true |
template<typename T > | |
static constexpr bool | is_VMutableArray_v = false |
template<typename T > | |
static constexpr bool | is_VMutableArray_v< VMutableArray< T > > = true |
static RawVector< RawArray< int64_t, 0 > > | arrays |
static std::mutex | current_array_mutex |
#GVArrayImpl_For_GSpan. | |
template<> | |
constexpr bool | is_trivial_extended_v< GVArrayImpl_For_GSpan_final > = true |
#GVArrayImpl_For_SingleValueRef. | |
template<> | |
constexpr bool | is_trivial_extended_v< GVArrayImpl_For_SingleValueRef_final > = true |
using blender::as_uint_type = typedef std::conditional_t<sizeof(T) == sizeof(uint8_t), uint8_t, std::conditional_t<sizeof(T) == sizeof(uint16_t), uint16_t, std::conditional_t<sizeof(T) == sizeof(uint32_t), uint32_t, std::conditional_t<sizeof(T) == sizeof(uint64_t), uint64_t, void> >> > |
Definition at line 21 of file BLI_math_vec_types.hh.
using blender::ColorGeometry4b = typedef ColorSceneLinearByteEncoded4b<eAlpha::Premultiplied> |
Definition at line 347 of file BLI_color.hh.
using blender::ColorGeometry4f = typedef ColorSceneLinear4f<eAlpha::Premultiplied> |
Definition at line 346 of file BLI_color.hh.
using blender::ColorPaint4b = typedef ColorSceneLinearByteEncoded4b<eAlpha::Straight> |
Definition at line 349 of file BLI_color.hh.
using blender::ColorPaint4f = typedef ColorSceneLinear4f<eAlpha::Straight> |
Definition at line 348 of file BLI_color.hh.
using blender::ColorTheme4b = typedef ColorTheme4<uint8_t> |
Definition at line 295 of file BLI_color.hh.
using blender::ColorTheme4f = typedef ColorTheme4<float> |
Definition at line 296 of file BLI_color.hh.
using blender::DefaultProbingStrategy = typedef PythonProbingStrategy<> |
Having a specified default is convenient.
Definition at line 199 of file BLI_probing_strategies.hh.
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 329 of file BLI_memory_utils.hh.
using blender::double2 = typedef vec_base<double, 2> |
Definition at line 584 of file BLI_math_vec_types.hh.
using blender::double3 = typedef vec_base<double, 3> |
Definition at line 585 of file BLI_math_vec_types.hh.
using blender::double4 = typedef vec_base<double, 4> |
Definition at line 586 of file BLI_math_vec_types.hh.
using blender::float2 = typedef vec_base<float, 2> |
Definition at line 580 of file BLI_math_vec_types.hh.
using blender::float3 = typedef vec_base<float, 3> |
Definition at line 581 of file BLI_math_vec_types.hh.
using blender::float4 = typedef vec_base<float, 4> |
Definition at line 582 of file BLI_math_vec_types.hh.
using blender::int2 = typedef vec_base<int32_t, 2> |
Definition at line 570 of file BLI_math_vec_types.hh.
using blender::int3 = typedef vec_base<int32_t, 3> |
Definition at line 571 of file BLI_math_vec_types.hh.
using blender::int4 = typedef vec_base<int32_t, 4> |
Definition at line 572 of file BLI_math_vec_types.hh.
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 334 of file BLI_set_slots.hh.
using blender::make_two_value_sequence = typedef decltype(detail::make_two_value_sequence_impl<T, Value1, Value2>( ValueSequence<size_t, Value1Indices...>(), std::make_index_sequence<Size>())) |
Utility to create a #ValueSequence that contains two different values. The indices of where the first value should be used are passed in.
Definition at line 110 of file BLI_parameter_pack_utils.hh.
using blender::make_value_sequence = typedef decltype(detail::make_value_sequence_impl<T, Value>( std::make_index_sequence<Size>())) |
Utility to create a #ValueSequence that has the same value at every index.
Definition at line 102 of file BLI_parameter_pack_utils.hh.
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 444 of file BLI_array.hh.
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 1249 of file BLI_map.hh.
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 936 of file BLI_set.hh.
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 404 of file BLI_stack.hh.
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 1004 of file BLI_vector.hh.
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 860 of file BLI_vector_set.hh.
using blender::uint2 = typedef vec_base<uint32_t, 2> |
Definition at line 574 of file BLI_math_vec_types.hh.
using blender::uint3 = typedef vec_base<uint32_t, 3> |
Definition at line 575 of file BLI_math_vec_types.hh.
using blender::uint4 = typedef vec_base<uint32_t, 4> |
Definition at line 576 of file BLI_math_vec_types.hh.
using blender::ushort2 = typedef vec_base<uint16_t, 2> |
Definition at line 578 of file BLI_math_vec_types.hh.
|
strong |
CPP based color structures.
Strongly typed color storage structures with space and alpha association. Will increase readability and visibility of typical mistakes when working with colors.
The storage structs can hold 4 channels (r, g, b and a).
Usage:
Convert a theme byte color to a linearrgb premultiplied.
The API is structured to make most use of inlining. Most notable are space conversions done via BLI_color_convert_to*
functions.
BLI_color_convert_to*
methods.encode
and decode
methods.premultiply_alpha
or unpremultiply_alpha
methods.Color encoding is used to store colors with less precision as in using uint8_t
in stead of float
. This encoding is supported for eSpace::SceneLinear
. To make this clear to the developer the eSpace::SceneLinearByteEncoded
space is added.
Colors can be stored using uint8_t
or float
colors. The conversion between the two precisions are available as methods. (to_4b
and to_4f
).
Alpha conversion is only supported in SceneLinear space.
Extending this file:
ColorHex/Hsl/Hsv
for different representations of rgb based colors. ColorHsl4f<eSpace::SceneLinear, eAlpha::Premultiplied>
Enumerator | |
---|---|
Straight | Color and alpha are unassociated. |
Premultiplied | Color and alpha are associated. |
Definition at line 63 of file BLI_color.hh.
|
strong |
Enumeration containing internal spaces.
Definition at line 72 of file BLI_color.hh.
Returns true if the value is different and was assigned.
Definition at line 570 of file BLI_memory_utils.hh.
Referenced by blender::eevee::Film::init(), blender::eevee::World::sync(), and IMAGE_InstanceData::update_gpu_texture_allocations().
BLI_INLINE ColorSceneLinear4f<eAlpha::Straight> blender::BLI_color_convert_to_scene_linear | ( | const ColorTheme4b & | theme4b | ) |
Definition at line 320 of file BLI_color.hh.
References srgb_to_linearrgb_uchar4().
BLI_INLINE ColorSceneLinear4f<eAlpha::Straight> blender::BLI_color_convert_to_scene_linear | ( | const ColorTheme4f & | theme4f | ) |
Definition at line 312 of file BLI_color.hh.
References srgb_to_linearrgb_v4().
Referenced by blender::tests::TEST().
BLI_INLINE ColorTheme4b blender::BLI_color_convert_to_theme4b | ( | const ColorSceneLinear4f< eAlpha::Straight > & | scene_linear | ) |
Definition at line 337 of file BLI_color.hh.
References linearrgb_to_srgb_uchar4().
BLI_INLINE ColorTheme4b blender::BLI_color_convert_to_theme4b | ( | const ColorTheme4< float > & | srgb4f | ) |
Definition at line 298 of file BLI_color.hh.
References rgba_float_to_uchar().
Referenced by blender::tests::TEST(), and blender::ColorTheme4< ChannelStorageType >::to_4b().
BLI_INLINE ColorTheme4f blender::BLI_color_convert_to_theme4f | ( | const ColorSceneLinear4f< eAlpha::Straight > & | scene_linear | ) |
Definition at line 329 of file BLI_color.hh.
References linearrgb_to_srgb_v4().
BLI_INLINE ColorTheme4<float> blender::BLI_color_convert_to_theme4f | ( | const ColorTheme4< uint8_t > & | srgb4b | ) |
Referenced by blender::tests::TEST(), and blender::ColorTheme4< ChannelStorageType >::to_4f().
BLI_INLINE ColorTheme4f blender::BLI_color_convert_to_theme4f | ( | const ColorTheme4b & | theme4b | ) |
Definition at line 305 of file BLI_color.hh.
References rgba_uchar_to_float().
|
inlineconstexpr |
Definition at line 56 of file BLI_hash_tables.hh.
References BLI_assert, x, and y.
Referenced by ceil_division_by_fraction().
|
inlineconstexpr |
Definition at line 70 of file BLI_hash_tables.hh.
References ceil_division(), and x.
Referenced by total_slot_amount_for_usable_slots().
Container& blender::copy_assign_container | ( | Container & | dst, |
const Container & | src | ||
) |
This can be used by containers to implement an exception-safe copy-assignment-operator. It assumes that the container has an exception safe copy constructor and an exception-safe move-assignment-operator.
Definition at line 527 of file BLI_memory_utils.hh.
References src.
Referenced by blender::Array< T, InlineBufferCapacity, Allocator >::operator=(), blender::GArray< Allocator >::operator=(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator=(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator=(), blender::Stack< T, InlineBufferCapacity, Allocator >::operator=(), blender::Vector< T, InlineBufferCapacity, Allocator >::operator=(), and blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator=().
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 76 of file BLI_memory_utils.hh.
References BLI_assert, destruct_n(), ptr, and T.
Referenced by blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::tests::TEST().
|
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 517 of file BLI_memory_utils.hh.
Call the destructor on n consecutive values. For trivially destructible types, this does nothing.
Exception Safety: Destructors shouldn't throw exceptions.
Before: ptr: initialized After: ptr: uninitialized
Definition at line 47 of file BLI_memory_utils.hh.
References BLI_assert, and ptr.
Referenced by blender::Vector< T, InlineBufferCapacity, Allocator >::clear(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear_and_make_inline(), default_construct_n(), blender::modifiers::geometry_nodes::GeometryNodesEvaluator::destruct_node_state(), blender::fn::materialize_detail::execute_materialized(), initialized_relocate_n(), blender::Vector< T, InlineBufferCapacity, Allocator >::insert(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::Vector< T, InlineBufferCapacity, Allocator >::remove(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::tests::TEST(), uninitialized_convert_n(), uninitialized_copy_n(), uninitialized_fill_n(), uninitialized_move_n(), uninitialized_relocate_n(), blender::Array< T, InlineBufferCapacity, Allocator >::~Array(), blender::Vector< T, InlineBufferCapacity, Allocator >::~Vector(), and blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::~VectorSet().
|
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 290 of file BLI_devirtualize_parameters.hh.
References blender::devirtualize_parameters::Single, and blender::devirtualize_parameters::Span.
Referenced by blender::nodes::SeparateRGBAFunction::call(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::nodes::node_shader_sepcomb_xyz_cc::MF_SeparateXYZ::call(), blender::bke::copy_indices_to_offset_ranges(), blender::geometry::copy_with_map(), blender::nodes::node_geo_set_position_cc::set_computed_position_and_offset(), and blender::ed::curves::varray_contains_nonzero().
|
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 310 of file BLI_devirtualize_parameters.hh.
References blender::devirtualize_parameters::Single, and blender::devirtualize_parameters::Span.
Referenced by blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::get_varray_for_context(), and blender::nodes::node_geo_set_position_cc::set_computed_position_and_offset().
|
inlineconstexpr |
Definition at line 63 of file BLI_hash_tables.hh.
References BLI_assert, x, and y.
|
inlineconstexpr |
Definition at line 79 of file BLI_hash_tables.hh.
References x.
Referenced by blender::LoadFactor::compute_total_and_usable_slots().
Definition at line 218 of file BLI_hash.hh.
References v.
Referenced by blender::compositor::NodeOperation::generate_hash(), get_default_hash_2(), get_default_hash_3(), get_default_hash_4(), blender::CPPType::hash(), blender::UserCounter< T >::hash(), blender::fn::FieldNode::hash(), blender::fn::MultiFunction::hash(), blender::ed::spreadsheet::GeometryComponentCacheKey::hash(), blender::fn::CustomMF_Constant< T >::hash(), blender::nodes::node_geo_material_selection_cc::MaterialSelectionFieldInput::hash(), blender::cpp_type_util::hash_cb(), blender::compositor::NodeOperation::hash_param(), blender::DefaultHash< SpreadsheetColumnID >::operator()(), blender::DefaultHash< std::reference_wrapper< T > >::operator()(), blender::DefaultHash< std::shared_ptr< T > >::operator()(), and blender::DefaultHash< std::unique_ptr< T > >::operator()().
uint64_t blender::get_default_hash_2 | ( | const T1 & | v1, |
const T2 & | v2 | ||
) |
Definition at line 223 of file BLI_hash.hh.
References get_default_hash(), v1, and v2.
Referenced by blender::compositor::NodeOperation::generate_hash(), blender::bke::AttributeIDRef::hash(), InstanceReference::hash(), blender::fn::GFieldBase< NodePtr >::hash(), blender::fn::MFDataType::hash(), blender::nodes::DNode::hash(), blender::nodes::DSocket::hash(), blender::bke::AttributeFieldInput::hash(), blender::bke::AnonymousAttributeFieldInput::hash(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::hash(), blender::nodes::node_geo_curve_handle_type_selection_cc::HandleTypeFieldInput::hash(), blender::nodes::node_geo_edge_paths_to_selection_cc::PathToEdgeSelectionFieldInput::hash(), blender::nodes::node_geo_input_curve_handles_cc::HandlePositionFieldInput::hash(), blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsCostFieldInput::hash(), blender::compositor::NodeOperation::hash_params(), and blender::DefaultHash< std::pair< T1, T2 > >::operator()().
uint64_t blender::get_default_hash_3 | ( | const T1 & | v1, |
const T2 & | v2, | ||
const T3 & | v3 | ||
) |
Definition at line 231 of file BLI_hash.hh.
References get_default_hash(), v1, and v2.
Referenced by blender::nodes::node_geo_accumulate_field_cc::TotalFieldInput< T >::hash(), and blender::compositor::NodeOperation::hash_params().
uint64_t blender::get_default_hash_4 | ( | const T1 & | v1, |
const T2 & | v2, | ||
const T3 & | v3, | ||
const T4 & | v4 | ||
) |
Definition at line 240 of file BLI_hash.hh.
References get_default_hash(), v1, and v2.
Referenced by PaintTileKey::hash(), and blender::nodes::node_geo_accumulate_field_cc::AccumulateFieldInput< T >::hash().
Definition at line 165 of file BLI_hash.hh.
References Freestyle::c, hash, and str.
Referenced by blender::DefaultHash< std::string >::operator()(), blender::DefaultHash< StringRef >::operator()(), blender::DefaultHash< StringRefNull >::operator()(), and blender::DefaultHash< std::string_view >::operator()().
int blender::incircle | ( | const double2 & | a, |
const double2 & | b, | ||
const double2 & | c, | ||
const double2 & | d | ||
) |
Definition at line 2467 of file math_boolean.cc.
References Freestyle::a, usdtokens::b(), Freestyle::c, blender::robust_pred::incircle(), and sgn().
Referenced by filtered_incircle< double >().
int blender::incircle_fast | ( | const double2 & | a, |
const double2 & | b, | ||
const double2 & | c, | ||
const double2 & | d | ||
) |
Definition at line 2472 of file math_boolean.cc.
References Freestyle::a, usdtokens::b(), Freestyle::c, blender::robust_pred::incirclefast(), and sgn().
|
constexpr |
Definition at line 305 of file BLI_string_ref.hh.
References blender::StringRefBase::not_found.
Referenced by blender::StringRefBase::find(), blender::StringRefBase::find_first_not_of(), blender::StringRefBase::find_first_of(), blender::StringRefBase::find_last_not_of(), blender::StringRefBase::find_last_of(), and blender::StringRefBase::rfind().
void blender::initialize_pointer_pair | ( | Src1 && | src1, |
Src2 && | src2, | ||
Dst1 * | dst1, | ||
Dst2 * | dst2 | ||
) |
Definition at line 28 of file BLI_map_slots.hh.
Referenced by blender::SimpleMapSlot< Key, Value >::SimpleMapSlot().
Copy n values from src to dst.
Exception Safety: Basic.
Before: src: initialized dst: initialized After: src: initialized dst: initialized
Definition at line 110 of file BLI_memory_utils.hh.
References BLI_assert, and src.
Referenced by blender::fn::MFProcedureBuilder::add_call(), blender::MutableSpan< T >::copy_from(), and blender::VMutableArrayImpl< T >::set_all().
Copy the value to n consecutive elements.
Exception Safety: Basic.
Before: dst: initialized After: dst: initialized
Definition at line 277 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().
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 188 of file BLI_memory_utils.hh.
References BLI_assert, and src.
Referenced by initialized_relocate_n(), and blender::cpp_type_util::move_assign_cb().
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 238 of file BLI_memory_utils.hh.
References BLI_assert, destruct_n(), initialized_move_n(), and src.
int blender::insphere | ( | const double3 & | a, |
const double3 & | b, | ||
const double3 & | c, | ||
const double3 & | d, | ||
const double3 & | e | ||
) |
Definition at line 2487 of file math_boolean.cc.
References Freestyle::a, usdtokens::b(), Freestyle::c, e, blender::robust_pred::insphere(), and sgn().
int blender::insphere_fast | ( | const double3 & | a, |
const double3 & | b, | ||
const double3 & | c, | ||
const double3 & | d, | ||
const double3 & | e | ||
) |
Definition at line 2493 of file math_boolean.cc.
References Freestyle::a, usdtokens::b(), Freestyle::c, e, blender::robust_pred::inspherefast(), and sgn().
Definition at line 31 of file BLI_hash_tables.hh.
References BLI_assert, and x.
Referenced by log2_ceil_constexpr().
Definition at line 43 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().
Definition at line 37 of file BLI_hash_tables.hh.
References BLI_assert, and x.
Referenced by log2_ceil_constexpr().
|
noexcept |
This can be used by containers to implement an exception-safe move-assignment-operator. It assumes that the container has an exception-safe move-constructor and a noexcept constructor tagged with the NoExceptConstructor tag.
Definition at line 544 of file BLI_memory_utils.hh.
References src.
Referenced by blender::Array< T, InlineBufferCapacity, Allocator >::operator=(), blender::GArray< Allocator >::operator=(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator=(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator=(), blender::Stack< T, InlineBufferCapacity, Allocator >::operator=(), blender::Vector< T, InlineBufferCapacity, Allocator >::operator=(), and blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator=().
bool blender::operator!= | ( | const bUUID | uuid1, |
const bUUID | uuid2 | ||
) |
|
constexpr |
Definition at line 625 of file BLI_string_ref.hh.
References Freestyle::a, and usdtokens::b().
Referenced by ccl_try_align().
Adding two #StringRefs will allocate an std::string. This is not efficient, but convenient in most cases.
Definition at line 604 of file BLI_string_ref.hh.
References Freestyle::a, and usdtokens::b().
Definition at line 179 of file uuid.cc.
References bUUID::clock_seq_hi_and_reserved, bUUID::clock_seq_low, bUUID::node, bUUID::time_hi_and_version, bUUID::time_low, and bUUID::time_mid.
Definition at line 630 of file BLI_string_ref.hh.
References Freestyle::a, and usdtokens::b().
std::ostream & blender::operator<< | ( | std::ostream & | stream, |
const eAlpha & | space | ||
) |
Definition at line 7 of file BLI_color.cc.
References Premultiplied, and Straight.
std::ostream & blender::operator<< | ( | std::ostream & | stream, |
const eSpace & | space | ||
) |
Definition at line 22 of file BLI_color.cc.
References SceneLinear, SceneLinearByteEncoded, and Theme.
|
inline |
Definition at line 588 of file BLI_string_ref.hh.
|
inline |
Definition at line 594 of file BLI_string_ref.hh.
References blender::StringRefBase::data(), and blender::StringRefBase::size().
Definition at line 640 of file BLI_string_ref.hh.
References Freestyle::a, and usdtokens::b().
Definition at line 169 of file uuid.cc.
References BLI_uuid_equal().
Definition at line 613 of file BLI_string_ref.hh.
References Freestyle::a, usdtokens::b(), and STREQLEN.
Definition at line 635 of file BLI_string_ref.hh.
References Freestyle::a, and usdtokens::b().
Definition at line 645 of file BLI_string_ref.hh.
References Freestyle::a, and usdtokens::b().
orient2d gives the exact result, using multi-precision arithmetic when result is close to zero. orient3d_fast just uses double arithmetic, so may be wrong if the answer is very close to zero. Similarly, for incircle and incircle_fast.
Definition at line 2457 of file math_boolean.cc.
References Freestyle::a, usdtokens::b(), Freestyle::c, blender::robust_pred::orient2d(), and sgn().
Referenced by filtered_orient2d< double >().
Definition at line 2462 of file math_boolean.cc.
References Freestyle::a, usdtokens::b(), Freestyle::c, blender::robust_pred::orient2dfast(), and sgn().
int blender::orient3d | ( | const double3 & | a, |
const double3 & | b, | ||
const double3 & | c, | ||
const double3 & | d | ||
) |
orient3d gives the exact result, using multi-precision arithmetic when result is close to zero. orient3d_fast just uses double arithmetic, so may be wrong if the answer is very close to zero. Similarly, for insphere and insphere_fast.
Definition at line 2477 of file math_boolean.cc.
References Freestyle::a, usdtokens::b(), Freestyle::c, blender::robust_pred::orient3d(), and sgn().
int blender::orient3d_fast | ( | const double3 & | a, |
const double3 & | b, | ||
const double3 & | c, | ||
const double3 & | d | ||
) |
Definition at line 2482 of file math_boolean.cc.
References Freestyle::a, usdtokens::b(), Freestyle::c, blender::robust_pred::orient3dfast(), and sgn().
void blender::parallel_sort | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end | ||
) |
Definition at line 21 of file BLI_sort.hh.
Referenced by blender::io::obj::OBJMesh::calc_poly_order(), blender::io::obj::geometry_to_blender_objects(), lineart_sort_adjacent_items(), and blender::io::usd::USDStageReader::sort_readers().
void blender::parallel_sort | ( | RandomAccessIterator | begin, |
RandomAccessIterator | end, | ||
const Compare & | comp | ||
) |
Definition at line 26 of file BLI_sort.hh.
Definition at line 50 of file BLI_hash_tables.hh.
References BLI_assert, log2_ceil_constexpr(), and x.
Referenced by total_slot_amount_for_usable_slots().
|
static |
Definition at line 2452 of file math_boolean.cc.
References x.
Referenced by incircle(), incircle_fast(), insphere(), insphere_fast(), orient2d(), orient2d_fast(), orient3d(), and orient3d_fast().
blender::TEST_F | ( | TrackingTest | , |
BKE_tracking_marker_get | |||
) |
Definition at line 32 of file tracking_test.cc.
References BKE_tracking_marker_get(), BKE_tracking_track_free(), EXPECT_EQ(), MovieTrackingMarker::framenr, and MovieTrackingTrack::markers.
blender::TEST_F | ( | TrackingTest | , |
BKE_tracking_marker_get_exact | |||
) |
Definition at line 88 of file tracking_test.cc.
References BKE_tracking_marker_get_exact(), BKE_tracking_track_free(), EXPECT_EQ(), and MovieTrackingMarker::framenr.
blender::TEST_F | ( | TrackingTest | , |
BKE_tracking_marker_get_interpolated | |||
) |
Definition at line 109 of file tracking_test.cc.
References BKE_tracking_marker_get_interpolated(), BKE_tracking_track_free(), EXPECT_EQ(), MovieTrackingMarker::flag, MovieTrackingMarker::framenr, MARKER_DISABLED, MARKER_TRACKED, and MovieTrackingMarker::pos.
|
inlineconstexpr |
Definition at line 87 of file BLI_hash_tables.hh.
References ceil_division_by_fraction(), and power_of_2_max_constexpr().
Referenced by blender::LoadFactor::compute_total_slots().
blender::TRIVIAL_DEFAULT_INT_HASH | ( | int16_t | ) |
blender::TRIVIAL_DEFAULT_INT_HASH | ( | int32_t | ) |
blender::TRIVIAL_DEFAULT_INT_HASH | ( | int64_t | ) |
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.
blender::TRIVIAL_DEFAULT_INT_HASH | ( | uint16_t | ) |
blender::TRIVIAL_DEFAULT_INT_HASH | ( | uint32_t | ) |
blender::TRIVIAL_DEFAULT_INT_HASH | ( | uint64_t | ) |
blender::TRIVIAL_DEFAULT_INT_HASH | ( | uint8_t | ) |
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 160 of file BLI_memory_utils.hh.
References BLI_assert, destruct_n(), and src.
Copy n values from src to dst.
Exception Safety: Strong.
Before: src: initialized dst: uninitialized After: src: initialized dst: initialized
Definition at line 131 of file BLI_memory_utils.hh.
References BLI_assert, destruct_n(), src, and T.
Referenced by blender::LinearAllocator< Allocator >::construct_array_copy(), blender::cpp_type_util::copy_construct_cb(), blender::VectorAdaptor< T >::extend(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend_unchecked(), blender::Vector< T, InlineBufferCapacity, Allocator >::insert(), blender::bke::point_attribute_materialize_to_uninitialized(), blender::Stack< T, InlineBufferCapacity, Allocator >::push_multiple(), blender::tests::TEST(), and blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet().
Copy the value to n consecutive elements.
Exception Safety: Strong.
Before: dst: uninitialized After: dst: initialized
Definition at line 296 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::fn::materialize_detail::execute_materialized(), blender::VArrayImpl_For_Single< T >::materialize_compressed_to_uninitialized(), blender::bke::VArray_For_SplineToPoint< T >::materialize_to_uninitialized(), blender::bke::point_attribute_materialize_to_uninitialized(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::tests::TEST().
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 209 of file BLI_memory_utils.hh.
References BLI_assert, destruct_n(), src, and T.
Referenced by blender::cpp_type_util::move_construct_cb(), and uninitialized_relocate_n().
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 259 of file BLI_memory_utils.hh.
References BLI_assert, destruct_n(), src, and uninitialized_move_n().
Referenced by blender::Array< T, InlineBufferCapacity, Allocator >::Array(), and blender::Vector< T, InlineBufferCapacity, Allocator >::Vector().
Definition at line 13 of file BLI_index_range.cc.
Referenced by bezier_handle_calc_smooth_fcurve(), btCollisionWorldImporter::convertAllObjects(), blender::tests::TEST(), and tridiagonal_solve_with_limits().
|
static |
Definition at line 14 of file BLI_index_range.cc.
|
inlineconstexpr |
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 485 of file BLI_memory_utils.hh.
|
inlineconstexpr |
Same as #std::is_same_v but allows for checking multiple types at the same time.
Definition at line 511 of file BLI_memory_utils.hh.
Referenced by blender::detail::GVArrayAnyExtraInfo::get(), and blender::detail::VArrayAnyExtraInfo< T >::get().
|
inlineconstexpr |
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 495 of file BLI_memory_utils.hh.
|
inlineconstexpr |
Under some circumstances #std::is_trivial_v<T> is false even though we know that the type is actually trivial. Using that extra knowledge allows for some optimizations.
Definition at line 25 of file BLI_memory_utils.hh.
|
inlineconstexpr |
Definition at line 611 of file BLI_generic_virtual_array.hh.
|
inlineconstexpr |
Definition at line 652 of file BLI_generic_virtual_array.hh.
|
inlineconstexpr |
Definition at line 538 of file BLI_virtual_array.hh.
|
inlineconstexpr |
Definition at line 389 of file BLI_virtual_array.hh.
|
inlineconstexpr |
Definition at line 326 of file BLI_virtual_array.hh.
|
inlineconstexpr |
Definition at line 30 of file BLI_memory_utils.hh.
|
inlineconstexpr |
Definition at line 27 of file BLI_memory_utils.hh.
|
inlineconstexpr |
Definition at line 33 of file BLI_memory_utils.hh.
|
staticconstexpr |
Definition at line 1106 of file BLI_virtual_array.hh.
|
staticconstexpr |
Definition at line 1107 of file BLI_virtual_array.hh.
|
staticconstexpr |
Definition at line 1109 of file BLI_virtual_array.hh.
|
staticconstexpr |
Definition at line 1110 of file BLI_virtual_array.hh.