Function arm_rsqrt_f16¶
Defined in File arm_nnfunctions_flt.h
Function Documentation¶
-
arm_cmsis_nn_status arm_rsqrt_f16(const float16_t *input, float16_t *output, int32_t block_size)¶
Elementwise reciprocal square root of a float16 tensor,
1 / sqrt(x).Same value path as arm_nn_sqrt_f16: widen to float32, evaluate
1.0f / sqrtf(x)there, round once to float16, and so also immune to FPSCR.FZ. Verified exhaustively: for every positive finite float16 input, subnormals included, the result is the correctly rounded float16 of the float64 reciprocal square root (0 ulp, #295). Special values are decided on the bit pattern and returned as literals: +0 -> +Inf, -0 -> -Inf, +Inf -> +0, negative (including -Inf) -> quiet NaN 0x7E00, NaN -> the same NaN with the quiet bit set (sign and payload kept).- Parameters:
input – [in] Pointer to the input tensor.
output – [out] Pointer to the output tensor; may alias
input.block_size – [in] Number of tensor elements.
- Returns:
ARM_CMSIS_NN_SUCCESSon success orARM_CMSIS_NN_ARG_ERRORon invalid arguments.