12.07.2015 Views

CUBLAS Library

CUBLAS Library

CUBLAS Library

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 2BLAS1 FunctionsOutputsd1sd2sx1Reference: http://www.netlib.org/blas/srotmg.fThis function does not set any error status.Function cublasSscal()voidcublasSscal (int n, float alpha, float *x, int incx)replaces single‐precision vector x with single‐precision alpha * x. Fori= 0 to n-1, it replaceswherechanged to represent the effect of the transformation.changed to represent the effect of the transformation.changed to represent the effect of the transformation.sparam 5-element vector. sparam[0] is sflag described above. sparam[1]through sparam[4] contain the 2×2 rotation matrix h: sparam[1]contains sh00, sparam[2] contains sh10, sparam[3] containssh01, and sparam[4] contains sh11.x[ lx + i * incx] with alpha * x[ lx + i * incx],lx = 1 if incx >= 0, elselx = 1 + ( 1 – n) * incx .Inputn number of elements in input vectoralpha single-precision scalar multiplierx single-precision vector with n elementsincx storage spacing between elements of xOutputx single-precision result (unchanged if n

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!