using assignment or cuda API for 2D/3D array

I’m planning to use 2D/3D data array for PDE solving. I’m not sure if using cuda runtime API for array allocation/memory transfer or using CUDA Fortran allocate()/assignment is better?

Could someone give me an advice?

Also, does CUDA Fortran support all CUDA runtime APIs necessary for manipulating 2D/3D array?


Hi Tuan,

When you do a host to device assignment, the compiler will select the appropriate allocation and assignment CUDA calls. Though, you can call the 2D/3D CUDA API calls directly as well. For new CUDA API calls not listed in the PGI CUDA Fortran reference manual, you simply need to add an explicit interface to the routines before calling them.

  • Mat

Thanks a lot Mat. I thought you had forgotten my question :)


I thought you had forgotten my question :)

Nope, just on vacation over the holidays. I tried to answer a few questions from home but only had time for a few.

  • Mat