34 #ifndef Foam_ListPolicy_H 35 #define Foam_ListPolicy_H 117 && !std::is_pointer_v<T>
118 && !std::is_union_v<T>
120 && is_contiguous_v<T>
126 template<
class IntType>
129 return (
n >= IntType(200));
134 template<
class IntType>
137 return (
n >= IntType(3000));
142 template<
class IntType>
145 return (
n >= IntType(1000));
149 template<
class T,
class IntType>
157 template<
class T,
class IntType>
165 template<
class T,
class IntType>
166 inline void deallocate(
T* ptr, [[maybe_unused]] IntType
n)
177 template<
int SizeMin,
int Numerator,
class IntType>
180 static_assert(Numerator > 1,
"Invalid numerator");
185 IntType size(capacity*Numerator);
186 if (size < requested)
190 if constexpr (SizeMin > 0)
203 template<
int SizeMin,
int Numerator,
int Denominator,
class IntType>
206 static_assert(Numerator > Denominator,
"Invalid numerator");
207 static_assert(Denominator > 0,
"Invalid denominator");
214 IntType size((capacity/Denominator)*Numerator);
215 if (size < requested)
219 if constexpr (SizeMin > 0)
243 template<
class InputIt>
251 const auto& elem0 = *first;
253 for ((
void)++first; (first != last); (void)++first)
A class for handling keywords in dictionaries.
constexpr bool use_memory_pool(IntType n) noexcept
True if size exceeds the min-size for using the memory pool.
enum uniformity check_uniformity(InputIt first, InputIt last)
Algorithm to determine list/container uniformity.
constexpr bool use_offload(IntType n) noexcept
True if size exceeds the min-size for offloading.
IntType reserve_size(IntType requested, IntType capacity) noexcept
Calculate a reserve size (eg, doubling) based on the requested length and the current capacity...
constexpr bool use_alignment(IntType n) noexcept
True if size exceeds the min-size for using memory alignment.
A class for handling words, derived from Foam::string.
Container (non-empty) with identical values.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings...
Container (non-empty) with different values.
constexpr bool is_aligned_type() noexcept
Consider aligned allocation for the given type?
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Mixed uniform/non-uniform (eg, after reduction)
Number of items before requiring line-breaks in the list output.
uniformity
Classification of list/container uniformity. The values can be used with bit-wise or reduction...
Can suppress additional line breaks separate ASCII data content when the data elements are primitives...