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
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 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
48
void
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
*/
56
void
initCustomQuESTEnv
(
int
useDistrib,
int
useGpuAccel,
int
useMultithread);
57
58
/// @notyetdoced
59
void
finalizeQuESTEnv
();
60
61
/// @notyetdoced
62
void
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
*/
71
void
reportQuESTEnv
();
72
73
/// @notyetdoced
74
int
isQuESTEnvInit
();
75
76
/// @notyetdoced
77
QuESTEnv
getQuESTEnv
();
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)
reportQuESTEnv
void reportQuESTEnv()
Definition
environment.cpp:447
finalizeQuESTEnv
void finalizeQuESTEnv()
Definition
environment.cpp:409
initCustomQuESTEnv
void initCustomQuESTEnv(int useDistrib, int useGpuAccel, int useMultithread)
Definition
environment.cpp:383
getQuESTEnv
QuESTEnv getQuESTEnv()
Definition
environment.cpp:401
isQuESTEnvInit
int isQuESTEnvInit()
Definition
environment.cpp:395
syncQuESTEnv
void syncQuESTEnv()
Definition
environment.cpp:436
initQuESTEnv
void initQuESTEnv()
Definition
environment.cpp:389
QuESTEnv
Definition
environment.h:33
quest
include
environment.h
Generated by
1.12.0