📄 sblas.cwp.lib
字号:
SBLAS - Single precision Basic Linear Algebra Subroutines (adapted from LINPACK FORTRAN):isamax return index of element with maximum absolute valuesasum return sum of absolute valuessaxpy compute y[i] = a*x[i]+y[i]scopy copy x[i] to y[i] (i.e., set y[i] = x[i])sdot return sum of x[i]*y[i] (i.e., return the dot product of x and y)snrm2 return square root of sum of squares of x[i]sscal compute x[i] = a*x[i]sswap swap x[i] and y[i]Function Prototypes:int isamax (int n, float *sx, int incx);float sasum (int n, float *sx, int incx);void saxpy (int n, float sa, float *sx, int incx, float *sy, int incy);void scopy (int n, float *sx, int incx, float *sy, int incy);float sdot (int n, float *sx, int incx, float *sy, int incy);float snrm2 (int n, float *sx, int incx);void sscal (int n, float sa, float *sx, int incx);void sswap (int n, float *sx, int incx, float *sy, int incy);isamax:Input:n number of elements in arraysx array[n] of elementsincx increment between elements Returned: index of element with maximum absolute valuesasum:Input:n number of elements in arraysx array[n] of elementsincx increment between elements Returned: sum of absolute valuessaxpy:Input:n number of elements in arrayssa the scalar multipliersx array[n] of elements to be scaled and addedincx increment between elements of sxsy array[n] of elements to be addedincy increment between elements of syOutput:sy array[n] of accumulated elementsscopy:Input:n number of elements in arrayssx array[n] of elements to be copiedincx increment between elements of sxincy increment between elements of syOutput:sy array[n] of copied elementssdot:Input:n number of elements in arrayssx array[n] of elementsincx increment between elements of sxsy array[n] of elementsincy increment between elements of syReturned: dot product of the two arrayssnrm2Input:n number of elements in arraysx array[n] of elementsincx increment between elements Returned: square root of sum of squares of x[i]sscal:Input:n number of elements in arraysa the scalar multipliersx array[n] of elementsincx increment between elements Output:sx array[n] of scaled elementssswap:Input:n number of elements in arrayssx array[n] of elementsincx increment between elements of sxsy array[n] of elementsincy increment between elements of syOutput:sx array[n] of swapped elementssy array[n] of swapped elementsNotes:Adapted from Linpack Fortran.snrm2:This simple version may cause overflow or underflow! Author: Dave Hale, Colorado School of Mines, 10/01/89
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -