|
CIRCT 24.0.0git
|


Public Member Functions | |
| SerialCoordInput () | |
| void | yTranslation (uint32_t yTrans) |
| uint32_t | yTranslation () const |
| void | xTranslation (uint32_t xTrans) |
| uint32_t | xTranslation () const |
| void | appendCoord (uint32_t x, uint32_t y) |
| const std::vector< SerialCoordData > & | getCoords () const |
| size_t | numSegments () const override |
| Number of segments in the message. | |
| Segment | segment (size_t idx) const override |
| Get a segment by index. Throws if the segment has been take()n. | |
| SerialCoordInput (uint32_t xTrans, uint32_t yTrans, std::vector< SerialCoordData > &coords, services::HostMemAllocator *allocator=nullptr) | |
| size_t | numSegments () const override |
| Number of segments in the message. | |
| Segment | segment (size_t idx) const override |
| Get a segment by index. Throws if the segment has been take()n. | |
| std::unique_ptr< services::HostMemRegion > | take (size_t segIdx) override |
| Optionally called by a backend once it has transmitted segment segIdx, to obtain ownership of the HostMem region backing it (e.g. | |
| Public Member Functions inherited from esi::SegmentedMessageData | |
| virtual | ~SegmentedMessageData ()=default |
| size_t | totalSize () const |
| Total size across all segments. | |
| bool | empty () const |
| True if totalSize() == 0. | |
| virtual MessageData | toMessageData () const |
| Flatten all segments into a standard MessageData. | |
Private Attributes | |
| SerialCoordHeader | header |
| std::vector< SerialCoordData > | coords |
| SerialCoordHeader | footer |
| bool | coordsInRegion = false |
| std::unique_ptr< services::HostMemRegion > | coordsRegion |
| size_t | coordsBytes |
Definition at line 2228 of file esitester.cpp.
|
inline |
Definition at line 2235 of file esitester.cpp.
|
inline |
Definition at line 196 of file loopback.cpp.
References coords, coordsBytes, coordsInRegion, coordsRegion, footer, header, and if().
|
inline |
Definition at line 2250 of file esitester.cpp.
|
inline |
Definition at line 2254 of file esitester.cpp.
References coords.
|
inlineoverridevirtual |
Number of segments in the message.
Implements esi::SegmentedMessageData.
Definition at line 2256 of file esitester.cpp.
Referenced by take().
|
inlineoverridevirtual |
Number of segments in the message.
Implements esi::SegmentedMessageData.
Definition at line 216 of file loopback.cpp.
|
inlineoverridevirtual |
Get a segment by index. Throws if the segment has been take()n.
Implements esi::SegmentedMessageData.
Definition at line 2257 of file esitester.cpp.
References coords, footer, and header.
Referenced by checkHostMemTake().
|
inlineoverridevirtual |
Get a segment by index. Throws if the segment has been take()n.
Implements esi::SegmentedMessageData.
Definition at line 217 of file loopback.cpp.
References coords, coordsBytes, coordsInRegion, coordsRegion, footer, and header.
|
inlineoverridevirtual |
Optionally called by a backend once it has transmitted segment segIdx, to obtain ownership of the HostMem region backing it (e.g.
to re-use the region or return it to a pool).
Returns nullptr, leaving the segment accessible, if the segment isn't backed by a region or the message doesn't transfer region ownership. Otherwise, marks the segment as taken – after which segment(segIdx) (and thus anything which reads the whole message, such as toMessageData()) and further calls to take(segIdx) throw – and returns the region if no other untaken segment references it, or nullptr if some still do. Since several segments may share a region, a backend which calls take() on each segment as it is transmitted receives each region exactly once, after the last segment using it.
Since SegmentedMessageDataCursor reads segments via segment(), a backend must not take a segment which a cursor over the message can still reach, and must not take a segment it may need to retransmit. Any cursor (including one created after the take()) throws when it reaches a taken segment. Segment copies of a taken segment obtained before the take() are invalid: their data may point into a region which has been re-used.
The default implementation returns nullptr.
Reimplemented from esi::SegmentedMessageData.
Definition at line 234 of file loopback.cpp.
References coordsInRegion, coordsRegion, and numSegments().
Referenced by checkHostMemTake().
|
inline |
Definition at line 2249 of file esitester.cpp.
References header.
|
inline |
Definition at line 2248 of file esitester.cpp.
References header.
|
inline |
Definition at line 2247 of file esitester.cpp.
References header.
|
inline |
Definition at line 2246 of file esitester.cpp.
References header.
|
private |
Definition at line 2231 of file esitester.cpp.
Referenced by appendCoord(), getCoords(), segment(), and SerialCoordInput().
|
private |
Definition at line 193 of file loopback.cpp.
Referenced by segment(), and SerialCoordInput().
|
private |
Definition at line 190 of file loopback.cpp.
Referenced by segment(), SerialCoordInput(), and take().
|
private |
Definition at line 192 of file loopback.cpp.
Referenced by segment(), SerialCoordInput(), and take().
|
private |
Definition at line 2232 of file esitester.cpp.
Referenced by segment(), SerialCoordInput(), and SerialCoordInput().
|
private |
Definition at line 2230 of file esitester.cpp.
Referenced by appendCoord(), segment(), SerialCoordInput(), SerialCoordInput(), xTranslation(), xTranslation(), yTranslation(), and yTranslation().