Changeset View
Changeset View
Standalone View
Standalone View
openmp/libomptarget/src/device.h
Show First 20 Lines • Show All 151 Lines • ▼ Show 20 Lines | DeviceTy& operator=(const DeviceTy &d) { | ||||
HostDataToTargetMap = d.HostDataToTargetMap; | HostDataToTargetMap = d.HostDataToTargetMap; | ||||
PendingCtorsDtors = d.PendingCtorsDtors; | PendingCtorsDtors = d.PendingCtorsDtors; | ||||
ShadowPtrMap = d.ShadowPtrMap; | ShadowPtrMap = d.ShadowPtrMap; | ||||
LoopTripCnt = d.LoopTripCnt; | LoopTripCnt = d.LoopTripCnt; | ||||
return *this; | return *this; | ||||
} | } | ||||
// Return true if data can be copied to DstDevice directly | |||||
jdoerfert: Documentation please. | |||||
bool isDataExchangable(const DeviceTy& DstDevice); | |||||
uint64_t getMapEntryRefCnt(void *HstPtrBegin); | uint64_t getMapEntryRefCnt(void *HstPtrBegin); | ||||
LookupResult lookupMapping(void *HstPtrBegin, int64_t Size); | LookupResult lookupMapping(void *HstPtrBegin, int64_t Size); | ||||
void *getOrAllocTgtPtr(void *HstPtrBegin, void *HstPtrBase, int64_t Size, | void *getOrAllocTgtPtr(void *HstPtrBegin, void *HstPtrBase, int64_t Size, | ||||
bool &IsNew, bool &IsHostPtr, bool IsImplicit, bool UpdateRefCount = true, | bool &IsNew, bool &IsHostPtr, bool IsImplicit, bool UpdateRefCount = true, | ||||
bool HasCloseModifier = false); | bool HasCloseModifier = false); | ||||
void *getTgtPtrBegin(void *HstPtrBegin, int64_t Size); | void *getTgtPtrBegin(void *HstPtrBegin, int64_t Size); | ||||
void *getTgtPtrBegin(void *HstPtrBegin, int64_t Size, bool &IsLast, | void *getTgtPtrBegin(void *HstPtrBegin, int64_t Size, bool &IsLast, | ||||
bool UpdateRefCount, bool &IsHostPtr); | bool UpdateRefCount, bool &IsHostPtr); | ||||
int deallocTgtPtr(void *TgtPtrBegin, int64_t Size, bool ForceDelete, | int deallocTgtPtr(void *TgtPtrBegin, int64_t Size, bool ForceDelete, | ||||
bool HasCloseModifier = false); | bool HasCloseModifier = false); | ||||
int associatePtr(void *HstPtrBegin, void *TgtPtrBegin, int64_t Size); | int associatePtr(void *HstPtrBegin, void *TgtPtrBegin, int64_t Size); | ||||
int disassociatePtr(void *HstPtrBegin); | int disassociatePtr(void *HstPtrBegin); | ||||
// calls to RTL | // calls to RTL | ||||
int32_t initOnce(); | int32_t initOnce(); | ||||
__tgt_target_table *load_binary(void *Img); | __tgt_target_table *load_binary(void *Img); | ||||
// Data transfer. When AsyncInfoPtr is nullptr, the transfer will be | // Data transfer. When AsyncInfoPtr is nullptr, the transfer will be | ||||
// synchronous. | // synchronous. | ||||
// Copy data from host to device | |||||
int32_t data_submit(void *TgtPtrBegin, void *HstPtrBegin, int64_t Size, | int32_t data_submit(void *TgtPtrBegin, void *HstPtrBegin, int64_t Size, | ||||
__tgt_async_info *AsyncInfoPtr); | __tgt_async_info *AsyncInfoPtr); | ||||
// Copy data from device back to host | |||||
int32_t data_retrieve(void *HstPtrBegin, void *TgtPtrBegin, int64_t Size, | int32_t data_retrieve(void *HstPtrBegin, void *TgtPtrBegin, int64_t Size, | ||||
__tgt_async_info *AsyncInfoPtr); | __tgt_async_info *AsyncInfoPtr); | ||||
// Copy data from current device to destination device directly | |||||
int32_t data_exchange(void *SrcPtr, DeviceTy DstDev, void *DstPtr, | |||||
Documentation please. jdoerfert: Documentation please. | |||||
^ jdoerfert: ^ | |||||
int64_t Size, __tgt_async_info *AsyncInfoPtr); | |||||
int32_t run_region(void *TgtEntryPtr, void **TgtVarsPtr, | int32_t run_region(void *TgtEntryPtr, void **TgtVarsPtr, | ||||
ptrdiff_t *TgtOffsets, int32_t TgtVarsSize, | ptrdiff_t *TgtOffsets, int32_t TgtVarsSize, | ||||
__tgt_async_info *AsyncInfoPtr); | __tgt_async_info *AsyncInfoPtr); | ||||
int32_t run_team_region(void *TgtEntryPtr, void **TgtVarsPtr, | int32_t run_team_region(void *TgtEntryPtr, void **TgtVarsPtr, | ||||
ptrdiff_t *TgtOffsets, int32_t TgtVarsSize, | ptrdiff_t *TgtOffsets, int32_t TgtVarsSize, | ||||
int32_t NumTeams, int32_t ThreadLimit, | int32_t NumTeams, int32_t ThreadLimit, | ||||
uint64_t LoopTripCount, | uint64_t LoopTripCount, | ||||
Show All 14 Lines |
Documentation please.