Suggestions

  1. Set up the environment: Call aclrtSetDevice(device_id).
  2. Prepare the endpoint description (EndpointDesc).
  3. Perform the following operations on the server:
    1. Construct HixlServerDesc and HixlServerConfig.
    2. Call HixlCSServerCreate to create a HixlServerHandle.
    3. 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.
    4. Call HixlCSServerListen to start listening for connections.
    5. Wait for the client to establish a connection and initiate data transmission.
    6. After the transmission is complete, call HixlCSServerUnregMem to deregister the memory and HixlCSServerDestroy to destroy the service.
  1. Perform the following operations on the client:
    1. Construct HixlClientDesc and HixlClientConfig.
    2. Call HixlCSClientCreate to create HixlClientHandle.
    3. Prepare the local CommMem and register the memory using HixlCSClientRegMem (save the MemHandle).
    4. Call HixlCSClientConnect to establish a link (blocking or waiting until timeout) and ensure that the server is in the listening state.
    5. Call HixlCSClientGetRemoteMem to obtain the memory registered by the server and obtain the remote address for subsequent operations.
    6. Construct a group of HixlOneSideOpDesc (local/remote address and length) and call HixlCSClientBatchPutAsync or HixlCSClientBatchGetAsync to submit asynchronous batch operations.
    7. Poll HixlCSClientQueryCompleteStatus until the status is HIXL_COMPLETE_STATUS_COMPLETED.
    8. Read or verify the memory content as required, and then call HixlCSClientUnregMem to deregister the local memory and HixlCSClientDestroy to destroy the service.