| 824 | template<typename T> |
| 825 | requires std::copy_constructible<T> && std::is_copy_assignable_v<T> |
| 826 | inline void spanFromFixedQueue( |
| 827 | const FixedQueue<T>& q, const T*& p0, std::size_t& n0, const T*& p1, std::size_t& n1) |
| 828 | { |
| 829 | const T* base = q.raw(); |
| 830 | |
| 831 | const std::size_t n = q.size(); |
| 832 | const std::size_t scap = q.storageCapacity(); |
| 833 | const std::size_t i0 = q.frontIndex(); |
| 834 | const std::size_t tail = std::min<std::size_t>(n, scap - i0); |
| 835 | |
| 836 | p0 = base + i0; |
| 837 | n0 = tail; |
| 838 | |
| 839 | p1 = base; |
| 840 | n1 = n - tail; |
| 841 | } |
| 842 | |
| 843 | //-------------------------------------------------------------------------------------------------- |
| 844 | // Downsample helpers |
no test coverage detected