|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
non-value-range-collision get*(..) variant
Support block access
=======================
- Add support for bulk get*(..) and put*(..) operations.
- In case 'T' is Trivially_Copyable, memcpy is used for performance to copy values.
- In case 'T' is an integral, memset is used for performance to remove data.
Support integral types
=======================
- Passing 'nullelem' as 'const T& nullelem' instead of 'std::nullptr'
Support non-value-range-collision get*(..) variant
==================================================
Provide get*(..) variant returning 'bool' to signal clear success
in cases where the 'T' value range doesn't provide a 'failure' value,
i.e. 'nullelem'.
Implementation details
========================
- Remove 'size', as we are required to determine race-free size by R and W position for block access
- Use 'syncWrite' for write-operations (put*), i.e. modifying the writePos.
- Use 'syncRead' for read-operations (get*), i.e. modifying the readPos.
- Reorderd method in order
-- peek, get and put
Test Coverage
================
- test_lfringbuffer01: Trivial + Integral (byte array)
- test_lfringbuffer02: Trivial + !Integral (Integer array)
- test_lfringbuffer03: !Trivial + !Integral (shared_ptr<Integer> array)
- test_lfringbuffer[11-13] covers same order for concurrency tests
All tests cover sequential and bulk/range get and put operations
|