Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

c++ std::nth_element-like sorting in IPP?

Duane_R_
Beginner
173 Views

Does IPP contain a method for computing 'partially sorted' data? In particular, I'm looking for something comparable to the std::nth_element method in C++ that guarantees that data elements less than the element value at n reside at indices less than n, and those that are greater than the value at n reside at indices greater than n, but with no sorting guaranteed for indices i<n guaranteed (and, of course, none for i>n). Thanks in advance for your help.
 

0 Kudos
2 Replies
Chao_Y_Intel
Employee
173 Views

Hi, 

Thanks for checking this.  Intel IPP does not include this function now.  I may track it in our feature request database, so it can be reviewed when we plan the future release.   Where will such function be helpful? 

Regards,
Chao

Andreas_Fabri__Geome
173 Views

In the sequential setting finding the nth_element takes linear time, whereas sorting takes N log N time, so maybe a parallel nth_element is also faster than a parallel sort.
 

Reply