aclopCast

Description

Casts the data type of a tensor. This API is asynchronous.

Prototype

aclError aclopCast(const aclTensorDesc *srcDesc,

const aclDataBuffer *srcBuffer,

const aclTensorDesc *dstDesc,

aclDataBuffer *dstBuffer,

uint8_t truncate,

aclrtStream stream)

Parameters

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.

Returns

0 on success; else, failure.

See Also

For the API call sequence, see API Call Sequence.