13.07.2015 Views

KernelGen - GPU Technology Conference

KernelGen - GPU Technology Conference

KernelGen - GPU Technology Conference

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

OpenACC: no pointer arithmetics.Compiler cannot parallelize loops containing pointer arithmetics:sincos.cvoid sincos(int nx, int ny, int nz, float* x, float* y, float* xy) {float *xp = x, *yp = y, *xyp = xy;#pragma acc parallelfor (int k = 0; k < nz; k++)for (int j = 0; j < ny; j++)for (int i = 0; i < nx; i++). *(xyp++) = sin(*(xp++)) + cos(*(yp++));}$ makepgcc -fast -Minfo=accel -ta=nvidia,time -Mcuda=keepgpu,keepbin,keepptx,ptxinfo -c ../sincos.c -o sincos.oPGC-W-0155-.Pointer assignments are not supported in accelerator regions: xyp (../sincos.c: 34)PGC-W-0155-Accelerator region ignored (../sincos.c: 29)PGC/x86-64 Linux 13.2-0: compilation completed with warnings20 / 75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!