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

Defer initialization of listheaders to later with OpenMP. #539

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ElmerGUI/Application/vtkpost/mc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
#define MC_H

extern "C" {

typedef struct list {
struct list *next; /* pointer to next item in list */
char *name; /* name of list item */
} LIST;

#ifdef _OPENMP
/* Move initialization to matc.c::mtc_init() for thread safety */
extern LIST *listheaders;
#pragma omp threadprivate(listheaders)
#else
extern LIST listheaders[];
#endif /* _OPENMP */

#define ALLOCATIONS 0
#define CONSTANTS 1
Expand Down
Loading