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

thread safety statics work #1283

Merged
merged 1 commit into from Nov 7, 2013
Merged

thread safety statics work #1283

merged 1 commit into from Nov 7, 2013

Conversation

gartung
Copy link
Member

@gartung gartung commented Nov 1, 2013

Various arrays of constants set and then assigned to other arrays of constants.
Make the static arrays const for thread safety.
Make the arrays these are copied to const.

Various arrays of constants set and then assigned to other arrays of constants.
Make the static arrays const for thread safety.
Make the arrays these are copied to const.
@gartung
Copy link
Member Author

gartung commented Nov 1, 2013

@Dr15Jones can you take a look.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2013

A new Pull Request was created by @gartung (Patrick Gartung) for CMSSW_7_0_X.

thread safety statics work

It involves the following packages:

L1Trigger/CSCTrackFinder

@nclopezo, @mulhearn can you please review it and eventually sign? Thanks.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
@ktf you are the release manager for this.

@Dr15Jones
Copy link
Contributor

It appears that the arrays were just changed to const. If so, that is definitely thread safe.

@gartung
Copy link
Member Author

gartung commented Nov 1, 2013

In the main body of the code, I had to change double to const double in the initialization statements. I also had to change the variables the array were copied/assigned to from double to const double.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2013

@ktf
Copy link
Contributor

ktf commented Nov 7, 2013

Maybe I'm sleep deprived, but shouldn't this simply remove the variables? Who sets those variables?

@gartung
Copy link
Member Author

gartung commented Nov 7, 2013

The static arrays are copied to other arrays multiple times. Not sure why they wanted static as the savings in memory can't be that much.

@ktf
Copy link
Contributor

ktf commented Nov 7, 2013

Nevermind. It's indeed sleep deprivation… I did not notice the arrays were initialised in the CC...

ktf added a commit that referenced this pull request Nov 7, 2013
Multithreading fixes -- Make statics const in L1Trigger/CSCTrackFinder
@ktf ktf merged commit 2672846 into cms-sw:CMSSW_7_0_X Nov 7, 2013
@gartung gartung deleted the statics-L1Trigger-CSCTrackFinder branch November 8, 2013 17:22
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.

None yet

4 participants