v?Mul

Performs element by element multiplication of vector a and vector b.

Syntax

FORTRAN:

call vsmul( n, a, b, y )

call vmsmul( n, a, b, y, mode )

call vdmul( n, a, b, y )

call vmdmul( n, a, b, y, mode )

call vcmul( n, a, b, y )

call vmcmul( n, a, b, y, mode )

call vzmul( n, a, b, y )

call vmzcmul( n, a, b, y, mode )

C:

vsMul( n, a, b, y );

vmsMul( n, a, b, y, mode );

vdMul( n, a, b, y );

vmdMul( n, a, b, y, mode );

vcMul( n, a, b, y );

vmcMul( n, a, b, y, mode );

vzMul( n, a, b, y );

vmzMul( n, a, b, y, mode );

Include Files

Input Parameters

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 vsmul, vmsmul

DOUBLE PRECISION for vdmul, vmdmul

COMPLEX for vcmul, vmcmul

DOUBLE COMPLEX for vzmul, vmzmul

Fortran 90: REAL, INTENT(IN) for vsmul, vmsmul

DOUBLE PRECISION, INTENT(IN) for vdmul, vmdmul

COMPLEX, INTENT(IN) for vcmul, vmcmul

DOUBLE COMPLEX, INTENT(IN) for vzmul, vmzmul

C: const float* for vsMul, vmsmul

const double* for vdMul, vmdmul

const MKL_Complex8* for vcMul, vmcMul

const MKL_Complex16* for vzMul, vmzMul

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 vmlSetMode for possible values and their description.

Output Parameters

Name

Type

Description

y

FORTRAN 77: REAL for vsmul, vmsmul

DOUBLE PRECISION for vdmul, vmdmul

COMPLEX, for vcmul, vmcmul

DOUBLE COMPLEX for vzmul, vmzmul

Fortran 90: REAL, INTENT(OUT) for vsmul, vmsmul

DOUBLE PRECISION, INTENT(OUT) for vdmul, vmdmul

COMPLEX, INTENT(OUT) for vcmul, vmcmul

DOUBLE COMPLEX, INTENT(OUT) for vzmul, vmzmul

C: float* for vsMul, vmsmul

double* for vdMul, vmdmul

MKL_Complex8* for vcMul, vmcMul

MKL_Complex16* for vzMul, vmzMul

FORTRAN: Array that specifies the output vector y.

C: Pointer to an array that contains the output vector y.

Description

The v?Mul function performs element by element multiplication of vector a and vector b.

Special values for Real Function v?Mul(x)
Argument 1 Argument 2 Result Exception
+0 +0 +0  
+0 -0 -0  
-0 +0 -0  
-0 -0 +0  
+0 + QNAN INVALID
+0 - QNAN INVALID
-0 + QNAN INVALID
-0 - QNAN INVALID
+ +0 QNAN INVALID
+ -0 QNAN INVALID
- +0 QNAN INVALID
- -0 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

Mul(x1+i*y1,x2+i*y2) = (x1*x2-y1*y2) + i*(x1*y2+y1*x2).

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.


Submit feedback on this help topic