Skip to content

Commit c60f7b6

Browse files
committed
Avoid muliplying by sizeof type when using templated malloc
1 parent 9108fbf commit c60f7b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/test/extensions/usm/usm_alloc_utility.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ int main() {
8383
array = (int *)malloc_device(N * sizeof(int), q);
8484
check_and_free(array, dev, ctxt);
8585

86-
array = (int *)malloc_device<int>(
87-
N * sizeof(int), q,
86+
array = malloc_device<int>(
87+
N, q,
8888
property_list{
8989
ext::intel::experimental::property::usm::buffer_location(2)});
9090
check_and_free(array, dev, ctxt);

0 commit comments

Comments
 (0)