#pragma once
#include <assert.h>
#include <math.h>
#include <stddef.h>
#include <stdint.h>
#include "xnnpack/common.h"
#include "xnnpack/math.h"
#include "xnnpack/microparams.h"
xnn_qs8_requantize_fn;
xnn_qu8_requantize_fn;
static inline int8_t xnn_qs8_requantize_fp32(
int32_t input,
float scale,
int8_t zero_point,
int8_t min,
int8_t max)
{ … }
static inline uint8_t xnn_qu8_requantize_fp32(
int32_t input,
float scale,
uint8_t zero_point,
uint8_t min,
uint8_t max)
{ … }
static inline int8_t xnn_qs8_requantize_rndna(
int32_t input,
float scale,
int8_t zero_point,
int8_t min,
int8_t max)
{ … }
static inline uint8_t xnn_qu8_requantize_rndna(
int32_t input,
float scale,
uint8_t zero_point,
uint8_t min,
uint8_t max)
{ … }
static inline int8_t xnn_qs8_requantize_rndnu(
int32_t input,
float scale,
int8_t zero_point,
int8_t min,
int8_t max)
{ … }
static inline uint8_t xnn_qu8_requantize_rndnu(
int32_t input,
float scale,
uint8_t zero_point,
uint8_t min,
uint8_t max)
{ … }
static inline uint8_t xnn_qu8_quantize_add(
uint8_t a, uint8_t b,
union xnn_qu8_add_minmax_params params)
{ … }
static inline int8_t xnn_qs8_quantize_add(
int8_t a, int8_t b,
union xnn_qs8_add_minmax_params params)
{ … }
inline static int8_t xnn_qs8_quantize(float val, float scale, int32_t zero_point)
{ … }
inline static uint8_t xnn_qu8_quantize(float val, float scale, int32_t zero_point)
{ … }