Function: cast
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
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)
Parameters
Returns
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code: 0 on success; else, failure. |
Parent topic: CBLAS Interfaces (blas)