AdmiTestD2DBandwidth Prototype
Prototype
int32_t AdmiTestD2DBandwidth(int32_t deviceId, const AdmiTestBandwidthOption* option, AdmiD2DBandwidthInfo* testRslt);
Description
Checks the transmission rate and delay from one side to the other side of a specified device.
Parameters
Parameter |
Input/Output |
Type |
Description |
---|---|---|---|
deviceId |
Input |
int32_t |
ID of a specified device. The value range is [0,63]. The actual value range can be obtained by using AdmiGetAllDeviceIdInfo. |
option |
Input |
const AdmiTestBandwidthOption* |
Input parameters required for a D2D bandwidth test, including the number of test execution times and the size of transmitted data. |
testRslt |
Output |
D2D bandwidth test result. |
Returns
Type |
Description |
---|---|
int32_t |
Results:
|
Exception Handling
None
Restrictions
None
Example
AdmiTestBandwidthOption bandwidthOption = {0}; AdmiD2DBandwidthInfo d2dResult = {0}; int32_t deviceId = 0; bandwidthOption.dataTransSize = 64*1024*1024; bandwidthOption.excuteTimes = 5; bandwidthOption.dataTransMode = ADMI_DATATRANS_MODE_STEP; int32_t ret = AdmiTestD2DBandwidth(deviceId, &bandwidthOption, &d2dResult); if (ret != ADMI_OK) { // Record logs. return ret; } .......