Developer Reference for Intel® oneAPI Math Kernel Library for C
p?syr2k
Performs a rank-2k update of a symmetric distributed matrix.
Syntax
void pssyr2k ( const char*uplo , const char*trans , 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 pdsyr2k ( const char*uplo , const char*trans , 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 pcsyr2k ( const char*uplo , const char*trans , 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 pzsyr2k ( const char*uplo , const char*trans , 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?syr2k routines perform a distributed matrix-matrix operation defined as sub( C ):= alpha *sub( A )*sub( B )’+ alpha *sub( B )*sub( A )’+ beta *sub( C ),
or sub( C ):= alpha *sub( A )’*sub( B ) + alpha *sub( B )’*sub( A ) + beta *sub( C ),
where:
alpha and beta are scalars,
sub(C) is an n -by- n symmetric distributed matrix, sub(C)=C(ic:ic+n-1, jc:jc+n-1) .
sub(A) is a distributed matrix, sub(A)=A(ia:ia+n-1, ja:ja+k-1) , if trans = 'N' or 'n' , and sub(A)=A(ia:ia+k-1, ja:ja+n-1) otherwise.
sub(B) is a distributed matrix, sub(B)=B(ib:ib+n-1, jb:jb+k-1) , if trans = 'N' or 'n' , and sub(B)=B(ib:ib+k-1, jb:jb+n-1) otherwise.
Input Parameters
uplo
(global) Specifies whether the upper or lower triangular part of the symmetric distributed matrix sub(C) is used:
If uplo = 'U' or ‘u’ , then the upper triangular part of the sub(C) is used. If uplo = 'L' or ‘l’ , then the low triangular part of the sub(C) is used.
trans
(global) Specifies the operation:
if trans = 'N' or 'n' , then sub(C) := alpha*sub(A)*sub(B)' + alpha*sub(B)*sub(A)' + beta*sub(C) ; if trans = 'T' or 't' , then sub(C) := alpha*sub(B)'*sub(A) + alpha*sub(A)'*sub(B) + beta*sub(C) .
n
(global) Specifies the order of the distributed matrix sub(C) , n ≥ 0.
k
(global) On entry with trans = 'N' or ‘n’ , k specifies the number of columns of the distributed matrices sub(A) and sub(B) , and on entry with trans = 'T' or ‘t’ , k specifies the number of rows of the distributed matrices sub(A) and sub(B) , k ≥ 0.
alpha
(global)
DOUBLE PRECISION for pdsyr2k COMPLEX for pcsyr2k DOUBLE COMPLEX for pzsyr2k Specifies the scalar alpha .
a
(local)
DOUBLE PRECISION for pdsyr2k COMPLEX for pcsyr2k DOUBLE COMPLEX for pzsyr2k Array, size (lld_a, kla) , where kla is LOCq(ja+k-1) when trans = 'N' or ‘n’ , and is LOCq(ja+n-1) otherwise. Before entry with trans = 'N' or ‘n’ , this array contains the local pieces of the distributed matrix sub(A) .
ia , ja
(global) The row and column indices in the distributed matrix A indicating the first row and the first column of the submatrix sub(A) , respectively.
desca
(global and local) array of dimension 9. The array descriptor of the distributed matrix A .
b
(local)
DOUBLE PRECISION for pdsyr2k COMPLEX for pcsyr2k DOUBLE COMPLEX for pzsyr2k Array, size (lld_b, klb) , where klb is LOCq(jb+k-1) when trans = 'N' or ‘n’ , and is LOCq(jb+n-1) otherwise. Before entry with trans = 'N' or ‘n’ , this array contains the local pieces of the distributed matrix sub(B) .
ib , jb
(global) The row and column indices in the distributed matrix B indicating the first row and the first column of the submatrix sub(B) , respectively.
descb
(global and local) array of dimension 9. The array descriptor of the distributed matrix B .
beta
(global)
DOUBLE PRECISION for pdsyr2k COMPLEX for pcsyr2k DOUBLE COMPLEX for pzsyr2k Specifies the scalar beta .
c
(local)
DOUBLE PRECISION for pdsyr2k COMPLEX for pcsyr2k DOUBLE COMPLEX for pzsyr2k Array, size (lld_c, LOCq(jc+n-1)) . Before entry with uplo = 'U' or ‘u’ , this array contains n -by- n upper triangular part of the symmetric distributed matrix sub(C) and its strictly lower triangular part is not referenced. Before entry with uplo = 'L' or ‘l’ , this array contains n -by- n lower triangular part of the symmetric distributed matrix sub(C) and its strictly upper triangular part is not referenced.
ic , jc
(global) The row and column indices in the distributed matrix C indicating the first row and the first column of the submatrix sub(C) , respectively.
descc
(global and local) array of dimension 9. The array descriptor of the distributed matrix C .
Output Parameters
- c
-
With uplo = 'U' or ‘u’ , the upper triangular part of sub(C) is overwritten by the upper triangular part of the updated distributed matrix. With uplo = 'L' or ‘l’ , the lower triangular part of sub(C) is overwritten by the upper triangular part of the updated distributed matrix.