Re: [Doxygen-users] documentation of cuda fortran code
Brought to you by:
dimitri
From: Jian T. Z. <jt....@un...> - 2016-04-23 23:29:31
|
Hi Albert, This works great. I used the macro expansion, but what I didn`t know before is that the file extension needs to be in capital for preprocessing. After I changed file .cuf to .CUF, I got the documentation I wanted. Thanks very much for your help. Tao *---* *Jian Tao ZhangMSc Mechanical Engineering* On Sat, Apr 23, 2016 at 9:05 AM, Albert <alb...@gm...> wrote: > Dear Tao, > > Cuda Fortran has indeed some special extensions, that can be removed by > means of preprocessing, but one has to see to it that the FORTRAN code is > preprocessed. A FORTRAN file can be preprocessed when its extension is in > capitals. In the later case setting: > MACRO_EXPANSION = YES > EXPAND_ONLY_PREDEF = YES > PREDEFINED = attributes(device)= > > should be sufficient. > > Albert > > On Sat, Apr 23, 2016 at 4:21 AM, Jian Tao Zhang <jt....@un...> wrote: > >> Hello, >> >> I am trying to document a source code which includes fortran90 and some >> cuda fortran files. Doxygen handles fortran90 very well, but it has issues >> with recognizing subroutines in cuda fortran code. In the below example >> code, the module mod_index is documented properly, but the subroutine idx >> is not documented. The cause of that I found is that "attributes(device)", >> a syntax of cuda fortran, is in front of subroutine. If I remove >> "attributes(device)" from the source code, then doxygen can list the >> subroutine idx as a member of the module mod_index. >> >> It's almost impossible to remove by hand as too many places in the code. >> I was hoping something more automatic. I tried enabling preprocessor and >> predefined macros, but I need more information to understand it better. I >> use doxygen 1.8.11 on windows 7 machine. >> >> +++++++++++++++++++++ >> module mod_index >> use cudafor >> implicit none >> >> contains >> >> attributes(device) subroutine idx(i,j) >> integer :: i,j,k >> ~~~~~~~~ >> end subroutine >> end module mod_index >> +++++++++++++++++++++ >> >> Thanks >> Tao >> *---* >> >> *Jian Tao ZhangMSc Mechanical Engineering* >> >> >> ------------------------------------------------------------------------------ >> Find and fix application performance issues faster with Applications >> Manager >> Applications Manager provides deep performance insights into multiple >> tiers of >> your business applications. It resolves application problems quickly and >> reduces your MTTR. Get your free trial! >> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z >> _______________________________________________ >> Doxygen-users mailing list >> Dox...@li... >> https://lists.sourceforge.net/lists/listinfo/doxygen-users >> >> > |