omp_target_memset
– Set bytes in device memory ¶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. 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(void *ptr, |
int val, | |
size_t count, | |
int device_num) |
Interface: | type(c_ptr) function omp_target_memset( & |
ptr, val, count, 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 :: count | |
integer(c_int), value :: val, device_num |
omp_target_memset
– Set bytes in device memory asynchronously
OpenMP specification v6.0, Section 25.8.1