Performs element by element addition of vector a and vector b.
Fortran:
call vsadd( n, a, b, y )
call vdadd( n, a, b, y )
call vcadd( n, a, b, y )
call vmcadd( n, a, b, y, mode )
call vzadd( n, a, b, y )
call vmzadd( n, a, b, y, mode )
C:
vsAdd( n, a, b, y );
vdAdd( n, a, b, y );
vcAdd( n, a, b, y );
vmcAdd( n, a, b, y, mode );
vzAdd( n, a, b, y );
vmzAdd( n, a, b, y, mode );
The FORTRAN 77 interfaces are specified in the mkl_vml.f77 include file, the Fortran 95 interfaces are specified in the mkl_vml.f90 include file, and the C interfaces are specified in the mkl_vml_functions.h include file.
Name |
Type |
Description |
---|---|---|
n |
FORTRAN 77: INTEGER Fortran 90: INTEGER, INTENT(IN) C: const int |
Specifies the number of elements to be calculated. |
a, b |
FORTRAN 77: REAL for vsadd DOUBLE PRECISION for vdadd COMPLEX for vcadd DOUBLE COMPLEX for vzadd Fortran 90: REAL, INTENT(IN) for vsadd DOUBLE PRECISION, INTENT(IN) for vdadd COMPLEX, INTENT(IN) for vcadd DOUBLE COMPLEX, INTENT(IN) for vzadd C: const float* for vsAdd const double* for vdAdd const MKL_Complex8* for vcAdd const MKL_Complex16* for vzAdd |
FORTRAN: Arrays that specify the input vectors a and b. C: Pointers to arrays that contain the input vectors a and b. |
mode |
FORTRAN 77: INTEGER*8 Fortran 90: INTEGER(KIND=8), INTENT(IN) C: const MKL_INT64 |
Overrides global VML mode setting for this function call. See SetMode for possible values and their description. |
Name |
Type |
Description |
---|---|---|
y |
FORTRAN 77: REAL for vsadd DOUBLE PRECISION for vdadd COMPLEX, for vcadd DOUBLE COMPLEX for vzadd Fortran 90: REAL, INTENT(OUT) for vsadd DOUBLE PRECISION, INTENT(OUT) for vdadd COMPLEX, INTENT(OUT) for vcadd DOUBLE COMPLEX, INTENT(OUT) for vzadd C: float* for vsAdd double* for vdAdd MKL_Complex8* for vcAdd MKL_Complex16* for vzAdd |
FORTRAN: Array that specifies the output vector y. C: Pointer to an array that contains the output vector y. |
The v?Add function performs element by element addition of vector a and vector b.
Argument 1 | Argument 2 | Result | Exception |
---|---|---|---|
+0 | +0 | +0 | |
+0 | -0 | +0 | |
-0 | +0 | +0 | |
-0 | -0 | -0 | |
+∞ | +∞ | +∞ | |
+∞ | -∞ | QNAN | INVALID |
-∞ | +∞ | QNAN | INVALID |
-∞ | -∞ | -∞ | |
SNAN | any value | QNAN | INVALID |
any value | SNAN | QNAN | INVALID |
QNAN | non-SNAN | QNAN | |
non-SNAN | QNAN | QNAN |
Specifications for special values of the complex functions are defined according to the following formula
Add(x1+i*y1,x2+i*y2) = (x1+x2) + i*(y1+y2)
Overflow in a complex function occurs (supported in the HA/LA accuracy modes only) when x1, x2, y1, y2 are finite numbers, but the real or imaginary part of the exact result is so large that it does not fit the target precision. In this case, the function returns ∞ in that part of the result, raises the OVERFLOW exception, and sets the VML Error Status to VML_STATUS_OVERFLOW.
Copyright © 1994 - 2011, Intel Corporation. All rights reserved.