diff options
| author | Nicole Aschenbrenner <nicole.aschenbrenner@amd.com> | 2025-10-22 17:35:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-22 17:35:16 +0200 |
| commit | 16641ad8a29b6c877a3f934cd61d6acc9719e87e (patch) | |
| tree | a1067d685c9c55409135079a0e0f9da301f07363 /offload/libomptarget/device.cpp | |
| parent | 2936852d2f6b0e7af6237abe9796c494885b2aac (diff) | |
[OpenMP] Adds omp_target_is_accessible routine (#138294)
Adds omp_target_is_accessible routine.
Refactors common code from omp_target_is_present to work for both
routines.
---------
Co-authored-by: Shilei Tian <i@tianshilei.me>
Diffstat (limited to 'offload/libomptarget/device.cpp')
| -rw-r--r-- | offload/libomptarget/device.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/offload/libomptarget/device.cpp b/offload/libomptarget/device.cpp index 71423ae0c94d..ee36fbed935a 100644 --- a/offload/libomptarget/device.cpp +++ b/offload/libomptarget/device.cpp @@ -367,3 +367,7 @@ bool DeviceTy::useAutoZeroCopy() { return false; return RTL->use_auto_zero_copy(RTLDeviceID); } + +bool DeviceTy::isAccessiblePtr(const void *Ptr, size_t Size) { + return RTL->is_accessible_ptr(RTLDeviceID, Ptr, Size); +} |
