Skip to content

Commit 2779cec

Browse files
author
Georgi Mirazchiyski
authored
[NFC][UR][HIP] Cleanup: Replace remaining C-style void pointer type casts with static_casts (#18410)
1 parent 79f28f6 commit 2779cec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

unified-runtime/source/adapters/hip/image.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,15 +637,16 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesImageCopyExp(
637637
CopyExtentBytes, Stream));
638638
#else
639639
UR_CHECK_ERROR(hipMemcpyHtoA(
640-
(hipArray_t)pDst, pCopyRegion->dstOffset.x * PixelSizeBytes,
640+
static_cast<hipArray_t>(pDst),
641+
pCopyRegion->dstOffset.x * PixelSizeBytes,
641642
static_cast<const void *>(SrcWithOffset), CopyExtentBytes));
642643
#endif
643644
} else if (memType == hipMemoryTypeDevice) {
644645
void *DstWithOffset =
645646
static_cast<void *>(static_cast<char *>(pDst) +
646647
(PixelSizeBytes * pCopyRegion->dstOffset.x));
647648
UR_CHECK_ERROR(hipMemcpyHtoDAsync(
648-
(hipDeviceptr_t)DstWithOffset,
649+
static_cast<hipDeviceptr_t>(DstWithOffset),
649650
const_cast<void *>(static_cast<const void *>(SrcWithOffset)),
650651
CopyExtentBytes, Stream));
651652
} else {

0 commit comments

Comments
 (0)