OPAL (Object Oriented Parallel Accelerator Library)
2024.2
OPAL
Globals.h
Go to the documentation of this file.
1
//
2
// Python API for PolynomialCoefficient (part of the multidimensional polynomial fitting routines)
3
//
4
// Copyright (c) 2008-2023, Chris Rogers, STFC Rutherford Appleton Laboratory, Didcot, UK
5
//
6
// This file is part of OPAL.
7
//
8
// OPAL is free software: you can redistribute it and/or modify
9
// it under the terms of the GNU General Public License as published by
10
// the Free Software Foundation, either version 3 of the License, or
11
// (at your option) any later version.
12
//
13
// You should have received a copy of the GNU General Public License
14
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
15
//
16
17
#ifndef PYOPAL_PYCORE_GLOBALS_H
18
#define PYOPAL_PYCORE_GLOBALS_H
19
#include "
opal.h
"
20
21
// Ippl and gmsg should only be built once, in globals.cc.o
22
//
23
// We declare them as extern for all other code to be consistent with usage in
24
// C++ Opal; but we define them if we are including from Globals.cc so that the
25
// extern is satisfied.
26
//
27
// Maybe this implements one gmsg per python module - which is wrong? So maybe
28
// some more linker/cmake dark arts required here? Do they have much global
29
// state?
30
#ifndef PYOPAL_GLOBALS_C
31
extern
Ippl
*
ippl
;
32
extern
Inform
*
gmsg
;
33
extern
Inform
*
gmsgALL
;
34
#endif
35
36
#ifdef PYOPAL_GLOBALS_C
37
Ippl
*
ippl
=
nullptr
;
38
Inform
*
gmsg
=
nullptr
;
39
Inform
*
gmsgALL
=
nullptr
;
40
#endif
41
namespace
PyOpal
{
42
namespace
Globals {
47
void
Initialise
();
48
}
49
}
50
51
#endif
gmsgALL
Inform * gmsgALL
Definition:
Main.cpp:71
ippl
Ippl * ippl
Definition:
Main.cpp:69
gmsg
Inform * gmsg
Definition:
Main.cpp:70
opal.h
PyOpal
Definition:
ExceptionTranslation.cpp:21
PyOpal::Globals::Initialise
void Initialise()
Globals namespace provides routines to initialise global objects:
Definition:
Globals.cpp:50
Inform
Definition:
Inform.h:42
IpplInfo
Definition:
IpplInfo.h:69
src
PyOpal
PyCore
Globals.h
Generated on Fri Jan 23 2026 16:19:55 for OPAL (Object Oriented Parallel Accelerator Library) by
1.9.3