OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Globals.h
Go to the documentation of this file.
1#ifndef PYOPAL_PYCORE_GLOBALS_H
2#define PYOPAL_PYCORE_GLOBALS_H
3#include "opal.h"
4
5// Ippl and gmsg should only be built once, in globals.cc.o
6//
7// We declare them as extern for all other code to be consistent with usage in
8// C++ Opal; but we define them if we are including from Globals.cc so that the
9// extern is satisfied.
10//
11// Maybe this implements one gmsg per python module - which is wrong? So maybe
12// some more linker/cmake dark arts required here? Do they have much global
13// state?
14#ifndef PYOPAL_GLOBALS_C
15 extern Ippl *ippl;
16 extern Inform *gmsg;
17#endif
18
19#ifdef PYOPAL_GLOBALS_C
20 Ippl *ippl = NULL;
21 Inform *gmsg = NULL;
22#endif
23namespace PyOpal {
24namespace Globals {
29void Initialise();
30}
31}
32
33#endif
void Initialise()
Definition: Globals.cpp:78
Definition: Inform.h:42
Ippl * ippl
Definition: Main.cpp:60
Inform * gmsg
Definition: Main.cpp:61