Skip to content

Commit

Permalink
Fix device memory access in memcpy
Browse files Browse the repository at this point in the history
  • Loading branch information
sbaldu committed Jan 10, 2025
1 parent 7e55b0d commit f5c0be6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/CLUEstering/CLUEstering.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE_CLUE {
alpaka::memcpy(
queue_,
clue::make_host_view(h_points.clusterIndexes(), 2 * nPoints),
clue::make_device_view(device, d_points.view()->cluster_index, 2 * nPoints),
clue::make_device_view(device, d_points.buffer.data() + nPoints, 2 * nPoints),

Check warning

Code scanning / Flawfinder (reported by Codacy)

Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. Warning

Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data.

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 10.4 rule Note

MISRA 10.4 rule
2 * nPoints);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 10.4 rule Note

MISRA 10.4 rule
// Wait for all the operations in the queue to finish
Expand Down

0 comments on commit f5c0be6

Please sign in to comment.