Table C-7 summarizes the BLAS Level 1 Basic Set routines. For more information on these routines (including mapping and inlining information), see your performance guide.
Routines | Information | |||
---|---|---|---|---|
IxAMAX [1] | Description: | These functions return the index of the first selected element of an array argument that has the maximum absolute value. | ||
Syntax: | y = IxAMAX (n, x, incx) | |||
Arguments: | n | Integer number of element to be accessed in the array. | ||
x | Array containing the elements to be accessed (or array reference to the first such element). | |||
incx | Integer index increment to use in selecting the elements in the array. | |||
Specific Functions: | Name | Array Argument | Result | |
ISAMAX | REAL*4 | INTEGER*4 | ||
IDAMAX | REAL*8 | INTEGER*4 | ||
ICAMAX | COMPLEX*8 | INTEGER*4 | ||
IZAMAX | COMPLEX*16 | INTEGER*4 | ||
xASUM [1] | Description: | These functions return the sum of the absolute values of selected elements of an array argument. | ||
Syntax: | y = xASUM (n, x, incx) | |||
Arguments: | n | Integer number of element to be accessed in the array. | ||
x | Array containing the elements to be accessed (or array reference to the first such element). | |||
incx | Integer index increment to use in selecting the elements in the array. | |||
Specific Functions: | Name | Array Argument | Result | |
SASUM | REAL*4 | REAL*4 | ||
DASUM | REAL*8 | REAL*8 | ||
SCASUM | COMPLEX*8 | REAL*4 | ||
DZASUM | COMPLEX*16 | REAL*8 | ||
xAXPY [2] | Description: | These subroutines multiply an array by a scalar value and add an array. | ||
Syntax: | CALL xAXPY (n, a, x, incx, y, incy) | |||
Arguments: | n | Integer number of element to be accessed in the arrays. | ||
a | Scalar multiplier for input array. | |||
x | Input array containing the elements to be accessed (or array reference to the first such element). | |||
incx | Integer index increment to use in selecting the elements in the input array. | |||
y | Output array containing the elements to be accessed (or array reference to the first such element). | |||
incy | Integer index increment to use in selecting the elements in the output array. | |||
Specific Subroutines: | Name | Scalar | Array Argument | |
SAXPY | REAL*4 | REAL*4 | ||
DAXPY | REAL*8 | REAL*8 | ||
CAXPY | COMPLEX*8 | COMPLEX*8 | ||
ZAXPY | COMPLEX*16 | COMPLEX*16 | ||
xCOPY [3] | Description: | These subroutines copy selected elements from one array to another array. | ||
Syntax: | CALL xCOPY (n, x, incx, y, incy) | |||
Arguments: | n | Integer number of element to be accessed in the arrays. | ||
x | Input array containing the elements to be accessed (or array reference to the first such element). | |||
incx | Integer index increment to use in selecting the elements in the input array. | |||
y | Output array containing the elements to be accessed (or array reference to the first such element). | |||
incy | Integer index increment to use in selecting the elements in the output array. | |||
Specific Subroutines: | Name | Array Argument | ||
SCOPY | REAL*4 | |||
DCOPY | REAL*8 | |||
CCOPY | COMPLEX*8 | |||
ZCOPY | COMPLEX*16 | |||
xDOTx [4] | Description: | These functions return the inner product of two arrays. | ||
Syntax: | y = xDOTx (n, x, incx, y, incy) | |||
Arguments: | n | Integer number of element to be accessed in the arrays. | ||
x | First array containing the elements to be accessed (or array reference to the first such element). | |||
incx | Integer index increment to use in selecting the elements in the first array. | |||
y | Second array containing the elements to be accessed (or array reference to the first such element). | |||
incy | Integer index increment to use in selecting the elements in the second array. | |||
Specific Functions: | Name | Array Argument | Result | |
SDOT | REAL*4 | REAL*4 | ||
DDOT | REAL*8 | REAL*8 | ||
CDOTC | COMPLEX*8 | COMPLEX*8 | ||
CDOTU | COMPLEX*8 | COMPLEX*8 | ||
ZDOTC | COMPLEX*16 | COMPLEX*16 | ||
ZDOTU | COMPLEX*16 | COMPLEX*16 | ||
xNRM2 | Description: | These functions return the Euclidean norm of an array. For inlining information on the xNRM2 functions, see your performance guide. | ||
Syntax: | y = xNRM2 (n, x, incx) | |||
Arguments: | n | Integer number of element to be accessed in the array. | ||
x | Array containing the elements to be accessed (or array reference to the first such element). | |||
incx | Integer index increment to use in selecting the elements in the array. | |||
Specific Functions: | Name | Array Argument | Result | |
SNRM2 | REAL*4 | REAL*4 | ||
DNRM2 | REAL*8 | REAL*8 | ||
SCNRM2 | COMPLEX*8 | REAL*4 | ||
DZNRM2 | COMPLEX*16 | REAL*8 | ||
xROT [5] | Description: | These subroutines apply a Givens plane rotation to a pair of arrays. | ||
Syntax: | CALL xROT (n, x, incx, y, incy, c, s) | |||
Arguments: | n | Integer number of element to be accessed in the arrays. | ||
x | First array containing the elements to be accessed (or array reference to the first such element). | |||
incx | Integer index increment to use in selecting the elements in the first array. | |||
y | Second array containing the elements to be accessed (or array reference to the first such element). | |||
incy | Integer index increment to use in selecting the elements in the second array. | |||
c[6] | First rotation element, which can be interpreted as the cosine of the angle of rotation. | |||
s[6] | Second rotation element, which can be interpreted as the sine of the angle of rotation. | |||
Specific Subroutines: | Name | Array Argument | Rotation Element | |
SROT | REAL*4 | REAL*4 | ||
DROT | REAL*8 | REAL*8 | ||
CSROT | COMPLEX*8 | REAL*4 | ||
ZDROT | COMPLEX*16 | REAL*8 | ||
xROTG | Description: | These subroutines generate the elements for a Givens plane rotation. The xROTG subroutines cannot be inlined. | ||
Syntax: | CALL xROTG (a, b, c, s) | |||
Arguments: | a | On entry, the first element of the input array. On exit, rotated element r. | ||
b | On entry, the second element of the input array. On exit from SROTG and DROTG, reconstruction element z. | |||
c | Variable that stores the first rotation element, which can be interpreted as the cosine of the angle of rotation. | |||
s | Variable that stores the second rotation element, which can be interpreted as the sine of the angle of rotation. | |||
Specific Subroutines: | Name | Array Element | Rotation Variable | |
SROTG | REAL*4 | REAL*4 | ||
DROTG | REAL*8 | REAL*8 | ||
CROTG | COMPLEX*8 | COMPLEX*8 | ||
ZROTG | COMPLEX*16 | COMPLEX*16 | ||
xSCAL | Description: | These subroutines scale the elements of an array by a scalar value. The selected elements are replaced by the scaled value. | ||
Syntax: | CALL xSCAL (n, a, x, incx) | |||
Arguments: | n | Integer number of element to be accessed in the array. | ||
a | Scalar multiplier for the array. | |||
x | Array containing the elements to be accessed (or array reference to the first such element). | |||
incx | Integer index increment to use in selecting the elements in the array. | |||
Specific Subroutines: | Name | Scalar | Array Argument | |
SSCAL | REAL*4 | REAL*4 | ||
DSCAL | REAL*8 | REAL*8 | ||
CSCAL | COMPLEX*8 | COMPLEX*8 | ||
CSSCAL | REAL*4 | COMPLEX*8 | ||
ZSCAL | COMPLEX*16 | COMPLEX*16 | ||
ZDSCAL | REAL*8 | COMPLEX*16 | ||
xSWAP | Description: | These subroutines swap elements between two arrays. | ||
Syntax: | CALL xSWAP (n, x, incx, y, incy) | |||
Arguments: | n | Integer number of element to be accessed in the arrays. | ||
x | Array containing elements to be swapped with corresponding elements in array y (or array reference to the first such element). | |||
incx | Integer index increment to use in selecting the elements in array x. | |||
y | Array containing elements to be swapped with corresponding elements in array x (or array reference to the first such element). | |||
incy | Integer index increment to use in selecting the elements in array y. | |||
Specific Subroutines: | Name | Array Argument | ||
SSWAP | REAL*4 | |||
DSWAP | REAL*8 | |||
CSWAP | COMPLEX*8 | |||
ZSWAP | COMPLEX*16 | |||
[1] For the purpose of these functions, the absolute value of a complex number is defined as the sum of the absolute values of the real and imaginary parts. [2] The elements in array x are multiplied by scalar a and then added to the corresponding elements of array y, thereby replacing them. [3] The elements in array x are copied to the corresponding elements of array y, thereby replacing them. [4] CDOTC and ZDOTC compute conjugated values, while CDOTU and ZDOTU compute unconjugated values. [5] CSROT and ZDROT apply a real rotation to a pair of complex arrays. [6] This argument can be generated by the xROTG routines. |