Skip to content

Commit 650ff9e

Browse files
committed
[SYCL][NFC] Replace c-style casts in handler::copy() with reinterpret_cast
Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent ce0a0e4 commit 650ff9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/include/CL/sycl/handler.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ class __SYCL_EXPORT handler {
539539
size_t LinearIndex = Index[0];
540540
for (int I = 1; I < Dim; ++I)
541541
LinearIndex += Range[I] * Index[I];
542-
((TSrc *)Dst)[LinearIndex] = Src[Index];
542+
(reinterpret_cast<TSrc *>(Dst))[LinearIndex] = Src[Index];
543543
});
544544
}
545545

@@ -574,7 +574,7 @@ class __SYCL_EXPORT handler {
574574
size_t LinearIndex = Index[0];
575575
for (int I = 1; I < Dim; ++I)
576576
LinearIndex += Range[I] * Index[I];
577-
Dst[Index] = ((TDst *)Src)[LinearIndex];
577+
Dst[Index] = (reinterpret_cast<TDst *>(Src))[LinearIndex];
578578
});
579579
}
580580

0 commit comments

Comments
 (0)