Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp
Show First 20 Lines • Show All 218 Lines • ▼ Show 20 Lines | struct GenELF64DeviceTy : public GenericDeviceTy { | ||||
/// return the same pointer as the device pointer. | /// return the same pointer as the device pointer. | ||||
Expected<void *> dataLockImpl(void *HstPtr, int64_t Size) override { | Expected<void *> dataLockImpl(void *HstPtr, int64_t Size) override { | ||||
return HstPtr; | return HstPtr; | ||||
} | } | ||||
/// Nothing to do when unlocking the buffer. | /// Nothing to do when unlocking the buffer. | ||||
Error dataUnlockImpl(void *HstPtr) override { return Plugin::success(); } | Error dataUnlockImpl(void *HstPtr) override { return Plugin::success(); } | ||||
/// Indicate that the buffer is not pinned. | |||||
Expected<bool> isPinnedPtrImpl(void *HstPtr, void *&BaseHstPtr, | |||||
void *&BaseDevAccessiblePtr, | |||||
size_t &BaseSize) const override { | |||||
return false; | |||||
} | |||||
/// Submit data to the device (host to device transfer). | /// Submit data to the device (host to device transfer). | ||||
Error dataSubmitImpl(void *TgtPtr, const void *HstPtr, int64_t Size, | Error dataSubmitImpl(void *TgtPtr, const void *HstPtr, int64_t Size, | ||||
AsyncInfoWrapperTy &AsyncInfoWrapper) override { | AsyncInfoWrapperTy &AsyncInfoWrapper) override { | ||||
std::memcpy(TgtPtr, HstPtr, Size); | std::memcpy(TgtPtr, HstPtr, Size); | ||||
return Plugin::success(); | return Plugin::success(); | ||||
} | } | ||||
/// Retrieve data from the device (device to host transfer). | /// Retrieve data from the device (device to host transfer). | ||||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |