Skip to content

Commit

Permalink
Apply code checks (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Oct 19, 2020
1 parent a9e74eb commit 9dcdc21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CUDADataFormats/SiPixelDigi/src/SiPixelDigiErrorsCUDA.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SiPixelDigiErrorsCUDA::SiPixelDigiErrorsCUDA(size_t maxFedWords, PixelFormatterE

error_h = cs->make_host_unique<GPU::SimpleVector<PixelErrorCompact>>(stream);
GPU::make_SimpleVector(error_h.get(), maxFedWords, data_d.get());
assert(error_h->size() == 0);
assert(error_h->empty());
assert(error_h->capacity() == static_cast<int>(maxFedWords));

cudautils::copyAsync(error_d, error_h, stream);
Expand All @@ -35,7 +35,7 @@ SiPixelDigiErrorsCUDA::HostDataError SiPixelDigiErrorsCUDA::dataErrorToHostAsync
auto data = cs->make_host_unique<PixelErrorCompact[]>(error_h->capacity(), stream);

// but transfer only the required amount
if(error_h->size() > 0) {
if (not error_h->empty()) {
cudautils::copyAsync(data, data_d, error_h->size(), stream);
}
auto err = *error_h;
Expand Down

0 comments on commit 9dcdc21

Please sign in to comment.