omp_target_memset
– Set bytes in device memory asynchronously ¶This routine fills memory on the device identified by device number
device_num. Starting from the device address ptr, the first
count bytes are set to the value val, converted to
unsigned char
. If count is zero, the routine has no effect;
if ptr is NULL
, the behavior is unspecified. Task dependence
is expressed by passing an array of depend objects to depobj_list, where
the number of array elements is passed as depobj_count; if the count is
zero, the depobj_list argument is ignored. In C++ and Fortran, the
depobj_list argument can also be omitted in that case. The function
returns ptr.
The device_num must be a conforming device number and ptr must be
a valid device pointer for that device. Running this routine in a
target
region except on the initial device is not supported.
Prototype: | void *omp_target_memcpy_async(void *ptr, |
int val, | |
size_t count, | |
int device_num, | |
int depobj_count, | |
omp_depend_t *depobj_list) |
Interface: | type(c_ptr) function omp_target_memset_async( & |
ptr, val, count, device_num, & | |
depobj_count, depobj_list) 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 :: count | |
integer(c_int), value :: val, device_num, depobj_count | |
integer(omp_depend_kind), optional :: depobj_list(*) |
OpenMP specification v6.0, Section 25.8.2