MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
mxl::lib::fabrics::ofi::FabricInterfaceList Class Reference

#include <FabricInterfaceList.hpp>

Public Member Functions

void clear ()
 FabricInterfaceList ()
void push (FabricInterfaceDescription iface)
::mxlFabricsInterfaceList * toRawLinkedList () noexcept

Static Public Member Functions

static void freeRawLinkedList (::mxlFabricsInterfaceList *) noexcept

Private Attributes

std::vector< FabricInterfaceDescription > _interfaces

Detailed Description

Collects FabricInterfaceDescription entries discovered during interface probing and converts them to the heap-allocated mxlFabricsInterfaceList linked list returned by the public C API.

Definition at line 15 of file FabricInterfaceList.hpp.

Constructor & Destructor Documentation

◆ FabricInterfaceList()

mxl::lib::fabrics::ofi::FabricInterfaceList::FabricInterfaceList ( )
default

Member Function Documentation

◆ clear()

void mxl::lib::fabrics::ofi::FabricInterfaceList::clear ( )

Remove all collected interface descriptions.

Definition at line 16 of file FabricInterfaceList.cpp.

17 {
18 _interfaces.clear();
19 }
std::vector< FabricInterfaceDescription > _interfaces

◆ freeRawLinkedList()

void mxl::lib::fabrics::ofi::FabricInterfaceList::freeRawLinkedList ( ::mxlFabricsInterfaceList * list)
staticnoexcept

Free an entire linked list previously created by toRawLinkedList().

Definition at line 32 of file FabricInterfaceList.cpp.

33 {
34 while (list)
35 {
37 }
38 }
::mxlFabricsInterfaceList * freeRawLinkedListNode(::mxlFabricsInterfaceList *)

◆ push()

void mxl::lib::fabrics::ofi::FabricInterfaceList::push ( FabricInterfaceDescription iface)

Append an interface description to the list.

Definition at line 11 of file FabricInterfaceList.cpp.

12 {
13 _interfaces.push_back(std::move(iface));
14 }

◆ toRawLinkedList()

mxlFabricsInterfaceList * mxl::lib::fabrics::ofi::FabricInterfaceList::toRawLinkedList ( )
nodiscardnoexcept

Convert the collected descriptions into a heap-allocated mxlFabricsInterfaceList linked list. Ownership of the returned list transfers to the caller; free with freeRawLinkedList().

Definition at line 21 of file FabricInterfaceList.cpp.

22 {
23 auto previousNode = std::add_pointer_t<::mxlFabricsInterfaceList>{nullptr};
24 for (auto& _interface : std::ranges::reverse_view(_interfaces))
25 {
26 previousNode = _interface.toRawLinkedListNode(previousNode);
27 }
28
29 return previousNode;
30 }

Member Data Documentation

◆ _interfaces

std::vector<FabricInterfaceDescription> mxl::lib::fabrics::ofi::FabricInterfaceList::_interfaces
private

Definition at line 37 of file FabricInterfaceList.hpp.


The documentation for this class was generated from the following files: