Skip to content

Commit

Permalink
Fixed bug where sizeof(int) was used even if T!=int.
Browse files Browse the repository at this point in the history
Signed-off-by: JackAKirk <[email protected]>
  • Loading branch information
JackAKirk committed Jan 11, 2024
1 parent 9691bc0 commit 7bb7022
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/queue/queue_shortcuts_usm.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ void test_unified_shared_memory(sycl::queue q, unsigned int element_count) {
T* ptr = sycl::malloc_device<T>(element_count, q);
constexpr int advice = 0;
sycl::event advise_no_events =
q.mem_advise(ptr, element_count * sizeof(int), advice);
q.mem_advise(ptr, element_count * sizeof(T), advice);
sycl::event advise_single_event = q.mem_advise(
ptr, element_count * sizeof(int), advice, advise_no_events);
ptr, element_count * sizeof(T), advice, advise_no_events);
sycl::event advise_multiple_events =
q.mem_advise(ptr, element_count * sizeof(int), advice,
q.mem_advise(ptr, element_count * sizeof(T), advice,
{advise_no_events, advise_single_event});
advise_multiple_events.wait();
advise_no_events.wait();
Expand Down

0 comments on commit 7bb7022

Please sign in to comment.