Skip to main content

Module quant

Module quant 

Source
Expand description

Quantisation, casting and the final value emitted to the receiver.

Structs§

QuantSpec
Quantisation parameters for one field: step, optional declared range and wire width.

Functions§

deliver
How a predictor output is delivered to the receiver.
final_value
The value the receiver emits: cast to the field type, rounded and saturated.
quantise_q
Quantise a real value to an integer, reporting whether clamping occurred.
quantised_value
Dequantise a quantised integer with a single multiplication.
raw_value
Cast an unquantised real sample.
truth_value
The sender’s sample as the receiver would emit it, with saturation reported.