Executable shared-scale quantization #
The kernel rounds each exact rational lane to a nearest-even integer significand at the caller-selected binary exponent.
@[inline]
def
FloatLib.Floats.Formats.Block.quantizeAt
{lanes : ℕ}
(exponent : ℤ)
(input : Vector ℚ lanes)
:
SharedScaleCode lanes
Quantize every rational lane at an explicitly supplied shared exponent.