It seems that in CUDA Fortran, the “pinned” attribute can be used for selected arrays, and provide some level of fine-grained control. I wonder whether we can do the same in C++? i.e. only use pinned memory for certain arrays that have to go through frequent transfers. If not, is there a plan of enabling this feature in the future?
If we truly want to have this fine-grained control, would it be feasible to compile the codes separately and only partial codes see the “pinned” compiler flag?