Developer Reference for Intel® oneAPI Math Kernel Library for C
?laset
Initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
Syntax
lapack_intLAPACKE_slaset ( intmatrix_layout , charuplo , lapack_intm , lapack_intn , floatalpha , floatbeta , float*a , lapack_intlda );
lapack_intLAPACKE_dlaset ( intmatrix_layout , charuplo , lapack_intm , lapack_intn , doublealpha , doublebeta , double*a , lapack_intlda );
lapack_intLAPACKE_claset ( intmatrix_layout , charuplo , lapack_intm , lapack_intn , lapack_complex_floatalpha , lapack_complex_floatbeta , lapack_complex_float*a , lapack_intlda );
lapack_intLAPACKE_zlaset ( intmatrix_layout , charuplo , lapack_intm , lapack_intn , lapack_complex_doublealpha , lapack_complex_doublebeta , lapack_complex_double*a , lapack_intlda );
Include Files
mkl.h
Description
slaset dlaset claset zlaset
The routine initializes an m -by- n matrix A to beta on the diagonal and alpha on the off-diagonals.
Input Parameters
A <datatype> placeholder, if present, is used for the C interface data types in the C interface section above. See C Interface Conventions for the C interface principal conventions and type definitions.
- matrix_layout
-
Specifies whether matrix storage layout is row major ( LAPACK_ROW_MAJOR ) or column major ( LAPACK_COL_MAJOR ).
uplo
Specifies the part of the matrix A to be set.
If uplo = 'U' , upper triangular part is set; the strictly lower triangular part of A is not changed. If uplo = 'L' : lower triangular part is set; the strictly upper triangular part of A is not changed. Otherwise: A ll of the matrix A is set.
m
The number of rows of the matrix A . m≥ 0 .
n
The number of columns of the matrix A .
n≥ 0 .
- alpha , beta
-
REAL for slaset DOUBLE PRECISION for dlaset COMPLEX for claset DOUBLE COMPLEX for zlaset . The constants to which the off-diagonal and diagonal elements are to be set, respectively.
- a
-
REAL for slaset DOUBLE PRECISION for dlaset COMPLEX for claset DOUBLE COMPLEX for zlaset . Array, DIMENSION ( lda , n ). Array, size at least max(1, lda*n) for column major and max(1, lda*m) for row major layout. The array a contains the m -by- n matrix A .
lda
The leading dimension of the array a .
lda ≥ max(1, m ) for column major layout and lda ≥ max(1, n ) for row major layout .
Output Parameters
- a
-
On exit, the leading m -by- n submatrix of A is set as follows: if uplo = 'U' , A_{ij} = alpha , 1≤i≤j-1, 1≤j≤n , if uplo = 'L' , A_{ij} = alpha, j+1≤i≤m, 1≤j≤n , otherwise, A_{ij} = alpha , 1≤i≤m, 1≤j≤n, i≠j , and, for all uplo , A_{ii} = beta , 1≤i≤min(m, n) .
Return Values
This function returns a value info .
If info = 0 , the execution is successful.
If info = i< 0 , the i -th parameter had an illegal value.
If info = -1011 , memory allocation error occurred.