Request: FloatVectorOperations::sum()?


#1

It would love to get that one!

/** Returns the sum of the given array. */
float FloatVectorOperations::sum (const float* src, int num) noexcept
{
#if JUCE_USE_VDSP_FRAMEWORK
    float result;
    vDSP_sve (src, 1, &result, (vDSP_Length) num);
    return result;
#else
    ?
#endif
}

#2

Indeed, it would be great to have

float FloatVectorOperations::sum (const float* src, int numValues)

It would be handy for the calculation of mean values.


#3

look at the source-code


#4

Thanks for the link resp. source-code. It helps me a lot!

But again: It would be great to have a sum() method inside FloatVectorOperations.