문제

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