You're reading an pre-release version of this documentation.
For the latest stable release version, please have a look at master.

Function float32_to_dtype_scalar

Function Documentation

int float32_to_dtype_scalar(unsigned char *dst, float src, const int data_format, const int quant_format, const signed char fl, const float scale, const int zerop)

单个数据的量化操作

参数:
  • dst -- [OUT] 量化后的数

  • src -- [IN] 待量化的数

  • data_format -- [IN] 数据类型

  • quant_format -- [IN] 量化类型

  • fl -- [IN] 固定小数点位置

  • scale -- [IN] 缩放因子

  • zerop -- [IN] 零点

返回:

int 处理后的状态码,0表示成功,其他表示失败