Lines Matching defs:HstPtr

78         Device->allocate(1024, /*HstPtr=*/nullptr, TARGET_ALLOC_DEFAULT);
119 Device->allocate(TotalSize, /*HstPtr=*/nullptr, TARGET_ALLOC_DEFAULT);
387 auto &[HstPtr, DevPtr] = IndirectCallTable.emplace_back();
394 HstPtr = Entry.Address;
514 "Copying data from host to device, HstPtr=" DPxMOD ", TgtPtr=" DPxMOD
1068 Error PinnedAllocationMapTy::insertEntry(void *HstPtr, void *DevAccessiblePtr,
1071 auto Res = Allocs.insert({HstPtr, DevAccessiblePtr, Size, ExternallyLocked});
1081 if (intersects(NextEntry->HstPtr, NextEntry->Size, HstPtr, Size))
1091 size_t Erased = Allocs.erase({Entry.HstPtr});
1098 void *HstPtr, size_t Size) {
1099 if (!contains(Entry.HstPtr, Entry.Size, HstPtr, Size))
1114 Error PinnedAllocationMapTy::registerHostBuffer(void *HstPtr,
1117 assert(HstPtr && "Invalid pointer");
1124 const EntryTy *Entry = findIntersecting(HstPtr);
1129 return insertEntry(HstPtr, DevAccessiblePtr, Size);
1132 Error PinnedAllocationMapTy::unregisterHostBuffer(void *HstPtr) {
1133 assert(HstPtr && "Invalid pointer");
1137 const EntryTy *Entry = findIntersecting(HstPtr);
1142 if (Entry->HstPtr != HstPtr)
1158 Expected<void *> PinnedAllocationMapTy::lockHostBuffer(void *HstPtr,
1160 assert(HstPtr && "Invalid pointer");
1165 const EntryTy *Entry = findIntersecting(HstPtr);
1169 if (auto Err = registerEntryUse(*Entry, HstPtr, Size))
1174 utils::getPtrDiff(HstPtr, Entry->HstPtr));
1179 auto DevAccessiblePtrOrErr = Device.dataLockImpl(HstPtr, Size);
1184 if (auto Err = insertEntry(HstPtr, *DevAccessiblePtrOrErr, Size))
1191 Error PinnedAllocationMapTy::unlockHostBuffer(void *HstPtr) {
1192 assert(HstPtr && "Invalid pointer");
1196 const EntryTy *Entry = findIntersecting(HstPtr);
1214 if (auto Err = Device.dataUnlockImpl(Entry->HstPtr))
1221 Error PinnedAllocationMapTy::lockMappedHostBuffer(void *HstPtr, size_t Size) {
1222 assert(HstPtr && "Invalid pointer");
1228 const EntryTy *Entry = findIntersecting(HstPtr);
1230 return registerEntryUse(*Entry, HstPtr, Size);
1236 auto IsPinnedOrErr = Device.isPinnedPtrImpl(HstPtr, BaseHstPtr,
1251 auto DevAccessiblePtrOrErr = Device.dataLockImpl(HstPtr, Size);
1261 return insertEntry(HstPtr, *DevAccessiblePtrOrErr, Size);
1264 Error PinnedAllocationMapTy::unlockUnmappedHostBuffer(void *HstPtr) {
1265 assert(HstPtr && "Invalid pointer");
1270 const EntryTy *Entry = findIntersecting(HstPtr);
1298 if (auto Err = Device.dataUnlockImpl(Entry->HstPtr))
1465 Error GenericDeviceTy::dataSubmit(void *TgtPtr, const void *HstPtr,
1469 auto Err = dataSubmitImpl(TgtPtr, HstPtr, Size, AsyncInfoWrapper);
1474 Error GenericDeviceTy::dataRetrieve(void *HstPtr, const void *TgtPtr,
1478 auto Err = dataRetrieveImpl(HstPtr, TgtPtr, Size, AsyncInfoWrapper);
1908 int32_t GenericPluginTy::data_notify_mapped(int32_t DeviceId, void *HstPtr,
1910 auto Err = getDevice(DeviceId).notifyDataMapped(HstPtr, Size);
1912 REPORT("Failure to notify data mapped %p: %s\n", HstPtr,
1920 int32_t GenericPluginTy::data_notify_unmapped(int32_t DeviceId, void *HstPtr) {
1921 auto Err = getDevice(DeviceId).notifyDataUnmapped(HstPtr);
1923 REPORT("Failure to notify data unmapped %p: %s\n", HstPtr,
1932 void *HstPtr, int64_t Size) {
1933 return data_submit_async(DeviceId, TgtPtr, HstPtr, Size,
1938 void *HstPtr, int64_t Size,
1940 auto Err = getDevice(DeviceId).dataSubmit(TgtPtr, HstPtr, Size, AsyncInfoPtr);
1944 DPxPTR(HstPtr), DPxPTR(TgtPtr), Size,
1952 int32_t GenericPluginTy::data_retrieve(int32_t DeviceId, void *HstPtr,
1954 return data_retrieve_async(DeviceId, HstPtr, TgtPtr, Size,
1958 int32_t GenericPluginTy::data_retrieve_async(int32_t DeviceId, void *HstPtr,
1962 getDevice(DeviceId).dataRetrieve(HstPtr, TgtPtr, Size, AsyncInfoPtr);
1966 DPxPTR(HstPtr), DPxPTR(TgtPtr), Size,