Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- Element-wise vector-vector multiplication (MKL or IPP)

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

hyouklee

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-21-2010
06:55 PM

519 Views

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

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.

Link Copied

2 Replies

Shane_S_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-21-2010
07:48 PM

519 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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-21-2010
09:29 PM

519 Views

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

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.