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

SPECTUB code uses global variables #1108

Closed
KrisThielemans opened this issue Nov 29, 2022 · 0 comments · Fixed by #1169
Closed

SPECTUB code uses global variables #1108

KrisThielemans opened this issue Nov 29, 2022 · 0 comments · Fixed by #1169
Assignees

Comments

@KrisThielemans
Copy link
Collaborator

The underlying SPECTUB_* code uses the following global variables

namespace SPECTUB {
wm_da_type wm;
wmh_type wmh;
float * Rrad;
}

This creates

  • problems when creating 2 different matrices
  • trying to use openmp pragmas, as it probably doesn't know what to share.

The suggested solution is to

  • make the 3 global variables member variables of ProjMatrixByBinSPECTUB
  • change the signature of relevant functions in SPECTUB_* to include (ideally const) references to the variables

This is slightly painful, but clearer than the alternative of making the SPECTUB_* functions methods of ProjMatrixByBinSPECTUB.

This would then also have to be done for #1100 (but after merging that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants