Go to the documentation of this file.
62 ws.push_back(stack<WsvStruct *>());
69 if (wsvs && wsvs->
wsv) {
81 if (
ws[i].size() &&
ws[i].top()->wsv) {
96 for (
Index i = 0; i < workspace.
ws.nelem(); i++) {
99 if (workspace.
ws[i].size() && workspace.
ws[i].top()->wsv) {
100 wsvs->
wsv = workspace.
ws[i].top()->wsv;
112 #pragma omp critical(ws_destruct)
115 for (
int i = 0; i <
ws.nelem(); i++) {
118 while (
ws[i].size()) {
170 if (!
ws[i].size())
push(i, NULL);
172 if (!
ws[i].top()->wsv) {
173 ws[i].top()->auto_allocated =
true;
177 ws[i].top()->initialized =
true;
179 return (
ws[i].top()->wsv);
Handling of workspace memory.
static Array< WsvRecord > wsv_data
Global WSV data.
void * pop(Index i)
Remove the topmost WSV from its stack.
The WorkspaceMemoryHandler.
Array< stack< WsvStruct * > > ws
Workspace variable container.
String context
Debugging context.
void * duplicate(Index group_index, void *ptr)
Duplicate workspace variable of given group.
Index add_wsv_inplace(const WsvRecord &wsv)
Add a new variable to existing workspace and to the static maps.
Index nelem(const Lines &l)
Number of lines.
void deallocate(Index group_index, void *ptr)
Getaway function to call the deallocation function for the WSV group with the given Index.
WorkspaceMemoryHandler workspace_memory_handler
The workspace memory handler Defined in workspace_ng.cc.
void * allocate(Index group_index)
Allocate workspace WSV of given group.
void * operator[](Index i)
Retrieve a pointer to the given WSV.
void del(Index i)
Delete WSV.
void pop_free(Index i)
Remove the topmost WSV from its stack and free its memory.
void push(Index i, void *wsv)
Push a new WSV onto its stack.
void duplicate(Index i)
Duplicate WSV.
void push_uninitialized(Index i, void *wsv)
Put a new WSV onto its stack.
Workspace()
Construct a new workspace.
This class contains all static information for one workspace variable.
This file contains the Workspace class.
static map< String, Index > WsvMap
Global map associated with wsv_data.
static Index add_wsv(const WsvRecord &wsv)
Append a new WSV to the workspace.
virtual ~Workspace()
Destruct the workspace and free all WSVs.
INDEX Index
The type to use for all integer numbers and indices.
static void define_wsv_map()
Map WSV names to indices.
Index nelem() const
Number of elements.
Auxiliary header stuff related to workspace variable groups.