The Quantum Exact Simulation Toolkit v4.1.0
Loading...
Searching...
No Matches
environment.h
1/** @file
2 * API signatures for managing the QuEST
3 * execution environment.
4 *
5 * @author Tyson Jones
6 * @author Richard Meister (aided in design)
7 *
8 * @defgroup environment Environment
9 * @ingroup api
10 * @brief Data structures for managing the QuEST execution environment.
11 * @{
12 */
13
14#ifndef ENVIRONMENT_H
15#define ENVIRONMENT_H
16
17// enable invocation by both C and C++ binaries
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22
23
24/*
25 * QuESTEnv is a struct of which there will be a single, immutable
26 * main instance, statically instantiated inside environment.cpp,
27 * accessible anywhere via a getter, and which is consulted for
28 * determining the deployment configuration. Users can obtain a
29 * local copy of this struct with getQuESTEnv().
30 */
31
32/// @notyetdoced
33typedef struct {
34
35 // deployment mode
36 int isMultithreaded;
37 int isGpuAccelerated;
38 int isDistributed;
39
40 // distributed configuration
41 int rank;
42 int numNodes;
43
44} QuESTEnv;
45
46
47/// @notyetdoced
48void initQuESTEnv();
49
50/** @notyetdoced
51 *
52 * @see
53 * - [C](https://github.com/QuEST-Kit/QuEST/blob/devel/examples/isolated/reporting_environments.c) and
54 * [C++](https://github.com/QuEST-Kit/QuEST/blob/devel/examples/isolated/reporting_environments.cpp) examples
55 */
56void initCustomQuESTEnv(int useDistrib, int useGpuAccel, int useMultithread);
57
58/// @notyetdoced
59void finalizeQuESTEnv();
60
61/// @notyetdoced
62void syncQuESTEnv();
63
64/** @notyetdoced
65 * @notyettested
66 *
67 * @see
68 * - [C](https://github.com/QuEST-Kit/QuEST/blob/devel/examples/isolated/reporting_environments.c) and
69 * [C++](https://github.com/QuEST-Kit/QuEST/blob/devel/examples/isolated/reporting_environments.cpp) examples
70 */
71void reportQuESTEnv();
72
73/// @notyetdoced
74int isQuESTEnvInit();
75
76/// @notyetdoced
78
79
80
81// end de-mangler
82#ifdef __cplusplus
83}
84#endif
85
86#endif // ENVIRONMENT_H
87
88/** @} */ // (end file-wide doxygen defgroup)
void reportQuESTEnv()
void finalizeQuESTEnv()
void initCustomQuESTEnv(int useDistrib, int useGpuAccel, int useMultithread)
QuESTEnv getQuESTEnv()
int isQuESTEnvInit()
void syncQuESTEnv()
void initQuESTEnv()