Reputation: 12109
I have been looking at porting a cuda library to fortran. PGI and EM Photonics seem to be two libraries that exist right now. However I have only found what I am looking for over here
real, device, allocatable :: adev(:), bdev(:) ! device declaration
So my question is, is there a way to create custom arrays like the code sample mentioned above ? Or is it part of the propreitary compiler from PGI ?
Edited for further clarity
In other words can I do this
mycustomtype, allocatable :: tmp(:)
Upvotes: 1
Views: 240
Reputation: 62568
No, that is standard Fortran. There are several ways to declare arrays; this one in particular is called declaring a deferred-shape allocatable array.
Your best shot would be to check out PGI's documentation under array declaration.
Upvotes: 2