Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
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?tradd

Performs sum operation for two distributed triangular matrices.

Syntax

void pstradd (const char *uplo , const char *trans , const MKL_INT *m , const MKL_INT *n , const float *alpha , const float *a , const MKL_INT *ia , const MKL_INT *ja , const MKL_INT *desca , const float *beta , float *c , const MKL_INT *ic , const MKL_INT *jc , const MKL_INT *descc );

void pdtradd (const char *uplo , const char *trans , const MKL_INT *m , const MKL_INT *n , const double *alpha , const double *a , const MKL_INT *ia , const MKL_INT *ja , const MKL_INT *desca , const double *beta , double *c , const MKL_INT *ic , const MKL_INT *jc , const MKL_INT *descc );

void pctradd (const char *uplo , const char *trans , const MKL_INT *m , const MKL_INT *n , const MKL_Complex8 *alpha , const MKL_Complex8 *a , const MKL_INT *ia , const MKL_INT *ja , const MKL_INT *desca , const MKL_Complex8 *beta , MKL_Complex8 *c , const MKL_INT *ic , const MKL_INT *jc , const MKL_INT *descc );

void pztradd (const char *uplo , const char *trans , const MKL_INT *m , const MKL_INT *n , const MKL_Complex16 *alpha , const MKL_Complex16 *a , const MKL_INT *ia , const MKL_INT *ja , const MKL_INT *desca , 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?tradd routines perform sum operation for two distributed triangular matrices. The operation is defined as

sub(C):=beta*sub(C) + alpha*op(sub(A)),

where:

op(x) is one of op(x) = x, or op(x) = x', or op(x) = conjg(x').

alpha and beta are scalars,

sub(C) is an m-by-n distributed matrix, sub(C)=C(ic:ic+m-1, jc:jc+n-1).

sub(A) is a distributed matrix, sub(A)=A(ia:ia+n-1, ja:ja+m-1).

Input Parameters

uplo

(global) Specifies whether the distributed matrix sub(C) is upper or lower triangular:

if uplo = 'U' or 'u', then the matrix is upper triangular;

if uplo = 'L' or 'l', then the matrix is low triangular.

trans

(global) Specifies the operation:

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

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

if trans = 'C' or 'c', then op(sub(A)) := conjg(sub(A)').

m

(global) Specifies the number of rows of the distributed matrix sub(C) and the number of columns of the submatrix sub(A), m 0.

n

(global) Specifies the number of columns of the distributed matrix sub(C) and the number of rows of the submatrix sub(A), n 0.

alpha

(global)

Specifies the scalar alpha.

a

(local)

Array, size (lld_a, LOCq(ja+m-1)). 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.

beta

(global)

Specifies the scalar beta.

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

c

(local)

Array, size (lld_c, LOCq(jc+n-1)).

This array contains the local pieces of the distributed matrix sub(C).

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

Overwritten by the updated submatrix.