Skip to content

Commit 9024ac8

Browse files
committed
Clean docs and renamed enqueueHostCallback
1 parent 4679b16 commit 9024ac8

File tree

6 files changed

+16
-18
lines changed

6 files changed

+16
-18
lines changed

offload/liboffload/src/OffloadImpl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,8 @@ Error olGetSymbolInfoSize_impl(ol_symbol_handle_t Symbol,
836836
Error olLaunchHostFunction_impl(ol_queue_handle_t Queue,
837837
ol_host_function_cb_t Callback,
838838
void *UserData) {
839-
return Queue->Device->Device->enqueueHostCallback(Callback, UserData,
840-
Queue->AsyncInfo);
839+
return Queue->Device->Device->enqueueHostCall(Callback, UserData,
840+
Queue->AsyncInfo);
841841
}
842842

843843
} // namespace offload

offload/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,8 +2592,8 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
25922592
return Plugin::success();
25932593
}
25942594

2595-
Error enqueueHostCallbackImpl(void (*Callback)(void *), void *UserData,
2596-
AsyncInfoWrapperTy &AsyncInfo) override {
2595+
Error enqueueHostCallImpl(void (*Callback)(void *), void *UserData,
2596+
AsyncInfoWrapperTy &AsyncInfo) override {
25972597
AMDGPUStreamTy *Stream = nullptr;
25982598
if (auto Err = getStream(AsyncInfo, Stream))
25992599
return Err;

offload/plugins-nextgen/common/include/PluginInterface.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -965,12 +965,11 @@ struct GenericDeviceTy : public DeviceAllocatorTy {
965965
Error initDeviceInfo(__tgt_device_info *DeviceInfo);
966966
virtual Error initDeviceInfoImpl(__tgt_device_info *DeviceInfo) = 0;
967967

968-
/// Enqueue a host call to AsyncInfo
969-
Error enqueueHostCallback(void (*Callback)(void *), void *UserData,
970-
__tgt_async_info *AsyncInfo);
971-
virtual Error enqueueHostCallbackImpl(void (*Callback)(void *),
972-
void *UserData,
973-
AsyncInfoWrapperTy &AsyncInfo) = 0;
968+
/// Enqueue a host call to AsyncInfo
969+
Error enqueueHostCall(void (*Callback)(void *), void *UserData,
970+
__tgt_async_info *AsyncInfo);
971+
virtual Error enqueueHostCallImpl(void (*Callback)(void *), void *UserData,
972+
AsyncInfoWrapperTy &AsyncInfo) = 0;
974973

975974
/// Create an event.
976975
Error createEvent(void **EventPtrStorage);

offload/plugins-nextgen/common/src/PluginInterface.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,12 +1589,11 @@ Error GenericDeviceTy::initAsyncInfo(__tgt_async_info **AsyncInfoPtr) {
15891589
return Err;
15901590
}
15911591

1592-
Error GenericDeviceTy::enqueueHostCallback(void (*Callback)(void *),
1593-
void *UserData,
1594-
__tgt_async_info *AsyncInfo) {
1592+
Error GenericDeviceTy::enqueueHostCall(void (*Callback)(void *), void *UserData,
1593+
__tgt_async_info *AsyncInfo) {
15951594
AsyncInfoWrapperTy AsyncInfoWrapper(*this, AsyncInfo);
15961595

1597-
auto Err = enqueueHostCallbackImpl(Callback, UserData, AsyncInfoWrapper);
1596+
auto Err = enqueueHostCallImpl(Callback, UserData, AsyncInfoWrapper);
15981597
AsyncInfoWrapper.finalize(Err);
15991598
return Err;
16001599
}

offload/plugins-nextgen/cuda/src/rtl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -873,8 +873,8 @@ struct CUDADeviceTy : public GenericDeviceTy {
873873
return Plugin::success();
874874
}
875875

876-
Error enqueueHostCallbackImpl(void (*Callback)(void *), void *UserData,
877-
AsyncInfoWrapperTy &AsyncInfo) override {
876+
Error enqueueHostCallImpl(void (*Callback)(void *), void *UserData,
877+
AsyncInfoWrapperTy &AsyncInfo) override {
878878
if (auto Err = setContext())
879879
return Err;
880880

offload/plugins-nextgen/host/src/rtl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ struct GenELF64DeviceTy : public GenericDeviceTy {
320320
"initDeviceInfoImpl not supported");
321321
}
322322

323-
Error enqueueHostCallbackImpl(void (*Callback)(void *), void *UserData,
324-
AsyncInfoWrapperTy &AsyncInfo) override {
323+
Error enqueueHostCallImpl(void (*Callback)(void *), void *UserData,
324+
AsyncInfoWrapperTy &AsyncInfo) override {
325325
Callback(UserData);
326326
return Plugin::success();
327327
};

0 commit comments

Comments
 (0)