| OPENMP API Specification: Version 5.1 November 2020

3.8.11  omp_get_mapped_ptr

Summary The omp_get_mapped_ptr routine returns the device pointer that is associated with a host pointer for a given device.


SVG-Viewer needed.


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

SVG-Viewer needed.

SVG-Viewer needed.


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

SVG-Viewer needed.

Constraints on Arguments 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_get_mapped_ptr region is the encountering task.

Effect The omp_get_mapped_ptr routine returns the associated device pointer on device device_num. A call to this routine for a pointer that is not NULL (or C_NULL_PTR, for Fortran) and does not have an associated pointer on the given device results in a NULL pointer.

The routine returns NULL (or C_NULL_PTR, for Fortran) if unsuccessful. Otherwise it returns the device pointer, which is ptr if device_num is the value returned by omp_get_initial_device().

SVG-Viewer needed.

The omp_get_mapped_ptr routine requires an explicit interface and so might not be provided in omp_lib.h.

SVG-Viewer needed.

Execution Model Events No events are associated with this routine.

Restrictions Restrictions to the omp_get_mapped_ptr routine are as follows.

Cross References