Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

p?gemm

Computes a scalar-matrix-matrix product and adds the result to a scalar-matrix product for distributed matrices.

Syntax

call psgemm(transa, transb, m, n, k, alpha, a, ia, ja, desca, b, ib, jb, descb, beta, c, ic, jc, descc)

call pdgemm(transa, transb, m, n, k, alpha, a, ia, ja, desca, b, ib, jb, descb, beta, c, ic, jc, descc)

call pcgemm(transa, transb, m, n, k, alpha, a, ia, ja, desca, b, ib, jb, descb, beta, c, ic, jc, descc)

call pzgemm(transa, transb, m, n, k, alpha, a, ia, ja, desca, b, ib, jb, descb, beta, c, ic, jc, 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(x) is one of op(x) = x, or op(x) = x',

alpha and beta are scalars,

sub(A)=A(ia:ia+m-1, ja:ja+k-1), sub(B)=B(ib:ib+k-1, jb:jb+n-1), and sub(C)=C(ic:ic+m-1, jc:jc+n-1), are distributed matrices.

Input Parameters

transa

(global) CHARACTER*1. Specifies the form of op(sub(A)) used in the matrix multiplication:

if transa = 'N' or 'n', then op(sub(A)) = sub(A);

if transa = 'T' or 't', then op(sub(A)) = sub(A)';

if transa = 'C' or 'c', then op(sub(A)) = sub(A)'.

transb

(global) CHARACTER*1. Specifies the form of op(sub(B)) used in the matrix multiplication:

if transb = 'N' or 'n', then op(sub(B)) = sub(B);

if transb = 'T' or 't', then op(sub(B)) = sub(B)';

if transb = 'C' or 'c', then op(sub(B)) = sub(B)'.

m

(global) INTEGER. Specifies the number of rows of the distributed matrices op(sub(A)) and sub(C), m 0.

n

(global) INTEGER. Specifies the number of columns of the distributed matrices op(sub(B)) and sub(C), n 0.

The value of n must be at least zero.

k

(global) INTEGER. Specifies the number of columns of the distributed matrix op(sub(A)) and the number of rows of the distributed matrix op(sub(B)).

The value of k must be greater than or equal to 0.

alpha

(global)REAL for psgemm

DOUBLE PRECISION for pdgemm

COMPLEX for pcgemm

DOUBLE COMPLEX for pzgemm

Specifies the scalar alpha.

When alpha is equal to zero, then the local entries of the arrays a and b corresponding to the entries of the submatrices sub(A) and sub(B) respectively need not be set on input.

a

(local) REAL for psgemm

DOUBLE PRECISION for pdgemm

COMPLEX for pcgemm

DOUBLE COMPLEX for pzgemm

Array, size lld_a by kla, where kla is LOCc(ja+k-1) when transa = 'N' or 'n', and is LOCq(ja+m-1) otherwise. Before entry this array must contain the local pieces of the distributed matrix sub(A).

ia, ja

(global) INTEGER. 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) INTEGER array of dimension 9. The array descriptor of the distributed matrix A.

b

(local)REAL for psgemm

DOUBLE PRECISION for pdgemm

COMPLEX for pcgemm

DOUBLE COMPLEX for pzgemm

Array, size lld_b by klb, where klb is LOCc(jb+n-1) when transb = 'N' or 'n', and is LOCq(jb+k-1) otherwise. Before entry this array must contain the local pieces of the distributed matrix sub(B).

ib, jb

(global) INTEGER. 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) INTEGER array of dimension 9. The array descriptor of the distributed matrix B.

beta

(global)REAL for psgemm

DOUBLE PRECISION for pdgemm

COMPLEX for pcgemm

DOUBLE COMPLEX for pzgemm

Specifies the scalar beta.

When beta is equal to zero, then sub(C) need not be set on input.

c

(local)REAL for psgemm

DOUBLE PRECISION for pdgemm

COMPLEX for pcgemm

DOUBLE COMPLEX for pzgemm

Array, size (lld_a, LOCq(jc+n-1)). Before entry this array must contain the local pieces of the distributed matrix sub(C).

ic, jc

(global) INTEGER. 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) INTEGER array of dimension 9. The array descriptor of the distributed matrix C.

Output Parameters

c

Overwritten by the m-by-n distributed matrix alpha*op(sub(A))*op(sub(B)) + beta*sub(C).