Developer Reference for Intel® oneAPI Math Kernel Library for C
?gamx2d
Performs element-wise absolute value maximization.
Syntax
void igamx2d(const MKL_INT *contxt, const char *scope, const char *top, const MKL_INT *m,
const MKL_INT *n, MKL_INT *a, const MKL_INT *lda, MKL_INT *ra, MKL_INT *ca,
const MKL_INT *ldia, const MKL_INT *rdest, const MKL_INT *cdest);
void sgamx2d(const MKL_INT *contxt, const char *scope, const char *top, const MKL_INT *m,
const MKL_INT *n, float *a, const MKL_INT *lda, MKL_INT *ra, MKL_INT *ca,
const MKL_INT *ldia, const MKL_INT *rdest, const MKL_INT *cdest);
void dgamx2d(const MKL_INT *contxt, const char *scope, const char *top, const MKL_INT *m,
const MKL_INT *n, double *a, const MKL_INT *lda, MKL_INT *ra, MKL_INT *ca,
const MKL_INT *ldia, const MKL_INT *rdest, const MKL_INT *cdest);
void cgamx2d(const MKL_INT *contxt, const char *scope, const char *top, const MKL_INT *m,
const MKL_INT *n, float *a, const MKL_INT *lda, MKL_INT *ra, MKL_INT *ca,
const MKL_INT *ldia, const MKL_INT *rdest, const MKL_INT *cdest);
void zgamx2d(const MKL_INT *contxt, const char *scope, const char *top, const MKL_INT *m,
const MKL_INT *n, double *a, const MKL_INT *lda, MKL_INT *ra, MKL_INT *ca,
const MKL_INT *ldia, const MKL_INT *rdest, const MKL_INT *cdest);
Input Parameters
icontxt
Integer handle that indicates the context.
scope
Indicates what scope the combine should proceed on. Limited to ROW , COLUMN , or ALL .
top
Communication pattern to use during the combine operation.
m
The number of matrix rows to be combined.
n
The number of matrix columns to be combined.
a
Matrix to be compared with to produce the maximum.
lda
The leading dimension of the matrix A , that is, the distance between two successive elements in a matrix row.
rcflag
If rcflag = -1, the arrays ra and ca are not referenced and need not exist. Otherwise, rcflag indicates the leading dimension of these arrays, and so must be ≥ m .
rdest
The process row coordinate of the process that should receive the result. If rdest or cdest = -1, all processes within the indicated scope receive the answer.
cdest
The process column coordinate of the process that should receive the result. If rdest or cdest = -1, all processes within the indicated scope receive the answer.
Output Parameters
a
Contains the result if this process is selected to receive the answer, or intermediate results if the process is not selected to receive the result.
ra
If rcflag = -1, this array will not be referenced, and need not exist. Otherwise, it is an integer array (of size at least rcflag x n ) indicating the row index of the process that provided the maximum. If the calling process is not selected to receive the result, this array will contain intermediate (useless) results.
ca
If rcflag = -1, this array will not be referenced, and need not exist. Otherwise, it is an integer array (of size at least rcflag x n ) indicating the row index of the process that provided the maximum. If the calling process is not selected to receive the result, this array will contain intermediate (useless) results.
Description
This routine performs element-wise absolute value maximization, that is, each element of matrix A is compared with the corresponding element of the other process’s matrices. Note that the value of A is returned, but the absolute value is used to determine the maximum (the 1-norm is used for complex numbers). Combines may be globally-blocking, so they must be programmed as if no process returns until all have called the routine.