Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

parallel sorting?

Azua_Garcia__Giovann
415 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
Honored Contributor III
415 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.
0 Kudos
SergeyKostrov
Valued Contributor II
415 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
0 Kudos
Reply