The Quantum Exact Simulation Toolkit
v4.2.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
19
extern
"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
33
typedef
struct
{
34
35
// deployment modes which can be runtime disabled
36
int
isMultithreaded;
37
int
isGpuAccelerated;
38
int
isDistributed;
39
40
// deployment modes which cannot be directly changed after compilation
41
int
isCuQuantumEnabled;
42
43
// deployment configurations which can be changed via environment variables
44
int
isGpuSharingEnabled;
45
46
// distributed configuration
47
int
rank;
48
int
numNodes;
49
50
}
QuESTEnv
;
51
52
53
/// @notyetdoced
54
void
initQuESTEnv
();
55
56
/** @notyetdoced
57
*
58
* @see
59
* - [C](https://github.com/QuEST-Kit/QuEST/blob/devel/examples/isolated/reporting_environments.c) and
60
* [C++](https://github.com/QuEST-Kit/QuEST/blob/devel/examples/isolated/reporting_environments.cpp) examples
61
*/
62
void
initCustomQuESTEnv
(
int
useDistrib,
int
useGpuAccel,
int
useMultithread);
63
64
/// @notyetdoced
65
void
finalizeQuESTEnv
();
66
67
/// @notyetdoced
68
void
syncQuESTEnv
();
69
70
/** @notyetdoced
71
* @notyettested
72
*
73
* @see
74
* - [C](https://github.com/QuEST-Kit/QuEST/blob/devel/examples/isolated/reporting_environments.c) and
75
* [C++](https://github.com/QuEST-Kit/QuEST/blob/devel/examples/isolated/reporting_environments.cpp) examples
76
*/
77
void
reportQuESTEnv
();
78
79
/// @notyetdoced
80
int
isQuESTEnvInit
();
81
82
/// @notyetdoced
83
QuESTEnv
getQuESTEnv
();
84
85
86
87
// end de-mangler
88
#ifdef __cplusplus
89
}
90
#endif
91
92
#endif
// ENVIRONMENT_H
93
94
/** @} */
// (end file-wide doxygen defgroup)
reportQuESTEnv
void reportQuESTEnv()
Definition
environment.cpp:462
finalizeQuESTEnv
void finalizeQuESTEnv()
Definition
environment.cpp:424
initCustomQuESTEnv
void initCustomQuESTEnv(int useDistrib, int useGpuAccel, int useMultithread)
Definition
environment.cpp:398
getQuESTEnv
QuESTEnv getQuESTEnv()
Definition
environment.cpp:416
isQuESTEnvInit
int isQuESTEnvInit()
Definition
environment.cpp:410
syncQuESTEnv
void syncQuESTEnv()
Definition
environment.cpp:451
initQuESTEnv
void initQuESTEnv()
Definition
environment.cpp:404
QuESTEnv
Definition
environment.h:33
quest
include
environment.h
Generated by
1.12.0