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
SiStripRecHitMatcher.h: remove non-POD VLA #10860
SiStripRecHitMatcher.h: remove non-POD VLA #10860
Conversation
Clang 3.7.0 will reject non-POD VLAs: RecoLocalTracker/SiStripRecHitConverter/interface/SiStripRecHitMatcher.h:188:19: error: variable length array of non-POD element type 'matcherDetails::StereoInfo' Unknown why this is not triggered in ~3.6.0. Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
A new Pull Request was created by @davidlt for CMSSW_7_6_X. SiStripRecHitMatcher.h: remove non-POD VLA It involves the following packages: RecoLocalTracker/SiStripRecHitConverter @cmsbuild, @cvuosalo, @slava77 can you please review it and eventually sign? Thanks. |
igprof on 4.77 step3 out of the box |
@cmsbuild please test |
The tests are being triggered in jenkins. |
Tested with 4.77, but could not find |
Hi David,
|
Isn't SSEVECT a default on x86_64? |
nm, scratch that comment, I think it's just inlined and doesn't show up in the call stack |
|
TkGluedMeasurementDet::doubleMatch |
@davidlt try the link again, I think it should work for you now |
Worked. Done 3 different runs, but probably one longer would have been enough.
This was a single run over 100 events, I can re-run, but I guess nothing changed much as expected. |
In any case, if we decide to engage to remove all VLA I suggest to move |
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar |
SiStripRecHitMatcher.h: remove non-POD VLA
Let me object to this change done in this way. |
sorry didn’t read carefully.. we can revert if desired on Monday so that its not lost.
|
@VinInn |
I am sorry if my suggestion did not come across in a clear way. |
I suppose a "central place" would mean some place under CORE? CommonTools/Utils is not the worst place to be. I recall there were other changes to vector(0) from vla[0]. Regarding this PR, I suggest not to revert (which will bring back the issue/error message), but instead to modify in a better way. |
The problem is only with non-POD VLAs. @VinInn suggest to change that to POD VLAs, which would be stored on stack instead of heap. Technically this avoid allocation on heap and maybe could lower register pressure. Because once it's on a stack compiler will always know the location of item (you don't need an extra register for storing base address). Again, depends on how compiler does its job. I don't see significant impact on performance between non-POD VLA and std::vector with fixed size on IgProf. Thus it's your call. |
CommonTools/Utils doesn't seem so bad to me. We definitely would not want it in any DataFormats package. It could also go into Utilities/General. |
Clang 3.7.0 will reject non-POD VLAs:
Unknown why this is not triggered in ~3.6.0. Have not checked if
SiStripRecHitMatcher::doubleMatch
performance changed. I could run IgProf if someone could provide workflow number.Signed-off-by: David Abdurachmanov David.Abdurachmanov@cern.ch