Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make PixelChanneldentifier::thePacking constexpr #28617

Merged
merged 1 commit into from
Dec 16, 2019

Conversation

Dr15Jones
Copy link
Contributor

PR description:

Converted the const static PixelChanneldentifier::thePacking to be constexpr

PR validation:

The code compiles.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@Dr15Jones
Copy link
Contributor Author

I happen to be working on a different problem which I thought might have to do with the static. It turned out not to be the case, but I thought this change was good none the less.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28617/13141

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Dr15Jones (Chris Jones) for master.

It involves the following packages:

DataFormats/SiPixelDetId

@cmsbuild, @civanch, @mdhildreth can you please review it and eventually sign? Thanks.
@makortel, @rovere, @VinInn this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 12, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/3954/console Started: 2019/12/12 19:20


static int pixelToChannel(int row, int col) { return (row << thePacking.column_width) | col; }

namespace pixelchanelidentifierimpl {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Packing class had to be removed from within PixelChannelIdentifier for a technicality about C++ and constexpr. You can not declare a constexpr member data where the type is defined within the class. The reason is the class is not defined until its closing }; and that includes classes defined within it. The last bit is you can't use constexpr on an undefined type. Declaring Packing outside of PixelChannelIdentifier makes use Packing is fully defined when the compiler reaches the constexpr.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f07451/3954/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2798405
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2798062
  • DQMHistoTests: Total skipped: 341
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 147 log files, 16 edm output root files, 34 DQM output files

@fabiocos
Copy link
Contributor

@civanch this looks a technical update that does not show any regression as expected , I will integrate it, please have anyway a look at it

@fabiocos
Copy link
Contributor

+1

@fabiocos
Copy link
Contributor

merge

@cmsbuild cmsbuild merged commit 681f8b8 into cms-sw:master Dec 16, 2019
@Dr15Jones Dr15Jones deleted the constexprPacking branch December 16, 2019 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants