Files
openfoam/applications/test/CircularBuffer
Mark Olesen b8a0706e72 ENH: add ListPolicy::reserve_size() helper (related to #3348)
- central way to calculate reverse sizes for dynamic containers.

  For example;
      reserve_size<16, 2>(len, cap);     // min-size=16, ratio=2
      reserve_size<16, 3, 2>(len, cap);  // min-size=16, ratio=1.5

  replaces this type of code that was used in several places:
      max(SizeMin, max(len, label(2*capacity_)));

  The caller will have already checked (len < cap) before deciding
  to make this call.

ENH: updates for DynamicList/DynamicField handling

- add reserve_exact() method, which is like reserve() but without any
  extra sizing heuristics

- add DynamicField 'reuse' constructors, consistent with Field constructors

- sync allocated size before list destruction.
  This may help when using aligned allocation strategies.
2025-04-09 08:10:48 +02:00
..