- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an input data of int16 data that I need to convert to float32 in a widening conversion for floating point operations using either MKL or IPP. Is there a way using either of those libraries to copy the int16 inputs to a float32 array? I do not have any sample code at the moment to provide as I have not written it yet.
Generically, the computation will be to convert short[] to float[], then apply an elementwise addition to a scalar, followed by an elementwise multiplication by a scalar. I know how to do those in-place with IPP. It’s efficient widening conversion that has me at the moment. Is there perhaps an even more efficient approach than widening conversion via copy?
Generically, the computation will be to convert short[] to float[], then apply an elementwise addition to a scalar, followed by an elementwise multiplication by a scalar. I know how to do those in-place with IPP. It’s efficient widening conversion that has me at the moment. Is there perhaps an even more efficient approach than widening conversion via copy?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may try the following API:
IppStatus ippsConvert_16s32f(const Ipp16s* pSrc, Ipp32f* pDst, int len);
IppStatus ippsConvert_16u32f(const Ipp16u* pSrc, Ipp32f* pDst, int len);
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Robert,
Thanks for reaching out to us, we are working on your issue and will get back to you soon.
Regards
Rajesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may try the following API:
IppStatus ippsConvert_16s32f(const Ipp16s* pSrc, Ipp32f* pDst, int len);
IppStatus ippsConvert_16u32f(const Ipp16u* pSrc, Ipp32f* pDst, int len);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue is closing. In the case of any issues or updates, you may re-open the current issue or open the one or communicate with me directly via email (Gennady.Fedorov@intel.com).
Reply
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