Function: cast
Applicable Products
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Casts the data type of a tensor. This API is asynchronous.
Prototype
- C Prototype
1aclError aclopCast(const aclTensorDesc *srcDesc, const aclDataBuffer *srcBuffer, const aclTensorDesc *dstDesc, aclDataBuffer *dstBuffer, uint8_t truncate, aclrtStream stream)
- Python Function
1ret = acl.op.cast(src_desc, src_buffer, dst_desc, dst_buffer, truncate, stream)
Parameter Description
Return Value Description
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code: 0 on success; else, failure. |
Parent topic: CBLAS Interfaces (blas)