Additional compile-time controls of List behaviour. More...
Classes | |
| struct | short_length |
| Number of items before requiring line-breaks in the list output. More... | |
| struct | no_linebreak |
| Can suppress additional line breaks separate ASCII data content when the data elements are primitives, or contiguous. More... | |
| struct | no_linebreak< keyType > |
| Suppress line-breaks for keyType. More... | |
| struct | no_linebreak< word > |
| Suppress line-breaks for word. More... | |
| struct | no_linebreak< wordRe > |
| Suppress line-breaks for wordRe. More... | |
Enumerations | |
| enum | uniformity : unsigned char { EMPTY = 0 , UNIFORM = 0x1 , NONUNIFORM = 0x2 , MIXED = 0x3 } |
Classification of list/container uniformity. The values can be used with bit-wise or reduction. More... | |
Functions | |
| template<class T> | |
| constexpr bool | is_aligned_type () noexcept |
| Consider aligned allocation for the given type? | |
| template<class IntType> | |
| constexpr bool | use_alignment (IntType n) noexcept |
| True if size exceeds the min-size for using memory alignment. | |
| template<class IntType> | |
| constexpr bool | use_memory_pool (IntType n) noexcept |
| True if size exceeds the min-size for using the memory pool. | |
| template<class IntType> | |
| constexpr bool | use_offload (IntType n) noexcept |
| True if size exceeds the min-size for offloading. | |
| constexpr std::align_val_t | default_alignment () noexcept |
| Default alignment for larger fields. | |
| template<class T, class IntType> | |
| T * | allocate (IntType n) |
| Allocate from memory pool (if active), or aligned, or normal. | |
| template<class T, class IntType> | |
| void | deallocate (T *ptr) |
| Deallocate from memory pool, or normal. | |
| template<class T, class IntType> | |
| void | deallocate (T *ptr, IntType n) |
| Deallocate from memory pool, or aligned, or normal. | |
| template<int SizeMin, int Numerator, class IntType> | |
| IntType | reserve_size (IntType requested, IntType capacity) noexcept |
| Calculate a reserve size (eg, doubling) based on the requested length and the current capacity. | |
| template<int SizeMin, int Numerator, int Denominator, class IntType> | |
| IntType | reserve_size (IntType requested, IntType capacity) noexcept |
| Calculate a reserve size based on the requested length and the current capacity. | |
| template<class InputIt> | |
| enum uniformity | check_uniformity (InputIt first, InputIt last) |
| Algorithm to determine list/container uniformity. | |
Additional compile-time controls of List behaviour.
| enum uniformity : unsigned char |
Classification of list/container uniformity. The values can be used with bit-wise or reduction.
| Enumerator | |
|---|---|
| EMPTY | An empty container. |
| UNIFORM | Container (non-empty) with identical values. |
| NONUNIFORM | Container (non-empty) with different values. |
| MIXED | Mixed uniform/non-uniform (eg, after reduction). |
Definition at line 353 of file ListPolicy.H.
|
inlineconstexprnoexcept |
Consider aligned allocation for the given type?
Benefits for field data (floating-point, ints, vectorspace), but avoid for char data, strings, pointers etc
Definition at line 134 of file ListPolicy.H.
References Foam::is_contiguous_v, Foam::noexcept, and Foam::T().
Referenced by allocate(), deallocate(), and deallocate().


|
inlineconstexprnoexcept |
True if size exceeds the min-size for using memory alignment.
Definition at line 151 of file ListPolicy.H.
References n.
Referenced by allocate(), and deallocate().

|
inlineconstexprnoexcept |
True if size exceeds the min-size for using the memory pool.
Definition at line 161 of file ListPolicy.H.
References n.
Referenced by allocate().

|
inlineconstexprnoexcept |
True if size exceeds the min-size for offloading.
Definition at line 171 of file ListPolicy.H.
References n.
|
inlineconstexprnoexcept |
Default alignment for larger fields.
Definition at line 180 of file ListPolicy.H.
References Foam::noexcept.
Referenced by allocate(), and deallocate().

Allocate from memory pool (if active), or aligned, or normal.
Definition at line 190 of file ListPolicy.H.
References default_alignment(), is_aligned_type(), n, Foam::T(), MemoryPool::try_allocate(), use_alignment(), and use_memory_pool().
Referenced by List< T >::resize_copy().


Deallocate from memory pool, or normal.
Definition at line 236 of file ListPolicy.H.
References is_aligned_type(), Foam::T(), and MemoryPool::try_deallocate().
Referenced by List< T >::clear(), Matrix< Form, Type >::clear(), List< T >::resize_copy(), and List< T >::~List().


Deallocate from memory pool, or aligned, or normal.
Definition at line 258 of file ListPolicy.H.
References default_alignment(), is_aligned_type(), n, Foam::T(), MemoryPool::try_deallocate(), and use_alignment().

|
inlinenoexcept |
Calculate a reserve size (eg, doubling) based on the requested length and the current capacity.
Definition at line 293 of file ListPolicy.H.
Referenced by PtrDynList< T, SizeMin >::reserve().

|
inlinenoexcept |
Calculate a reserve size based on the requested length and the current capacity.
Definition at line 321 of file ListPolicy.H.
| enum uniformity check_uniformity | ( | InputIt | first, |
| InputIt | last ) |
Algorithm to determine list/container uniformity.
Definition at line 365 of file ListPolicy.H.
References EMPTY, NONUNIFORM, and UNIFORM.
Referenced by exprValueFieldTag::set().
