Next: , Previous: , Up: OpenACC Runtime Library Routines   [Contents][Index]

5.29 acc_is_present – Indicate whether host variable / array is present on device.


This function indicates whether the specified host address in a and a length of len bytes is present on the device. In C/C++, a non-zero value is returned to indicate the presence of the mapped memory on the device. A zero is returned to indicate the memory is not mapped on the device.

In Fortran, two (2) forms are supported. In the first form, a specifies a contiguous array section. The second form a specifies a variable or array element and len specifies the length in bytes. If the host memory is mapped to device memory, then a true is returned. Otherwise, a false is return to indicate the mapped memory is not present.

Prototype:int acc_is_present(h_void *a, size_t len);
Interface:function acc_is_present(a)
type, dimension(:[,:]...) :: a
logical acc_is_present
Interface:function acc_is_present(a, len)
type, dimension(:[,:]...) :: a
integer len
logical acc_is_present

OpenACC specification v2.0, section 3.2.29.