- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page