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.

有帮助吗?

解决方案

It turns out this is equivalent to:

vDSP_vrsum(I, 1, &B, O, 1, N);
vDSP_vsadd(O, 1, &A, O, 1, N);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top