Visible to Intel only — GUID: GUID-BFE70E82-A78D-4544-8AD8-2381AF7428CD
Visible to Intel only — GUID: GUID-BFE70E82-A78D-4544-8AD8-2381AF7428CD
mkl_?omatadd
Scales and sums two matrices in addition to performing out-of-place transposition operations.
Syntax
call mkl_somatadd(ordering, transa, transb, m, n, alpha, a, lda, beta, b, ldb, c, ldc)
call mkl_domatadd(ordering, transa, transb, m, n, alpha, a, lda, beta, b, ldb, c, ldc)
call mkl_comatadd(ordering, transa, transb, m, n, alpha, a, lda, beta, b, ldb, c, ldc)
call mkl_zomatadd(ordering, transa, transb, m, n, alpha, a, lda, beta, b, ldb, c, ldc)
Include Files
- mkl.fi
Description
The mkl_?omatadd routine scales and adds two matrices in addition to performing out-of-place transposition operations. A transposition operation can be no operation, a transposition, a conjugate transposition, or a conjugation (without transposition). The following out-of-place memory movement is done:
C := alpha*op(A) + beta*op(B)
where the op(A) and op(B) operations are transpose, conjugate-transpose, conjugate (no transpose), or no transpose, depending on the values of transa and transb. If no transposition of the source matrices is required, m is the number of rows and n is the number of columns in the source matrices A and B. In this case, the output matrix C is m-by-n.
In general, a, b, and c must not overlap in memory, with the exception of the following in-place operations:
a and c can point to the same memory if transa is non-transpose and lda = ldc.
b and c can point to the same memory if transb is non-transpose and ldb = ldc.
Parameter descriptions are common for all implemented interfaces with the exception of data types that refer here to the FORTRAN 77 standard types. Data types specific to the different interfaces are described in the section "Interfaces" below.
Input Parameters
- ordering
-
CHARACTER*1. Ordering of the matrix storage.
If ordering = 'R' or 'r', the ordering is row-major.
If ordering = 'C' or 'c', the ordering is column-major.
- transa
-
CHARACTER*1. Parameter that specifies the operation type on matrix A.
If transa = 'N' or 'n', op(A)=A and the matrix A is assumed unchanged on input.
If transa = 'T' or 't', it is assumed that A should be transposed.
If transa = 'C' or 'c', it is assumed that A should be conjugate transposed.
If transa = 'R' or 'r', it is assumed that A should be conjugated (and not transposed).
If the data is real, then transa = 'R' is the same as transa = 'N', and transa = 'C' is the same as transa = 'T'.
- transb
-
CHARACTER*1. Parameter that specifies the operation type on matrix B.
If transb = 'N' or 'n', op(B)=B and the matrix B is assumed unchanged on input.
If transb = 'T' or 't', it is assumed that B should be transposed.
If transb = 'C' or 'c', it is assumed that B should be conjugate transposed.
If transb = 'R' or 'r', it is assumed that B should be conjugated (and not transposed).
If the data is real, then transb = 'R' is the same as transb = 'N', and transb = 'C' is the same as transb = 'T'.
- m
-
INTEGER. The number of matrix rows in op(A), op(B), and C.
- n
-
INTEGER. The number of matrix columns in op(A), op(B), and C.
- alpha
-
REAL for mkl_somatadd.
DOUBLE PRECISION for mkl_domatadd.
COMPLEX for mkl_comatadd.
DOUBLE COMPLEX for mkl_zomatadd.
This parameter scales the input matrix by alpha.
- a
-
REAL for mkl_somatadd.
DOUBLE PRECISION for mkl_domatadd.
COMPLEX for mkl_comatadd.
DOUBLE COMPLEX for mkl_zomatadd.
Array of size a(lda,*) if alpha is nonzero. Otherwise the array is never accessed.
- lda
-
INTEGER. Distance between the first elements in adjacent columns (in the case of the column-major order) or rows (in the case of the row-major order) in the source matrix A; measured in the number of elements.
For ordering = 'C' or 'c': when transa = 'N', 'n', 'R', or 'r', lda must be at least max(1,m); otherwise lda must be max(1,n).
For ordering = 'R' or 'r': when transa = 'N', 'n', 'R', or 'r', lda must be at least max(1,n); otherwise lda must be max(1,m).
- beta
-
REAL for mkl_somatadd.
DOUBLE PRECISION for mkl_domatadd.
COMPLEX for mkl_comatadd.
DOUBLE COMPLEX for mkl_zomatadd.
This parameter scales the input matrix by beta.
- b
-
REAL for mkl_somatadd.
DOUBLE PRECISION for mkl_domatadd.
COMPLEX for mkl_comatadd.
DOUBLE COMPLEX for mkl_zomatadd.
Array of size b(lda,*) if beta is nonzero. Otherwise the array is never accessed.
- ldb
-
INTEGER. Distance between the first elements in adjacent columns (in the case of the column-major order) or rows (in the case of the row-major order) in the source matrix B; measured in the number of elements.
For ordering = 'C' or 'c': when transa = 'N', 'n', 'R', or 'r', ldb must be at least max(1,m); otherwise ldb must be max(1,n).
For ordering = 'R' or 'r': when transa = 'N', 'n', 'R', or 'r', ldb must be at least max(1,n); otherwise ldb must be max(1,m).
- ldc
-
INTEGER. Distance between the first elements in adjacent columns (in the case of the column-major order) or rows (in the case of the row-major order) in the destination matrix C; measured in the number of elements.
If ordering = 'C' or 'c', then ldc must be at least max(1, m), otherwise ldc must be at least max(1, n).
Output Parameters
- c
-
REAL for mkl_somatadd.
DOUBLE PRECISION for mkl_domatadd.
COMPLEX for mkl_comatadd.
DOUBLE COMPLEX for mkl_zomatadd.
Array, size c(ldc,*).
Interfaces
FORTRAN 77:
SUBROUTINE mkl_somatadd ( ordering, transa, transb, m, n, alpha, a, lda, beta, b, ldb, c, ldc ) CHARACTER*1 ordering, transa, transb INTEGER m, n, lda, ldb, ldc REAL alpha, beta REAL a(lda,*), b(ldb,*), c(ldc,*)
SUBROUTINE mkl_domatadd ( ordering, transa, transb, m, n, alpha, a, lda, beta, b, ldb, c, ldc ) CHARACTER*1 ordering, transa, transb INTEGER m, n, lda, ldb, ldc DOUBLE PRECISION alpha, beta DOUBLE PRECISION a(lda,*), b(ldb,*), c(ldc,*)
SUBROUTINE mkl_comatadd ( ordering, transa, transb, m, n, alpha, a, lda, beta, b, ldb, c, ldc ) CHARACTER*1 ordering, transa, transb INTEGER m, n, lda, ldb, ldc COMPLEX alpha, beta COMPLEX a(lda,*), b(ldb,*), c(ldc,*)
SUBROUTINE mkl_zomatadd ( ordering, transa, transb, m, n, alpha, a, lda, beta, b, ldb, c, ldc ) CHARACTER*1 ordering, transa, transb INTEGER m, n, lda, ldb, ldc DOUBLE COMPLEX alpha, beta DOUBLE COMPLEX a(lda,*), b(ldb,*), c(ldc,*)