Casts the data type of a tensor. This API is asynchronous.
aclError aclopCast(const aclTensorDesc *srcDesc,
const aclDataBuffer *srcBuffer,
const aclTensorDesc *dstDesc,
aclDataBuffer *dstBuffer,
uint8_t truncate,
aclrtStream stream)
Parameter |
Input/Output |
Description |
|---|---|---|
srcDesc |
Input |
Pointer to the input tensor description. |
srcBuffer |
Input |
Pointer to the input tensor. |
dstDesc |
Input |
Pointer to the output tensor description. |
dstBuffer |
Output |
Pointer to the output tensor. |
truncate |
Input |
Reserved. |
stream |
Input |
Stream where the operator is executed. |
0 on success; else, failure.
For the API call sequence, see API Call Sequence.