SummaryThe omp_target_disassociate_ptr removes the associated pointer for a given device from a host pointer.
int omp_target_disassociate_ptr(const void *ptr, int device_num);
Constraints on ArgumentsThe device_num must be greater than or equal to zero and less than the result of omp_get_num_devices() or equal to the result of a call to omp_get_initial_device().
EffectThe omp_target_disassociate_ptr removes the associated device data on device device_num from the presence table for host pointer ptr. A call to this routine on a pointer that is not NULL and does not have associated data on the given device results in unspecified behavior. The reference count of the mapping is reduced to zero, regardless of its current value. When called from within a target region the effect of this routine is unspecified.
The routine returns zero if successful. Otherwise it returns a non-zero value.
After a call to omp_target_disassociate_ptr, the contents of the device buffer are invalidated.
Execution Model EventsThe target-data-disassociate event occurs when a thread disassociates data on a target device.
Tool CallbacksA thread invokes a registered ompt_callback_target_data_op callback for each occurrence of a target-data-disassociate event in that thread. The callback occurs in the context of the target task and has type signature ompt_callback_target_data_op_t.