Skip to content

Commit

Permalink
streamOrderedAllocation example: Explicit cast from size_t to int
Browse files Browse the repository at this point in the history
… to avoid a warning about narrowing
  • Loading branch information
eyalroz committed Sep 22, 2024
1 parent 777acf1 commit 8a62965
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ int basicStreamOrderedAllocation(
auto d_c = span<float>(stream.enqueue.allocate(c.size() * sizeof(float)));
stream.enqueue.copy(d_a, a);
stream.enqueue.copy(d_b, b);
stream.enqueue.kernel_launch(vectorAddGPU, launch_config, d_a.data(), d_b.data(), d_c.data(), c.size());
stream.enqueue.kernel_launch(vectorAddGPU, launch_config, d_a.data(), d_b.data(), d_c.data(), (int) c.size());
stream.enqueue.free(d_a);
stream.enqueue.free(d_b);
stream.enqueue.copy(c, d_c);
Expand Down

0 comments on commit 8a62965

Please sign in to comment.