MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
FabricInterfaceList.cpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2026 Contributors to the Media eXchange Layer project.
2
// SPDX-License-Identifier: Apache-2.0
3
#include "
FabricInterfaceList.hpp
"
4
#include <ranges>
5
#include <utility>
6
7
namespace
mxl::lib::fabrics::ofi
8
{
9
FabricInterfaceList::FabricInterfaceList
() =
default
;
10
11
void
FabricInterfaceList::push
(
FabricInterfaceDescription
iface)
12
{
13
_interfaces
.push_back(std::move(iface));
14
}
15
16
void
FabricInterfaceList::clear
()
17
{
18
_interfaces
.clear();
19
}
20
21
::mxlFabricsInterfaceList
*
FabricInterfaceList::toRawLinkedList
() noexcept
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
}
31
32
void
FabricInterfaceList::freeRawLinkedList
(
::mxlFabricsInterfaceList
* list)
noexcept
33
{
34
while
(list)
35
{
36
list =
FabricInterfaceDescription::freeRawLinkedListNode
(list);
37
}
38
}
39
}
FabricInterfaceList.hpp
mxl::lib::fabrics::ofi::FabricInterfaceDescription
Definition
FabricInterfaceDescription.hpp:18
mxl::lib::fabrics::ofi::FabricInterfaceDescription::freeRawLinkedListNode
::mxlFabricsInterfaceList * freeRawLinkedListNode(::mxlFabricsInterfaceList *)
Definition
FabricInterfaceDescription.cpp:194
mxl::lib::fabrics::ofi::FabricInterfaceList::_interfaces
std::vector< FabricInterfaceDescription > _interfaces
Definition
FabricInterfaceList.hpp:37
mxl::lib::fabrics::ofi::FabricInterfaceList::toRawLinkedList
::mxlFabricsInterfaceList * toRawLinkedList() noexcept
Definition
FabricInterfaceList.cpp:21
mxl::lib::fabrics::ofi::FabricInterfaceList::clear
void clear()
Definition
FabricInterfaceList.cpp:16
mxl::lib::fabrics::ofi::FabricInterfaceList::push
void push(FabricInterfaceDescription iface)
Definition
FabricInterfaceList.cpp:11
mxl::lib::fabrics::ofi::FabricInterfaceList::FabricInterfaceList
FabricInterfaceList()
mxl::lib::fabrics::ofi::FabricInterfaceList::freeRawLinkedList
static void freeRawLinkedList(::mxlFabricsInterfaceList *) noexcept
Definition
FabricInterfaceList.cpp:32
mxlFabricsInterfaceList
struct mxlFabricsInterfaceList_t mxlFabricsInterfaceList
Definition
fabrics.h:116
mxl::lib::fabrics::ofi
Definition
fabrics.cpp:33
lib
fabrics
ofi
src
internal
FabricInterfaceList.cpp
Generated by
1.15.0