Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

parallel sorting?

Azua_Garcia__Giovann
185 Views

Hello,

While using gcc/g++ I could enable parallel sorting using the following preprocessor instructions:

#if defined(__GLIBCXX__) && defined(HAVE_OPENMP)
  #include <parallel/algorithm>
  using __gnu_parallel::sort;
  using __gnu_parallel::stable_sort;
#else
  using std::sort;
  using std::stable_sort;
#endif

Would this still work using the Intel compiler? would these definitions be available? is there a parallel sorting implementation by Intel I could use e.g. Bitonic Sort??

TIA,

Best regards,

Giovanni

0 Kudos
2 Replies
TimP
Black Belt
185 Views
icc's libiomp5 OpenMP library should support all the libgomp functions.compatibly with both gcc and icc. There should be some sort implementation in tbb.
SergeyKostrov
Valued Contributor II
185 Views
Hi, >>...Is there a parallel sorting implementation by Intel... I don't know if there is any one implemented by Intel and I think you need to verify a web-page with Intel articles and sources. In a more generic terms, every iterative sorting algorithm could be parallelized using OpenMP. With recursive sorting algorithms it also could be done and there are lots of books with sources that demonstrate how to do it. I didn't hear anything about Bitonic sorting algorithm and my question is did you compare its performance with Quick, or Heap, or Merge sorting algorithms on a data set larger than 256MB? Best regards, Sergey
Reply