p?gemm
p?gemm
Computes a scalar-matrix-matrix product and adds the result to a scalar-matrix product for distributed matrices.
Syntax
void psgemm
(
const char
*transa
,
const char
*transb
,
const MKL_INT
*m
,
const MKL_INT
*n
,
const MKL_INT
*k
,
const float
*alpha
,
const float
*a
,
const MKL_INT
*ia
,
const MKL_INT
*ja
,
const MKL_INT
*desca
,
const float
*b
,
const MKL_INT
*ib
,
const MKL_INT
*jb
,
const MKL_INT
*descb
,
const float
*beta
,
float
*c
,
const MKL_INT
*ic
,
const MKL_INT
*jc
,
const MKL_INT
*descc
);
void pdgemm
(
const char
*transa
,
const char
*transb
,
const MKL_INT
*m
,
const MKL_INT
*n
,
const MKL_INT
*k
,
const double
*alpha
,
const double
*a
,
const MKL_INT
*ia
,
const MKL_INT
*ja
,
const MKL_INT
*desca
,
const double
*b
,
const MKL_INT
*ib
,
const MKL_INT
*jb
,
const MKL_INT
*descb
,
const double
*beta
,
double
*c
,
const MKL_INT
*ic
,
const MKL_INT
*jc
,
const MKL_INT
*descc
);
void pcgemm
(
const char
*transa
,
const char
*transb
,
const MKL_INT
*m
,
const MKL_INT
*n
,
const MKL_INT
*k
,
const MKL_Complex8
*alpha
,
const MKL_Complex8
*a
,
const MKL_INT
*ia
,
const MKL_INT
*ja
,
const MKL_INT
*desca
,
const MKL_Complex8
*b
,
const MKL_INT
*ib
,
const MKL_INT
*jb
,
const MKL_INT
*descb
,
const MKL_Complex8
*beta
,
MKL_Complex8
*c
,
const MKL_INT
*ic
,
const MKL_INT
*jc
,
const MKL_INT
*descc
);
void pzgemm
(
const char
*transa
,
const char
*transb
,
const MKL_INT
*m
,
const MKL_INT
*n
,
const MKL_INT
*k
,
const MKL_Complex16
*alpha
,
const MKL_Complex16
*a
,
const MKL_INT
*ia
,
const MKL_INT
*ja
,
const MKL_INT
*desca
,
const MKL_Complex16
*b
,
const MKL_INT
*ib
,
const MKL_INT
*jb
,
const MKL_INT
*descb
,
const MKL_Complex16
*beta
,
MKL_Complex16
*c
,
const MKL_INT
*ic
,
const MKL_INT
*jc
,
const MKL_INT
*descc
);
Include Files
- mkl_pblas.h
Description
The
p?gemm
routines perform a matrix-matrix operation with general distributed matrices. The operation is defined as sub(C) := alpha*op(sub(A))*op(sub(B)) + beta*sub(C),
where:
op(
is one of x
)op(
, or x
) = x
op(
,x
) = x
'alpha
and beta
are scalars,sub(
, A
)=A
(ia
:ia
+m
-1, ja
:ja
+k
-1)sub(
,
and B
)=B
(ib
:ib
+k
-1, jb
:jb
+n
-1)sub(
,
are distributed matrices.C
)=C
(ic
:ic
+m
-1, jc
:jc
+n
-1)Input Parameters
- transa
- (global) Specifies the form ofop(sub(used in the matrix multiplication:A))ifortransa= 'N''n', thenop(sub(;A)) = sub(A)ifortransa= 'T''t', thenop(sub(;A)) = sub(A)'ifortransa= 'C''c', thenop(sub(.A)) = sub(A)'
- transb
- (global) Specifies the form ofop(sub(used in the matrix multiplication:B))ifortransb= 'N''n', thenop(sub(;B)) = sub(B)ifortransb= 'T''t', thenop(sub(;B)) = sub(B)'ifortransb= 'C''c', thenop(sub(.B)) = sub(B)'
- m
- (global) Specifies the number of rows of the distributed matricesop(sub(andA))sub(,C)m≥0.
- n
- (global) Specifies the number of columns of the distributed matricesop(sub(andB))sub(,C)n≥0.The value ofnmust be at least zero.
- k
- (global) Specifies the number of columns of the distributed matrixop(sub(and the number of rows of the distributed matrixA))op(sub(.B))The value ofkmust be greater than or equal to 0.
- alpha
- (global)Specifies the scalaralpha.Whenalphais equal to zero, then the local entries of the arraysaandbcorresponding to the entries of the submatricessub(andA)sub(respectively need not be set on input.B)
- a
- (local)Array, sizelld_abykla, whereklaisLOCc(whenja+k-1)ortransa='N''n', and isLOCq(otherwise. Before entry this array must contain the local pieces of the distributed matrixja+m-1)sub(.A)
- ia,ja
- (global) The row and column indices in the distributed matrixAindicating the first row and the first column of the submatrixsub(, respectivelyA)
- desca
- (global and local) array of dimension 9. The array descriptor of the distributed matrixA.
- b
- (local)Array, sizelld_bbyklb, whereklbisLOCc(whenjb+n-1)ortransb='N''n', and isLOCq(otherwise. Before entry this array must contain the local pieces of the distributed matrixjb+k-1)sub(.B)
- ib,jb
- (global) The row and column indices in the distributed matrixBindicating the first row and the first column of the submatrixsub(, respectivelyB)
- descb
- (global and local) array of dimension 9. The array descriptor of the distributed matrixB.
- beta
- (global)Specifies the scalarbeta.Whenbetais equal to zero, thensub(need not be set on input.C)
- c
- (local)Array, size (lld_a,LOCq(). Before entry this array must contain the local pieces of the distributed matrixjc+n-1)sub(.C)
- ic,jc
- (global) The row and column indices in the distributed matrixCindicating the first row and the first column of the submatrixsub(, respectivelyC)
- descc
- (global and local) array of dimension 9. The array descriptor of the distributed matrixC.
Output Parameters
- c
- Overwritten by them-by-ndistributed matrix.alpha*op(sub(A))*op(sub(B)) +beta*sub(C)