vSnaxpy(_:_:_:_:_:)
Performs the computation of vSaxpy n times, using a different multiplier each time.
Declaration
func vSnaxpy(_ n: Int32, _ m: Int32, _ a: UnsafePointer<vFloat>, _ x: UnsafePointer<vFloat>, _ y: UnsafeMutablePointer<vFloat>)Parameters
- n:
Number of elements in vector
a; must be a multiple of 4. - m:
Number of elements in each of the vectors
xandy; must be a multiple of 4. - a:
A vector array of
floatvalues. - x:
A second vector array of
floatvalues. - y:
A second vector array of
floatvalues.
Discussion
For i = 0 to n-1, the elements of x are multiplied by a[i] and added to the corresponding elements of y. The results are accumulated and stored in y.