Function: float_to_float16
Applicable Products
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Converts data of the float32 type to data of the aclFloat16 type.
Prototype
- C Prototype
1aclFloat16 aclFloatToFloat16(float value)
- Python Function
1output = acl.float_to_float16(value)
Parameters
Parameter |
Description |
|---|---|
value |
float: data to be converted. |
Return Values
Return Value |
Description |
|---|---|
output |
Int, error code. 0 on success; else, failure. |
Parent topic: Other APIs