Skip to content

Commit

Permalink
adress comments on code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
VinInn committed Nov 30, 2021
1 parent ac07875 commit eaa9260
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion CUDADataFormats/Track/interface/TrackSoAHeterogeneousT.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class TrackSoAHeterogeneousT {
int nl = 1;
auto ol = phase1PixelTopology::getLayer(*pdet);
for (; pdet < detIndices.end(i); ++pdet) {
auto il = phase1PixelTopology::getLayer(*pdet); // , ol);
auto il = phase1PixelTopology::getLayer(*pdet);
if (il != ol)
++nl;
ol = il;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include <cstdint>
#include <array>
// #include "HeterogeneousCore/CUDAUtilities/interface/cudaCompat.h"

namespace phase1PixelTopology {

Expand Down
3 changes: 0 additions & 3 deletions RecoPixelVertexing/PixelTriplets/plugins/BrokenLineFitOnGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,10 @@ __global__ void kernel_BLFastFit(Tuples const *__restrict__ foundNtuplets,

float incr = std::max(1.f, float(nHits) / float(hitsInFit));
float n = 0;
// int jold = -1;
for (uint32_t i = 0; i < hitsInFit; ++i) {
int j = int(n + 0.5f); // round
if (hitsInFit - 1 == i)
j = nHits - 1; // force last hit to ensure max lever arm.
// assert(j>jold);
// jold=j;
assert(j < int(nHits));
n += incr;
auto hit = hitId[j];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,11 @@ __global__ void kernel_earlyDuplicateRemover(GPUCACell const *cells,

if (thisCell.tracks().size() < 2)
continue;
//if (0==thisCell.theUsed) continue;
// if (thisCell.theDoubletId < 0) continue;

int8_t maxNl = 0;

// find maxNl
for (auto it : thisCell.tracks()) {
// if (tracks.nHits(it)==3) continue;
auto nl = tracks.nLayers(it);
maxNl = std::max(nl, maxNl);
}
Expand Down Expand Up @@ -191,7 +188,6 @@ __global__ void kernel_fastDuplicateRemover(GPUCACell const *__restrict__ cells,
auto const &thisCell = cells[idx];
if (thisCell.tracks().size() < 2)
continue;
// if (thisCell.theDoubletId < 0) continue;

float mc = maxScore;
uint16_t im = tkNotFound;
Expand Down Expand Up @@ -694,7 +690,6 @@ __global__ void kernel_rejectDuplicate(TkSoA const *__restrict__ ptracks,
if ((opi - opj) * (opi - opj) > dop)
continue;
auto nlj = tracks.nLayers(jt);
;
if (nlj < nli || (nlj == nli && (qj < qi || (qj == qi && score(it, nli) < score(jt, nlj)))))
quality[jt] = reject;
else {
Expand Down

0 comments on commit eaa9260

Please sign in to comment.