acc_is_present (GNU libgomp)

### 6.30 `acc_is_present` – Indicate whether host variable / array is present on device. ¶

Description

  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.

C/C++:

  Prototype: | `int acc_is_present(h_void *a, size_t len);`

Fortran:

  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`

Reference:

  OpenACC specification v2.6, section 3.2.30.