Home
libucxx
libucxx
ucxx
nightly (0.53)
nightly (0.53)
stable (0.52)
legacy (0.51)
Toggle main menu visibility
Loading...
Searching...
No Matches
include
ucxx
tag_probe.h
1
5
#pragma once
6
7
#include <atomic>
8
#include <memory>
9
#include <optional>
10
11
#include <ucp/api/ucp.h>
12
#include <ucxx/tag_probe_builder.h>
13
#include <ucxx/typedefs.h>
14
15
namespace
ucxx
{
16
17
namespace
detail {
18
class
ConstructorFactory;
19
}
20
21
// Forward declaration for friend access
22
class
RequestTag
;
23
class
TagProbeInfo
;
24
31
class
TagRecvInfo
{
32
public
:
33
const
Tag
senderTag
;
34
const
size_t
length
;
35
39
TagRecvInfo
() :
senderTag
(
Tag
(0)),
length
(0) {}
40
47
explicit
TagRecvInfo
(
const
ucp_tag_recv_info_t& info);
48
};
49
65
class
TagProbeInfo {
66
public
:
67
TagProbeInfo(
const
TagProbeInfo&) =
delete
;
68
TagProbeInfo& operator=(TagProbeInfo
const
&) =
delete
;
69
TagProbeInfo(TagProbeInfo&& o) =
delete
;
70
TagProbeInfo& operator=(TagProbeInfo&& o) =
delete
;
71
72
~TagProbeInfo();
73
79
bool
isMatched
()
const
;
80
87
const
TagRecvInfo
&
getInfo
()
const
;
88
95
ucp_tag_message_h
getHandle
()
const
;
96
107
ucp_tag_message_h
releaseHandle
()
const
;
108
109
private
:
110
const
bool
_matched{
false
};
111
const
std::optional<TagRecvInfo> _info{
112
std::nullopt};
113
const
ucp_tag_message_h _handle{
114
nullptr
};
116
mutable
std::atomic<bool> _consumed{
false
};
117
124
void
consume()
const
;
125
139
TagProbeInfo() =
default
;
140
158
TagProbeInfo(
const
ucp_tag_recv_info_t& info, ucp_tag_message_h handle);
159
160
// Allow internal construction without exposing factory functions.
161
friend
class
detail::ConstructorFactory;
162
163
// Allow RequestTag to consume the handle
164
friend
class
RequestTag;
165
};
166
167
}
// namespace ucxx
ucxx::RequestTag
Send or receive a message with the UCX Tag API.
Definition
request_tag.h:25
ucxx::TagProbeInfo
Information about probed tag message.
Definition
tag_probe.h:65
ucxx::TagProbeInfo::releaseHandle
ucp_tag_message_h releaseHandle() const
Release the message handle.
ucxx::TagProbeInfo::isMatched
bool isMatched() const
Check if a message was matched.
ucxx::TagProbeInfo::getHandle
ucp_tag_message_h getHandle() const
Get the message handle.
ucxx::TagProbeInfo::getInfo
const TagRecvInfo & getInfo() const
Get tag receive information.
ucxx::TagRecvInfo
Information about probed tag message.
Definition
tag_probe.h:31
ucxx::TagRecvInfo::TagRecvInfo
TagRecvInfo(const ucp_tag_recv_info_t &info)
Construct a TagRecvInfo object from a UCP tag receive info structure.
ucxx::TagRecvInfo::TagRecvInfo
TagRecvInfo()
Default constructor for TagRecvInfo.
Definition
tag_probe.h:39
ucxx::TagRecvInfo::length
const size_t length
The size of the received data.
Definition
tag_probe.h:34
ucxx::TagRecvInfo::senderTag
const Tag senderTag
Sender tag.
Definition
tag_probe.h:33
ucxx
Definition
address.h:16
ucxx::Tag
Tag
Strong type for a UCP tag.
Definition
typedefs.h:66
Generated by
1.18.0