v?MaxMag
v?MaxMag
Returns the element with the larger magnitude between each pair of elements of the two vector arguments.
Syntax
vsMaxMag
(
n
,
a
,
b
,
y
);
vsMaxMagI(n, a, inca, b, incb, y, incy);
vmsMaxMag
(
n
,
a
,
b
,
y
,
mode
);
vmsMaxMagI(n, a, inca, b, incb, y, incy, mode);
vdMaxMag
(
n
,
a
,
b
,
y
);
vdMaxMagI(n, a, inca, b, incb, y, incy);
vmdMaxMag
(
n
,
a
,
b
,
y
,
mode
);
vmdMaxMagI(n, a, inca, b, incb, y, incy, mode);
Include Files
- mkl.h
Input Parameters
Name | Type | Description |
---|---|---|
n | const MKL_INT | Specifies the number of elements to be calculated. |
a , b | const float* for vsMaxMag const float* for vmsMaxMag const double* for vdMaxMag const double* for vmdMaxMag | Pointers to the arrays containing the input vectors a and b . |
inca , incb , incy | const MKL_INT | Specifies increments for the elements of a , b , and y . |
mode | const MKL_INT64 | Overrides the global VM mode setting for this
function call. See
vmlSetMode
for possible values and their
description. |
Output Parameters
Name | Type | Description |
---|---|---|
y | float* for vsMaxMag float* for vmsMaxMag double* for vdMaxMag double* for vmdMaxMag | Pointer to an array containing the output vector y . |
Description
The
v?MaxMag
function returns a vector with element values equal to the element with the larger magnitude from each pair of corresponding elements of the two vectors a
and b
: - If |a| > |ib|iv?MaxMagreturnsa, otherwiseiv?MaxMagreturnsa.i
- If |b| > |ia|iv?MaxMagreturnsb, otherwiseiv?MaxMagreturnsa.i
- Otherwisev?MaxMagbehaves likev?Fmax.
Argument 1 | Argument 2 | Result | VM Error Status | Exception |
---|---|---|---|---|
a i | NAN | a i | ||
NAN | b i | b i | ||
NAN | NAN | NAN |