HOME
| OPENMP API Specification: Version 5.0 November 2018

3.6.3  omp_target_is_present

Summary The omp_target_is_present routine tests whether a host pointer has corresponding storage on a given device.

Format  

 
int omp_target_is_present(const void *ptr, int device_num);  

Constraints on ArgumentsThe value of ptr must be a valid host pointer or NULL. The device_num must be greater than or equal to zero and less than the result of omp_get_num_devices() or the result of a call to omp_get_initial_device().

EffectThis routine returns non-zero if the specified pointer would be found present on device device_num by a map clause; otherwise, it returns zero. When called from within a target region the effect of this routine is unspecified.

Cross References