mardi 21 juin 2022

Use __gnu_parallel::sort() with nvcc

I am using Ubuntu 16.04 with NVCC 7.5 and GCC 5.4.0.

testFile.cu

#include <math.h>
#include <parallel/algorithm>
void main(){
    
      <some work is beeing donbe here>

      __gnu_parallel::sort(vector.begin(),vector.end(),<comparator function>);
}

I am getting the errors

/usr/include/c++/5/tr1/cmath(424): error: function "acosh(float)" has already been defined

/usr/include/c++/5/tr1/cmath(442): error: function "asinh(float)" has already been defined

/usr/include/c++/5/tr1/cmath(461): error: function "atanh(float)" has already been defined

/usr/include/c++/5/tr1/cmath(477): error: function "cbrt(float)" has already been defined

/usr/include/c++/5/tr1/cmath(495): error: function "copysign(float, float)" has already been defined

/usr/include/c++/5/tr1/cmath(516): error: function "erf(float)" has already been defined

/usr/include/c++/5/tr1/cmath(532): error: function "erfc(float)" has already been defined

/usr/include/c++/5/tr1/cmath(550): error: function "exp2(float)" has already been defined

/usr/include/c++/5/tr1/cmath(566): error: function "expm1(float)" has already been defined

/usr/include/c++/5/tr1/cmath(608): error: function "fdim(float, float)" has already been defined

Can anybody please let me know how __gnu_parallel::sort can be used with nvcc. Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire