MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
QueueHelpers.hpp File Reference
#include <chrono>
#include <optional>
#include <utility>
#include <fmt/base.h>
#include <fmt/color.h>
#include <mxl-internal/Logging.hpp>
#include <rdma/fi_errno.h>
#include "Completion.hpp"
#include "Endpoint.hpp"
#include "Event.hpp"
#include "EventQueue.hpp"
#include "Exception.hpp"
Include dependency graph for QueueHelpers.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  mxl
namespace  mxl::lib
namespace  mxl::lib::fabrics
namespace  mxl::lib::fabrics::ofi

Enumerations

enum class  mxl::lib::fabrics::ofi::QueueReadMode { mxl::lib::fabrics::ofi::Blocking , mxl::lib::fabrics::ofi::NonBlocking }
 Enum to select blocking or non-blocking queue read behaviour. More...

Functions

void mxl::lib::fabrics::ofi::drainEventQueue (EventQueue &eq)
 Read all entries from a connectionless endpoint's event queue and log the errors among them.
template<QueueReadMode qrm>
std::optional< Completion > mxl::lib::fabrics::ofi::readCompletionQueue (CompletionQueue &eq, std::chrono::steady_clock::duration timeout)
 Helper to read a completion queue with blocking or non-blocking behaviour.
template<QueueReadMode qrm>
std::pair< std::optional< Completion >, std::optional< Event > > mxl::lib::fabrics::ofi::readEndpointQueues (Endpoint &ep, std::chrono::steady_clock::duration timeout)
 Helper to read both completion and event queues of an endpoint with blocking or non-blocking behaviour.
template<QueueReadMode qrm>
std::optional< Event > mxl::lib::fabrics::ofi::readEventQueue (EventQueue &eq, std::chrono::steady_clock::duration timeout)
 Helper to read an event queue with blocking or non-blocking behaviour.