HccnRpingAddTarget
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
☓ |
|
☓ |
|
☓ |
Description
Adds a ping target and establishes RPing communication between the client and target.
The client is the TX NPU, and the target is the RX NPU.
Prototype
1 | HccnResult HccnRpingAddTarget(HccnRpingCtx rpingCtx, uint32_t targetNum, HccnRpingTargetInfo *target) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
rpingCtx |
Input |
RPing object returned by the HccnRpingInit API. |
targetNum |
Input |
Number of target NPUs to be added. The value range is (0, 16]. The value of targetNum cannot exceed the total number of NPUs that participate in the RPing function when HccnRpingInit is called for initialization, that is, the value of npuNum in the HccnRpingInitAttr object. |
target |
Input |
Basic information required for link establishment, including the listening port and address or identifier of the target NPU and the memory size required by the client NPU. For details about the definition of the HccnRpingTargetInfo type, see HccnRpingTargetInfo. |
Returns
Parsing result of the error code of the HccnResult type.
Constraints
- If a target fails to be added, an error is returned. As a result, all targets fail to be added.
- The value of targetNum must be the same as the target array size. Otherwise, out-of-bounds access may occur.
- A maximum of 16 targets can be added at once. If more than 16 targets need to be added, call this API for multiple times.
- After this API is called, if the target is not initialized through HccnRpingInit within 120s, the initialization times out and fails.