Skip to content

Commit 835497a

Browse files
authored
[Offload] Make olMemcpy src parameter const (#143161)
1 parent 891a0ab commit 835497a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

offload/liboffload/API/Memory.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def : Function {
5757
Param<"ol_queue_handle_t", "Queue", "handle of the queue.", PARAM_IN_OPTIONAL>,
5858
Param<"void*", "DstPtr", "pointer to copy to", PARAM_IN>,
5959
Param<"ol_device_handle_t", "DstDevice", "device that DstPtr belongs to", PARAM_IN>,
60-
Param<"void*", "SrcPtr", "pointer to copy from", PARAM_IN>,
60+
Param<"const void*", "SrcPtr", "pointer to copy from", PARAM_IN>,
6161
Param<"ol_device_handle_t", "SrcDevice", "device that SrcPtr belongs to", PARAM_IN>,
6262
Param<"size_t", "Size", "size in bytes of data to copy", PARAM_IN>,
6363
Param<"ol_event_handle_t*", "EventOut", "optional recorded event for the enqueued operation", PARAM_OUT_OPTIONAL>

offload/liboffload/src/OffloadImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ ol_event_handle_t makeEvent(ol_queue_handle_t Queue) {
399399
}
400400

401401
Error olMemcpy_impl(ol_queue_handle_t Queue, void *DstPtr,
402-
ol_device_handle_t DstDevice, void *SrcPtr,
402+
ol_device_handle_t DstDevice, const void *SrcPtr,
403403
ol_device_handle_t SrcDevice, size_t Size,
404404
ol_event_handle_t *EventOut) {
405405
if (DstDevice == HostDevice() && SrcDevice == HostDevice()) {

0 commit comments

Comments
 (0)