MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / quantize

Method quantize

src/core/NEON/kernels/convolution/common/qsymm8.cpp:45–49  ·  view source on GitHub ↗

Symmetric quantization

Source from the content-addressed store, hash-verified

43
44// Symmetric quantization
45int8_t QSymm8Params::quantize(float value) const
46{
47 const float transformed = value / scale;
48 return static_cast<int8_t>(round(std::max(-128.0f, std::min(127.0f, transformed))));
49}
50
51float QSymm8Params::dequantize(const int8_t value) const
52{

Callers

nothing calls this directly

Calls 1

roundFunction · 0.70

Tested by

no test coverage detected