HIXL Data Structures
MemDesc
Represents the memory description.
1 2 3 4 5 | struct MemDesc { uintptr_t addr; size_t len; uint8_t reserved[128] = {}; } |
AsyncConnectStatus
Represents the status of asynchronous link establishment or disconnection.
1 2 3 4 5 6 7 8 9 | enum class AsyncConnectStatus { NOT_CONNECT, // not connected CONNECT_PENDING, // link establishment to be executed CONNECTING, // link establishment in progress CONNECTED, // link established successfully CONNECT_FAILED, // link establishment failed DISCONNECT_PENDING, // disconnection to be executed DISCONNECTING // disconnection in progress }; |
TransferOp
Represents the type of the transmission operation.
1 2 3 4 | enum TransferOp { READ, WRITE } |
TransferOpDesc
Represents the transmission operation description.
1 2 3 4 5 | struct TransferOpDesc { uintptr_t local_addr; uintptr_t remote_addr; size_t len; } |
TransferArgs
Represents the optional parameters of the transmission operation.
1 2 3 4 | struct TransferArgs { const void *user_data = nullptr; // user-defined information, which must be used together with the API for obtaining the status of all asynchronous transmission requests. uint8_t reserved[120] = {}; // reserved parameter }; |
TransferReq
Represents the handle of the transmission request.
1 | using TransferReq = void *; |
TransferStatus
Represents the asynchronous transmission status.
1 2 3 4 5 6 | enum class TransferStatus { WAITING, COMPLETED, TIMEOUT, // Not supported currently FAILED }; |
GetTransferStatusArgs
Represents the parameters for obtaining the status of all asynchronous transmission requests.
1 2 3 4 5 | struct GetTransferStatusArgs { uint32_t max_query_count = UINT32_MAX; // Maximum number of transmission request statuses that can be queried. bool skip_waiting = false; // Query whether to skip the transmission requests in the TransferStatus::WAITING state. uint8_t reserved[123] = {}; // Reserved parameter }; |
TransferResult
Represents the result of each request when the status of all asynchronous transmission requests is obtained.
1 2 3 4 5 6 | struct TransferResult { TransferReq req = nullptr; // Handle of the transmission request const void *user_data = nullptr; // User-defined information TransferStatus status = TransferStatus::WAITING; // Transmission request status uint8_t reserved[108] = {}; // Reserved parameter }; |
NotifyDesc
Represents the Notify description.
1 2 3 4 | struct NotifyDesc { AscendString name; AscendString notify_msg; } |
FeatureType
Represents the library capability feature type, which is used for query through the GetCapability API. The enumerated values must be explicitly assigned. New capabilities can only be added at the end.
1 2 3 4 | enum FeatureType : int32_t { AUTO_CONNECT = 0, CLIENT_SERVER_COMM = 1, } |
Enumerated Value |
Description |
|---|---|
AUTO_CONNECT |
Auto Connect mode, corresponding to the OPTION_AUTO_CONNECT option of Initialize. |
CLIENT_SERVER_COMM |
Client/Server communication mode, in which the server listens on the port and the client initiates a link establishment request. |
FEATURE_SUPPORTED/FEATURE_NOT_SUPPORTED
Represents the constant value of the output parameter value of the GetCapability API.
1 2 | constexpr int32_t FEATURE_SUPPORTED = 1; constexpr int32_t FEATURE_NOT_SUPPORTED = 0; |