Developer Reference

Contents

?laset

Initializes the off-diagonal elements and the diagonal elements of a matrix to given values.

Syntax

lapack_int
LAPACKE_slaset
(
int
matrix_layout
,
char
uplo
,
lapack_int
m
,
lapack_int
n
,
float
alpha
,
float
beta
,
float
*
a
,
lapack_int
lda
);
lapack_int
LAPACKE_dlaset
(
int
matrix_layout
,
char
uplo
,
lapack_int
m
,
lapack_int
n
,
double
alpha
,
double
beta
,
double
*
a
,
lapack_int
lda
);
lapack_int
LAPACKE_claset
(
int
matrix_layout
,
char
uplo
,
lapack_int
m
,
lapack_int
n
,
lapack_complex_float
alpha
,
lapack_complex_float
beta
,
lapack_complex_float
*
a
,
lapack_int
lda
);
lapack_int
LAPACKE_zlaset
(
int
matrix_layout
,
char
uplo
,
lapack_int
m
,
lapack_int
n
,
lapack_complex_double
alpha
,
lapack_complex_double
beta
,
lapack_complex_double
*
a
,
lapack_int
lda
);
Include Files
  • mkl.h
Description
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
The constants to which the off-diagonal and diagonal elements are to be set, respectively.
a
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
i
j
=
alpha
,
1≤
i
j
-1, 1≤
j
n
,
if
uplo
=
'L'
,
A
i
j
=
alpha
,
j
+1≤
i
m
, 1≤
j
n
,
otherwise,
A
i
j
=
alpha
,
1≤
i
m
, 1≤
j
n
,
i
j
,
and, for all
uplo
,
A
i
j
=
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.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804