Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

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

Duane_R_
Beginner
563 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
Moderator
563 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

0 Kudos
Andreas_Fabri__Geome
563 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.
 

0 Kudos
Reply