-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Better destructor behavior for SiPixelTemplateStore2D #33105
Conversation
…icit memory management
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33105/21436
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33105/21439
|
A new Pull Request was created by @OzAmram (Oz Amram) for master. It involves the following packages: CondFormats/SiPixelTransient @ggovi, @perrotta, @cmsbuild, @jpata, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-134677/13353/summary.html Comparison Summary@slava77 comparisons for the following workflows were not done due to missing matrix map:
Summary:
|
} | ||
} | ||
std::vector<std::vector<SiPixelTemplateEntry2D>> | ||
entry; //!< use 2d entry to store BPix and FPix entries [dynamically allocated] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move the comment above the code to avoid the line split
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
for (int iy = 0; iy < theCurrentTemp.head.NTyx; ++iy) | ||
theCurrentTemp.entry[iy].resize(theCurrentTemp.head.NTxx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (int iy = 0; iy < theCurrentTemp.head.NTyx; ++iy) | |
theCurrentTemp.entry[iy].resize(theCurrentTemp.head.NTxx); | |
for (auto& item : theCurrentTemp.entry) | |
item.resize(theCurrentTemp.head.NTxx); |
is marginally shorter to write and may even be epsilon faster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok done
for (int iy = 0; iy < theCurrentTemp.head.NTyx; ++iy) | ||
theCurrentTemp.entry[iy].resize(theCurrentTemp.head.NTxx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (int iy = 0; iy < theCurrentTemp.head.NTyx; ++iy) | |
theCurrentTemp.entry[iy].resize(theCurrentTemp.head.NTxx); | |
for (auto& item : theCurrentTemp.entry) | |
item.resize(theCurrentTemp.head.NTxx); |
as above
@cmsbuild please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-134677/13423/summary.html Comparison SummarySummary:
|
@cmsbuild please test There is an apparent random difference in ticlTrackstersEM id probabilities wf D76 PMX 34834.999. |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-134677/13514/summary.html Comparison SummarySummary:
|
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
This PR updates the SiPixelTemplate2D objects to use std::vectors rather than arrays allocated directly on the heap. This removes the need for the destroy() function. We expect no changes in output.
This addresses issue #32567 that was raised in PR #32494, which had a similar change for the 1D template.
@mmusich @tvami @pmaksim1 @tsusa