Hi, I am enjoying cuda fortran for my calculation of explicit dynamic finite element analysis.
I am using 15.5 version of PGI cuda fortran compiler on the Windows7(64bit) OS using Tesla K20c (Cuda 6.5).
I want to ask you whether “recursion” can be used in device subprograms and function or not. Please tell me, can I officially use this in the 15.5 version of PGI cuda fortran ?
it seems that recursion can be used in cuda fortran.
However, CUDA Fortran Programming Guide and Reference Version 2015 (https://www.pgroup.com/doc/pgicudaforug.pdf), especially 3.1.4. Restrictions on Device Subprograms, says:
" A subroutine or function with the device or global attribute must satisfy the following restrictions: It may not be recursive, nor have the recursive prefix on the subprogram statement.", meaning that recursion cannot be used…
Which information is true?
In case that we can use recursion, it can be used like:
attributes(device) recursive subroutine ****
attributes(device) datatype function *****
(I am considering the use of recursion from kernel, not from host)
Thank you in advance for your attention to this matter,