Suggestions
- Set up the environment: Call aclrtSetDevice(device_id).
- Prepare the endpoint description (EndpointDesc).
- Perform the following operations on the server:
- Construct HixlServerDesc and HixlServerConfig.
- Call HixlCSServerCreate to create a HixlServerHandle.
- Allocate and prepare the CommMem (host/device memory) to be accessed by the remote end. Call HixlCSServerRegMem to register the memory and save the returned MemHandle.
- Call HixlCSServerListen to start listening for connections.
- Wait for the client to establish a connection and initiate data transmission.
- After the transmission is complete, call HixlCSServerUnregMem to deregister the memory and HixlCSServerDestroy to destroy the service.
- Perform the following operations on the client:
- Construct HixlClientDesc and HixlClientConfig.
- Call HixlCSClientCreate to create HixlClientHandle.
- Prepare the local CommMem and register the memory using HixlCSClientRegMem (save the MemHandle).
- Call HixlCSClientConnect to establish a link (blocking or waiting until timeout) and ensure that the server is in the listening state.
- Call HixlCSClientGetRemoteMem to obtain the memory registered by the server and obtain the remote address for subsequent operations.
- Construct a group of HixlOneSideOpDesc (local/remote address and length) and call HixlCSClientBatchPutAsync or HixlCSClientBatchGetAsync to submit asynchronous batch operations.
- Poll HixlCSClientQueryCompleteStatus until the status is HIXL_COMPLETE_STATUS_COMPLETED.
- Read or verify the memory content as required, and then call HixlCSClientUnregMem to deregister the local memory and HixlCSClientDestroy to destroy the service.
Parent topic: HIXL CS APIs