Skip to content

Commit 0fdfba2

Browse files
committed
Remove const_cast
1 parent a1f7e52 commit 0fdfba2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

unified-runtime/source/adapters/offload/enqueue.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueMemBufferWrite(
135135

136136
void *DevPtr = std::get<BufferMem>(hBuffer->Mem).Ptr;
137137

138-
// TODO: olMemcpy src should be const
139-
auto Res = olMemcpy(hQueue->OffloadQueue, DevPtr + offset,
140-
hQueue->OffloadDevice, const_cast<void *>(pSrc),
141-
Adapter.HostDevice, size, phEvent ? &EventOut : nullptr);
138+
auto Res =
139+
olMemcpy(hQueue->OffloadQueue, DevPtr + offset, hQueue->OffloadDevice,
140+
pSrc, Adapter.HostDevice, size, phEvent ? &EventOut : nullptr);
142141
if (Res) {
143142
return offloadResultToUR(Res);
144143
}

0 commit comments

Comments
 (0)