Community
cancel
Showing results for 
Search instead for 
Did you mean: 
hyouklee
Beginner
509 Views

Element-wise vector-vector multiplication (MKL or IPP)

Hi.

I'm looking for a function in MKL or IPP or other related libraries
that does element-wise multiplication on two vectors.

[a1, a2, a3, ...] * [b1, b2, b3, ...] = [(a1*b1), (a2*b2), (a3*b3), ...]

The elements will be floating point numbers (doubles or floats).

I searched the MKL and IPP documentations,
but could not find the function that does this operations.
Is there a function for this?
Thanks.

HyoukJoong.
0 Kudos
2 Replies
Shane_S_Intel
Employee
509 Views

Intel MKL contains these functions which should correspond to what you want to do - see the MKL reference manual Vector Math Library section.

Fortran:

call vsmul( n, a, b, y )

call vdmul( n, a, b, y )

call vcmul( n, a, b, y )

call vzmul( n, a, b, y )

C:

vsMul( n, a, b, y );

vdMul( n, a, b, y );

vcMul( n, a, b, y );

vzMul( n, a, b, y );

Gennady_F_Intel
Moderator
509 Views

HyoukJoong,

Intel IPP offers the same functionality but only with C API.

IPP offers not-in place and in-place operations for floating and integer data with and without scaling.

See the details into the IPP Reference Manual, Signal Processing,

Arithmatic Functions section.

The examples of APIimmediately below shows the not-in-place operations on floating point data:

IppStatus ippsMul_64f(const Ipp64f* pSrc1, const Ipp64f* pSrc2, Ipp64f* pDst, int len);

IppStatus ippsMul_32fc(const Ipp32fc* pSrc1, const Ipp32fc* pSrc2, Ipp32fc* pDst, int len);

--Gennady

Reply