Skip to content

Commit

Permalink
Mark variables used only within assert as [[maybe_unused]]
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard committed Aug 8, 2022
1 parent 7ca6d96 commit a0053bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ namespace gpuClustering {
__shared__ uint8_t ok[maxNumClustersPerModules];
__shared__ uint16_t newclusId[maxNumClustersPerModules];

constexpr int startBPIX2 = isPhase2 ? phase2PixelTopology::layerStart[1] : phase1PixelTopology::layerStart[1];
constexpr int nMaxModules = isPhase2 ? phase2PixelTopology::numberOfModules : phase1PixelTopology::numberOfModules;
constexpr const int startBPIX2 = isPhase2 ? phase2PixelTopology::layerStart[1] : phase1PixelTopology::layerStart[1];
[[maybe_unused]] constexpr const int nMaxModules = isPhase2 ? phase2PixelTopology::numberOfModules : phase1PixelTopology::numberOfModules;

assert(nMaxModules < maxNumModules);
assert(startBPIX2 < nMaxModules);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace gpuClustering {
auto firstModule = blockIdx.x;
auto endModule = moduleStart[0];

constexpr int nMaxModules = isPhase2 ? phase2PixelTopology::numberOfModules : phase1PixelTopology::numberOfModules;
[[maybe_unused]] constexpr const int nMaxModules = isPhase2 ? phase2PixelTopology::numberOfModules : phase1PixelTopology::numberOfModules;
assert(nMaxModules < maxNumModules);

for (auto module = firstModule; module < endModule; module += gridDim.x) {
Expand Down

0 comments on commit a0053bc

Please sign in to comment.