質問

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