SetReduceType
Function
Sets the reduction operation type. This parameter is valid only for communication tasks that have reduction operations.
Prototype
1 | uint32_t SetReduceType(uint32_t reduceType, uint8_t dstDataType = 0, uint8_t srcDataType = 0) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
reduceType |
Input |
Reduction operation type. This parameter is valid only for communication tasks that have reduction operations. The parameter is of the uint32_t type. The value is provided in Table 2. |
dstDataType |
Input |
Data type of the output data in a communication task. The parameter is of the uint8_t type. For details about the value range, see Table 1. |
srcDataType |
Input |
Data type of the input data in the communication task. The parameter is of the uint8_t type. For details about the value range, see Table 1. |
Returns
- 0: Setting succeeded.
- Other values: Setting failed.
Restrictions
None
Example
For details about the calling example of this API, see Example.