The Quantum Exact Simulation Toolkit
v4.0.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
/// @notdoced
33
typedef
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
/// @notdoced
48
void
initQuESTEnv
();
49
50
/// @notdoced
51
void
initCustomQuESTEnv
(
int
useDistrib,
int
useGpuAccel,
int
useMultithread);
52
53
/// @notdoced
54
void
finalizeQuESTEnv
();
55
56
/// @notdoced
57
void
syncQuESTEnv
();
58
59
/// @notdoced
60
/// @nottested
61
void
reportQuESTEnv
();
62
63
/// @notdoced
64
int
isQuESTEnvInit
();
65
66
/// @notdoced
67
QuESTEnv
getQuESTEnv
();
68
69
70
71
// end de-mangler
72
#ifdef __cplusplus
73
}
74
#endif
75
76
#endif
// ENVIRONMENT_H
77
78
/** @} (end doxygen defgroup) */
reportQuESTEnv
void reportQuESTEnv()
Definition
environment.cpp:454
finalizeQuESTEnv
void finalizeQuESTEnv()
Definition
environment.cpp:416
initCustomQuESTEnv
void initCustomQuESTEnv(int useDistrib, int useGpuAccel, int useMultithread)
Definition
environment.cpp:390
getQuESTEnv
QuESTEnv getQuESTEnv()
Definition
environment.cpp:408
isQuESTEnvInit
int isQuESTEnvInit()
Definition
environment.cpp:402
syncQuESTEnv
void syncQuESTEnv()
Definition
environment.cpp:443
initQuESTEnv
void initQuESTEnv()
Definition
environment.cpp:396
QuESTEnv
Definition
environment.h:33
quest
include
environment.h
Generated by
1.12.0