[][src]Function cmsis_dsp_sys_pregenerated::arm_logsumexp_f32

pub unsafe extern "C" fn arm_logsumexp_f32(
    in_: *const float32_t,
    blockSize: u32
) -> float32_t

@brief Computation of the LogSumExp

In probabilistic computations, the dynamic of the probability values can be very wide because they come from gaussian functions. To avoid underflow and overflow issues, the values are represented by their log. In this representation, multiplying the original exp values is easy : their logs are added. But adding the original exp values is requiring some special handling and it is the goal of the LogSumExp function.

If the values are x1...xn, the function is computing:

ln(exp(x1) + ... + exp(xn)) and the computation is done in such a way that rounding issues are minimised.

The max xm of the values is extracted and the function is computing: xm + ln(exp(x1 - xm) + ... + exp(xn - xm))

@param[in] *in Pointer to an array of input values. @param[in] blockSize Number of samples in the input array. @return LogSumExp