OpenMP GPU offloading math library?
问题 I am trying to offload code the GPU using OpenMP 4+ directives. I am using ubuntu 16.04 with GCC 7.2 and for general cases it is working fine. My problem comes when I am trying to offload a code that has a call to the sqrtf function that is defined in "math.h". The troubeling code is this: #pragma omp target teams distribute \ map(to:posx[:n],posy[:n],posz[:n]) \ map(from:frcx[:n],frcy[:n],frcz[:n]) for (int i = 0; i < n; i++) { frcx[i] = 0.0f; frcy[i] = 0.0f; frcz[i] = 0.0f; for (int j = 0;