HOME
| OPENMP API Specification: Version 5.1 November 2020

3.8.4  omp_target_is_accessible

Summary The omp_target_is_accessible routine tests whether host memory is accessible from a given device.

Format

SVG-Viewer needed.

 

 
int omp_target_is_accessible( const void *ptr, size_t size, 
                              int device_num);  

SVG-Viewer needed.

SVG-Viewer needed.

 

 
integer(c_int) function omp_target_is_accessible( & 
               ptr, size, device_num) bind(c) 
use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int 
type(c_ptr), value :: ptr 
integer(c_size_t), value :: size 
integer(c_int), value :: device_num  

SVG-Viewer needed.

Constraints on Arguments The value of ptr must be a valid host pointer or NULL (or C_NULL_PTR, for Fortran). The device_num argument must be greater than or equal to zero and less than or equal to the result of omp_get_num_devices().

Binding The binding task set for an omp_target_is_accessible region is the encountering task.

Effect This routine returns true if the storage of size bytes starting at the address given by ptr is accessible from device device_num. Otherwise, it returns false.

Restrictions Restrictions to the omp_target_is_accessible routine are as follows.

Cross References