- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
An example of something I often have to do - I have a vector with (say) 1024 floating point values and I want the maximum of every 8 values, i.e.
output[0] = max (input, 0 to 7)
output[1] = max (input, 8 to 15)
output[2] = max (input, 15 to 23)
etc.
So what's the correct / most efficient way to do this? I don't think there's a function...
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There may be a better answer, but based on this description I think you're correct that this is not covered by a single function. It may be possible to work in a loop across this vector where you compute the maximum for every 8 values separately. You may want to check whether it is faster to use an IPP function on these very short vectors or write your own max function.
Depending on future use of this data you may be able to combine steps after computing the max inside this loop for greater cache efficiency. That is an advantage you will get with looping over shorter vectors that would not be available by calling a single IPP function to go over the entire array.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jeffrey,
Pretty well my conclusion. Having made extensive use of the ipps functions, I miss only two:
1) ippsFMODF_32f
2) As I described above.
I couldn't live without IPP :) .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI Simon,
Just add one piece. If you have Intel composer product, you can try array notation, which can operate array in simple way.
for example, C[:]=A[:]+B[:].
for (i<0; i<length; i+=8)
b[:]=__sec_reduce_max(a);
Best Regards,
Ying

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