ARTS 2.5.11 (git: 725533f0)
workspace_memory_handler.h
Go to the documentation of this file.
1
7#ifndef __ARTS_WORKSPACE_MEMORY_HANDLER__
8#define __ARTS_WORKSPACE_MEMORY_HANDLER__
9#include "arts.h"
10#include <memory>
11#include <vector>
12
21 public:
23
28 std::shared_ptr<void> allocate(Index group_index) { return allocation_ptrs_[group_index](); }
29
35 std::shared_ptr<void> duplicate(Index group_index, const std::shared_ptr<void>& ptr) {
36 return duplication_ptrs_[group_index](ptr);
37 }
38
39 void initialize();
40
41 private:
42 std::vector<std::shared_ptr<void> (*)()> allocation_ptrs_;
43 std::vector<std::shared_ptr<void> (*)(const std::shared_ptr<void>&)> duplication_ptrs_;
44};
45#endif
The global header file for ARTS.
Handling of workspace memory.
std::shared_ptr< void > allocate(Index group_index)
Allocate workspace WSV of given group.
void initialize()
Initialization dispatch functions.
std::shared_ptr< void > duplicate(Index group_index, const std::shared_ptr< void > &ptr)
Duplicate workspace variable of given group.