Cesar,

On 12/07/2015 09:55 AM, Cesar Philippidis wrote:

[snip snip]
Two observations:

  1. Why is deviceptr so special that gomp_map_vars can't handle it
     directly?

Recall that the deviceptr clause in Fortran presents as two
mappings: FORCE_DEVICEPTR and POINTER. The former
has the device address in hostaddr, while the latter has the
host address of the pointer in hostaddr. The new code
detects a properly formed pair and if found, proceeds to
turn the latter into the FORCE_DEVICEPTR map, while the
former is effectively discarded by setting hostaddr to NULL.

This behavior is specific to OpenACC, so I decided put it where
I did. Could it be put into gomp_map_vars? Probably. Would it
be messy? Probably. But what may be a better solution would
be to use the functionality that handles the use_device_ptr
clause in OpenMP4.1 and eliminate FORCE_DEVICEPTR from
gomp_map_var. Have to look into that.



  2. It appears that deviceptr code in GOACC_parallel_keyed is mostly
     identical to GOACC_data_start. Can you put that duplicate code into
     a function? That would be easier to maintain in the long run.


Fixed.

Thanks,
Jim


Reply via email to