Question

Sorry if this is obvious. I'm just getting into the Accelerate framework and trying to go beyond the very simple stuff. I'm staring down the vDSP reference but I'm not sure how the following would be phrased or what it might be called in technical lingo. I want the following operation - what's the best way to do this with vDSP? I'm just having trouble finding it. (In pseudocode, for i from 0 to some N:)

O[i]= A + B * (sum of vector I from 0 to i)

Thanks!

To clarify: these are both vectors of floats and speed is critical.

Was it helpful?

Solution

It turns out this is equivalent to:

vDSP_vrsum(I, 1, &B, O, 1, N);
vDSP_vsadd(O, 1, &A, O, 1, N);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top