Function arm_nn_softmax_floor_to_int_f32

Function Documentation

static int32_t arm_nn_softmax_floor_to_int_f32(float32_t x)

Floor of x as an int32_t.

Precondition: x must already be reduced to the int32_t range and must not be NaN — the float-to-int conversion below is undefined otherwise. The only caller, arm_nn_softmax_exp_lut_f32(), guarantees this by clamping its input to [-80, 80] (NaN included, see there) before scaling by log2(e), which bounds x to +/-116.