aclopCast

Applicability

Product

Supported

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Casts the data type of the input data. 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. For details, see aclError.

See Also

For the API call sequence, see Single-Operator Call Sequence.