MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
TargetInfo.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Contributors to the Media eXchange Layer project.
2//
3// SPDX-License-Identifier: Apache-2.0
4
5#pragma once
6
7#include <optional>
8#include "mxl/fabrics.h"
9#include "Address.hpp"
10#include "Endpoint.hpp"
11#include "RemoteRegion.hpp"
12
14{
15
19 {
20 std::size_t entryCount;
21 std::size_t entrySize;
22 };
23
29 {
30 public:
33 [[nodiscard]]
34 static TargetInfo* fromAPI(mxlFabricsTargetInfo api) noexcept;
35
38 [[nodiscard]]
40
43 [[nodiscard]]
44 std::string toJSON() const;
45
48 [[nodiscard]]
49 static TargetInfo fromJSON(std::string const& s);
50
51 bool operator==(TargetInfo const& other) const noexcept;
52
53 public:
57 std::vector<RemoteRegion>
59 std::optional<TargetInfoBounceBufferInfo> bounceBufferInfo;
60 };
61}
std::uintptr_t Id
An id type that can be used to reference this endpoint from completions and events.
Definition Endpoint.hpp:38
Wrapper around a libfabric endpoint address.
Definition Address.hpp:20
struct mxlFabricsTargetInfo_t * mxlFabricsTargetInfo
Definition fabrics.h:39
Provider
Internal representation of supported libfabric providers.
Definition Provider.hpp:17
Information about the bounce buffer on the target, if the target uses one.
TargetInfo contains all the information required by an initiator to operate transfers to the given ta...
std::vector< RemoteRegion > remoteRegions
std::optional< TargetInfoBounceBufferInfo > bounceBufferInfo
static TargetInfo fromJSON(std::string const &s)
Construct a TargetInfo instance from a JSON representation.
std::string toJSON() const
Serialize a TargetInfo instance to a JSON representation.
::mxlFabricsTargetInfo toAPI() noexcept
Cast a pointer to a TargetInfo instance to an mxlFabricsTargetInfo opaque pointer.
static TargetInfo * fromAPI(mxlFabricsTargetInfo api) noexcept
Cast an mxlFabricsTargetInfo opaque pointer to a TargetInfo pointer.
bool operator==(TargetInfo const &other) const noexcept