Hi there,
I'd like to take advantage of IPP library and vectorization, applying a clamp/clip to an array of double (or better, to a sum of each item in two arrays of double).
Actual code is somethings like this:
double *pStart = mStartVoicesValues[voiceIndex]; double *pMod = pModValues + voiceIndex * bufferSize; double *pValue = mProcessedValues[voiceIndex]; for (int sampleIndex = 0; sampleIndex < blockSize; sampleIndex++) { pValue[sampleIndex] = std::clamp(pStart[sampleIndex] + pMod[sampleIndex], 0.0, 1.0); }
Called often, with variable blockSize. It sum each other pStart and pMod, and clip if they are below/over 0.0/1.0 (for each value on each array). Clearly, the three arrays are equals in sizes. Note: I could also copy the result on pStart, without using the third array pValue.
Which IPP do you suggest?
Thanks