Commit 1ef79ad4 authored by Daniel Campora's avatar Daniel Campora
Browse files

Updated the SAXPY example.

parent 2a756f95
Pipeline #1659249 passed with stages
in 17 minutes and 34 seconds
......@@ -273,13 +273,13 @@ Finally, the kernel is defined:
*/
__global__ void saxpy::saxpy(saxpy::Parameters parameters, const uint number_of_events)
{
Velo::Consolidated::ConstTracks velo_tracks {
parameters.dev_atomics_velo, parameters.dev_velo_track_hit_number, event_number, number_of_events};
const uint number_of_tracks_event = velo_tracks.number_of_tracks(event_number);
for (uint event_number = threadIdx.x; event_number < number_of_events; event_number += blockDim.x) {
Velo::Consolidated::ConstTracks velo_tracks {
parameters.dev_atomics_velo, parameters.dev_velo_track_hit_number, event_number, number_of_events};
const uint number_of_tracks_event = velo_tracks.number_of_tracks(event_number);
parameters.dev_saxpy_output[event_number] =
parameters.saxpy_scale_factor * number_of_tracks_event + number_of_tracks_event;
parameters.saxpy_scale_factor * number_of_tracks_event + number_of_tracks_event;
}
}
```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment