Directional Data Movers
The target enter data and target exit data directives provide unstructured data movement at anytime in the program. Unlike target data which requires a structured block, these directives can be used without any matching structured blocks. But like a target data block, the memory that is allocated on the device and/or data that are transferred by these directives will persist on the device between the enter and the exit directives.
These directives use a reference counting mechanism where each enter data increments the reference count of a particular variable, and each exit data decrements it. Device memory is only freed when the count reaches zero.
The target enter data directive uses the same map clause as before, but only accepts to and alloc as map-types. The target exit data directive accepts from, release, and delete. The release map-type only decreases the reference count and frees when it reaches zero. The delete map-type frees the variable immediately regardless of the reference count.
CVW material development is supported by NSF OAC awards 1854828, 2321040, 2323116 (UT Austin) and 2005506 (Indiana University)