Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
49 Views

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

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
Highlighted
Employee
49 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
Highlighted
49 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