.. _program_listing_file_BackendLibfabric_Buffer.cpp: Program Listing for File Buffer.cpp =================================== |exhale_lsh| :ref:`Return to documentation for file ` (``BackendLibfabric/Buffer.cpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #include "Buffer.hpp" #include std::vector netio3::libfabric::HeaderBuffer::get_pending_sends() { std::set indices{}; std::ranges::generate_n(std::inserter(indices, indices.end()), ZERO_COPY_NUM_HEADER_SLOTS, [i = 0]() mutable { return i++; }); std::size_t index_available{}; while(m_available_header_buffers.try_pop(index_available)) { indices.erase(index_available); } std::vector keys{}; std::ranges::transform( indices, std::back_inserter(keys), [this](std::size_t index_not_available) { return m_keys[index_not_available]; }); return keys; }