Skip to content

Commit

Permalink
Fixed memset
Browse files Browse the repository at this point in the history
  • Loading branch information
ariostas committed Sep 23, 2024
1 parent 37fe122 commit 77ff0e5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions RecoTracker/LSTCore/src/alpaka/Event.dev.cc
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ void Event::addPixelSegmentToEvent(std::vector<unsigned int> const& hitIndices0,

std::array<int, 3> const segments_sizes{{static_cast<int>(nTotalSegments_), static_cast<int>(nLowerModules_+1), static_cast<int>(n_max_pixel_segments_per_module)}};
segmentsDev_.emplace(segments_sizes, queue_);
alpaka::memset(queue_, segmentsDev_->buffer(), 0u); // TODO: We don't need to initialize the entire buffer
auto buf = segmentsDev_->buffer();
alpaka::memset(queue_, buf, 0u); // TODO: We don't need to initialize the entire buffer
}

auto hitIndices0_dev = allocBufWrapper<unsigned int>(devAcc_, size, queue_);
Expand Down Expand Up @@ -358,7 +359,8 @@ void Event::createSegmentsWithModuleMap() {
if (!segmentsDev_) {
std::array<int, 3> const segments_sizes{{static_cast<int>(nTotalSegments_), static_cast<int>(nLowerModules_+1), static_cast<int>(n_max_pixel_segments_per_module)}};
segmentsDev_.emplace(segments_sizes, queue_);
alpaka::memset(queue_, segmentsDev_->buffer(), 0u); // TODO: We don't need to initialize the entire buffer
auto buf = segmentsDev_->buffer();
alpaka::memset(queue_, buf, 0u); // TODO: We don't need to initialize the entire buffer
}

Vec3D const threadsPerBlockCreateSeg{1, 1, 64};
Expand Down

0 comments on commit 77ff0e5

Please sign in to comment.