omp_target_free
Purpose
The omp_target_free function frees the device memory allocated by the omp_target_alloc function.
Prototype
void omp_target_free(void * device_ptr, int device_num);
Parameters
- device_ptr
- Specifies the device address of a storage location that is returned by the omp_target_alloc function.
- device_num
- Must be the device number of the host device or be non-negative and less than the number of target devices.
Usage
If device_ptr is NULL, the operation is ignored.
You must insert synchronization to ensure that all accesses to device_ptr are completed before the call to omp_target_free.
You cannot call this function on a target device.