DBLAS - Double precision Basic Linear Algebra subroutines (adapted from LINPACK FORTRAN): idamax return index of element with maximum absolute value dasum return sum of absolute values daxpy compute y[i] = a*x[i]+y[i] dcopy copy x[i] to y[i] (i.e., set y[i] = x[i]) ddot return sum of x[i]*y[i] (i.e., return the dot product of x and y) dnrm2 return square root of sum of squares of x[i] dscal compute x[i] = a*x[i] dswap swap x[i] and y[i] Function Prototypes: int idamax (int n, double *sx, int incx); double dasum (int n, double *sx, int incx); void daxpy (int n, double sa, double *sx, int incx, double *sy, int incy); void dcopy (int n, double *sx, int incx, double *sy, int incy); double ddot (int n, double *sx, int incx, double *sy, int incy); double dnrm2 (int n, double *sx, int incx); void dscal (int n, double sa, double *sx, int incx); void dswap (int n, double *sx, int incx, double *sy, int incy); idmax: Input: n number of elements in array sx array[n] of elements incx increment between elements Returned: index of element with maximum absolute value (idamax) dasum: Input: n number of elements in array sx array[n] of elements incx increment between elements Returned: sum of absolute values (dasum) daxpy: Input: n number of elements in arrays sa the scalar multiplier sx array[n] of elements to be scaled and added incx increment between elements of sx sy array[n] of elements to be added incy increment between elements of sy Output: sy array[n] of accumulated elements dcopy: Input: n number of elements in arrays sx array[n] of elements to be copied incx increment between elements of sx incy increment between elements of sy Output: sy array[n] of copied elements ddot: Input: n number of elements in arrays sx array[n] of elements incx increment between elements of sx sy array[n] of elements incy increment between elements of sy Returned: dot product of the two arrays dnrm2: Input: n number of elements in array sx array[n] of elements incx increment between elements Returned: square root of sum of squares of x[i] dscal: Input: n number of elements in array sa the scalar multiplier sx array[n] of elements incx increment between elements Output: sx array[n] of scaled elements Author: Dave Hale, Colorado School of Mines, 10/01/89