ARTS
2.4.0(git:4fb77825)
|
Handling of workspace memory. More...
#include <workspace_memory_handler.h>
Public Member Functions | |
WorkspaceMemoryHandler () | |
void * | allocate (Index group_index) |
Allocate workspace WSV of given group. More... | |
void | deallocate (Index group_index, void *ptr) |
Getaway function to call the deallocation function for the WSV group with the given Index. More... | |
void * | duplicate (Index group_index, void *ptr) |
Duplicate workspace variable of given group. More... | |
void | initialize () |
Initialization dispatch functions. More... | |
Private Attributes | |
std::vector< void *(*)()> | allocation_ptrs_ |
std::vector< void(*)(void *)> | deallocation_ptrs_ |
std::vector< void *(*)(void *)> | duplication_ptrs_ |
Handling of workspace memory.
The WorkspaceMemoryHandler class is the interface between the workspace and the implementations of the WS group classes. It dispatches calls to create, destroy and duplicate workspace variables to the corresponding classes.
Definition at line 36 of file workspace_memory_handler.h.
|
inline |
Definition at line 38 of file workspace_memory_handler.h.
|
inline |
Allocate workspace WSV of given group.
group_index | Index of the group to allocate. |
Definition at line 44 of file workspace_memory_handler.h.
References allocation_ptrs_.
Referenced by InteractiveWorkspace::add_variable(), and Workspace::operator[]().
|
inline |
Getaway function to call the deallocation function for the WSV group with the given Index.
Deallocate workspace variabe of given group.
group_index | Index of the group to deallocate. |
ptr | Pointer to the WSV. |
Definition at line 53 of file workspace_memory_handler.h.
References deallocation_ptrs_.
Referenced by Workspace::del(), InteractiveWorkspace::erase_variable(), Workspace::pop_free(), and Workspace::~Workspace().
|
inline |
Duplicate workspace variable of given group.
group_index | The index of the group of the WSV. |
Pointer | to the WSV. WSV group with the given Index. |
Definition at line 62 of file workspace_memory_handler.h.
References duplication_ptrs_.
Referenced by Workspace::duplicate().
void WorkspaceMemoryHandler::initialize | ( | ) |
Initialization dispatch functions.
Definition at line 838 of file workspace_memory_handler.cc.
References allocate_wsvg_AbsorptionLines(), allocate_wsvg_Agenda(), allocate_wsvg_Any(), allocate_wsvg_ArrayOfAbsorptionLines(), allocate_wsvg_ArrayOfAgenda(), allocate_wsvg_ArrayOfArrayOfAbsorptionLines(), allocate_wsvg_ArrayOfArrayOfGriddedField1(), allocate_wsvg_ArrayOfArrayOfGriddedField2(), allocate_wsvg_ArrayOfArrayOfGriddedField3(), allocate_wsvg_ArrayOfArrayOfIndex(), allocate_wsvg_ArrayOfArrayOfMatrix(), allocate_wsvg_ArrayOfArrayOfPropagationMatrix(), allocate_wsvg_ArrayOfArrayOfRadiationVector(), allocate_wsvg_ArrayOfArrayOfScatteringMetaData(), allocate_wsvg_ArrayOfArrayOfSingleScatteringData(), allocate_wsvg_ArrayOfArrayOfSpeciesTag(), allocate_wsvg_ArrayOfArrayOfStokesVector(), allocate_wsvg_ArrayOfArrayOfString(), allocate_wsvg_ArrayOfArrayOfTensor3(), allocate_wsvg_ArrayOfArrayOfTensor6(), allocate_wsvg_ArrayOfArrayOfTime(), allocate_wsvg_ArrayOfArrayOfTransmissionMatrix(), allocate_wsvg_ArrayOfArrayOfVector(), allocate_wsvg_ArrayOfCIARecord(), allocate_wsvg_ArrayOfGriddedField1(), allocate_wsvg_ArrayOfGriddedField2(), allocate_wsvg_ArrayOfGriddedField3(), allocate_wsvg_ArrayOfGriddedField4(), allocate_wsvg_ArrayOfIndex(), allocate_wsvg_ArrayOfMatrix(), allocate_wsvg_ArrayOfPpath(), allocate_wsvg_ArrayOfPropagationMatrix(), allocate_wsvg_ArrayOfQuantumIdentifier(), allocate_wsvg_ArrayOfRadiationVector(), allocate_wsvg_ArrayOfRetrievalQuantity(), allocate_wsvg_ArrayOfScatteringMetaData(), allocate_wsvg_ArrayOfSingleScatteringData(), allocate_wsvg_ArrayOfSparse(), allocate_wsvg_ArrayOfStokesVector(), allocate_wsvg_ArrayOfString(), allocate_wsvg_ArrayOfTelsemAtlas(), allocate_wsvg_ArrayOfTensor3(), allocate_wsvg_ArrayOfTensor4(), allocate_wsvg_ArrayOfTensor5(), allocate_wsvg_ArrayOfTensor6(), allocate_wsvg_ArrayOfTensor7(), allocate_wsvg_ArrayOfTime(), allocate_wsvg_ArrayOfTransmissionMatrix(), allocate_wsvg_ArrayOfVector(), allocate_wsvg_ArrayOfXsecRecord(), allocate_wsvg_CIARecord(), allocate_wsvg_CovarianceMatrix(), allocate_wsvg_EnergyLevelMap(), allocate_wsvg_GasAbsLookup(), allocate_wsvg_GriddedField1(), allocate_wsvg_GriddedField2(), allocate_wsvg_GriddedField3(), allocate_wsvg_GriddedField4(), allocate_wsvg_GriddedField5(), allocate_wsvg_GriddedField6(), allocate_wsvg_GridPos(), allocate_wsvg_HitranRelaxationMatrixData(), allocate_wsvg_Index(), allocate_wsvg_Matrix(), allocate_wsvg_MCAntenna(), allocate_wsvg_Numeric(), allocate_wsvg_Ppath(), allocate_wsvg_PropagationMatrix(), allocate_wsvg_QuantumIdentifier(), allocate_wsvg_RadiationVector(), allocate_wsvg_Rational(), allocate_wsvg_ScatteringMetaData(), allocate_wsvg_SingleScatteringData(), allocate_wsvg_Sparse(), allocate_wsvg_SpeciesAuxData(), allocate_wsvg_StokesVector(), allocate_wsvg_String(), allocate_wsvg_TelsemAtlas(), allocate_wsvg_Tensor3(), allocate_wsvg_Tensor4(), allocate_wsvg_Tensor5(), allocate_wsvg_Tensor6(), allocate_wsvg_Tensor7(), allocate_wsvg_TessemNN(), allocate_wsvg_Time(), allocate_wsvg_Timer(), allocate_wsvg_TransmissionMatrix(), allocate_wsvg_Vector(), allocate_wsvg_Verbosity(), allocation_ptrs_, deallocate_wsvg_AbsorptionLines(), deallocate_wsvg_Agenda(), deallocate_wsvg_Any(), deallocate_wsvg_ArrayOfAbsorptionLines(), deallocate_wsvg_ArrayOfAgenda(), deallocate_wsvg_ArrayOfArrayOfAbsorptionLines(), deallocate_wsvg_ArrayOfArrayOfGriddedField1(), deallocate_wsvg_ArrayOfArrayOfGriddedField2(), deallocate_wsvg_ArrayOfArrayOfGriddedField3(), deallocate_wsvg_ArrayOfArrayOfIndex(), deallocate_wsvg_ArrayOfArrayOfMatrix(), deallocate_wsvg_ArrayOfArrayOfPropagationMatrix(), deallocate_wsvg_ArrayOfArrayOfRadiationVector(), deallocate_wsvg_ArrayOfArrayOfScatteringMetaData(), deallocate_wsvg_ArrayOfArrayOfSingleScatteringData(), deallocate_wsvg_ArrayOfArrayOfSpeciesTag(), deallocate_wsvg_ArrayOfArrayOfStokesVector(), deallocate_wsvg_ArrayOfArrayOfString(), deallocate_wsvg_ArrayOfArrayOfTensor3(), deallocate_wsvg_ArrayOfArrayOfTensor6(), deallocate_wsvg_ArrayOfArrayOfTime(), deallocate_wsvg_ArrayOfArrayOfTransmissionMatrix(), deallocate_wsvg_ArrayOfArrayOfVector(), deallocate_wsvg_ArrayOfCIARecord(), deallocate_wsvg_ArrayOfGriddedField1(), deallocate_wsvg_ArrayOfGriddedField2(), deallocate_wsvg_ArrayOfGriddedField3(), deallocate_wsvg_ArrayOfGriddedField4(), deallocate_wsvg_ArrayOfIndex(), deallocate_wsvg_ArrayOfMatrix(), deallocate_wsvg_ArrayOfPpath(), deallocate_wsvg_ArrayOfPropagationMatrix(), deallocate_wsvg_ArrayOfQuantumIdentifier(), deallocate_wsvg_ArrayOfRadiationVector(), deallocate_wsvg_ArrayOfRetrievalQuantity(), deallocate_wsvg_ArrayOfScatteringMetaData(), deallocate_wsvg_ArrayOfSingleScatteringData(), deallocate_wsvg_ArrayOfSparse(), deallocate_wsvg_ArrayOfStokesVector(), deallocate_wsvg_ArrayOfString(), deallocate_wsvg_ArrayOfTelsemAtlas(), deallocate_wsvg_ArrayOfTensor3(), deallocate_wsvg_ArrayOfTensor4(), deallocate_wsvg_ArrayOfTensor5(), deallocate_wsvg_ArrayOfTensor6(), deallocate_wsvg_ArrayOfTensor7(), deallocate_wsvg_ArrayOfTime(), deallocate_wsvg_ArrayOfTransmissionMatrix(), deallocate_wsvg_ArrayOfVector(), deallocate_wsvg_ArrayOfXsecRecord(), deallocate_wsvg_CIARecord(), deallocate_wsvg_CovarianceMatrix(), deallocate_wsvg_EnergyLevelMap(), deallocate_wsvg_GasAbsLookup(), deallocate_wsvg_GriddedField1(), deallocate_wsvg_GriddedField2(), deallocate_wsvg_GriddedField3(), deallocate_wsvg_GriddedField4(), deallocate_wsvg_GriddedField5(), deallocate_wsvg_GriddedField6(), deallocate_wsvg_GridPos(), deallocate_wsvg_HitranRelaxationMatrixData(), deallocate_wsvg_Index(), deallocate_wsvg_Matrix(), deallocate_wsvg_MCAntenna(), deallocate_wsvg_Numeric(), deallocate_wsvg_Ppath(), deallocate_wsvg_PropagationMatrix(), deallocate_wsvg_QuantumIdentifier(), deallocate_wsvg_RadiationVector(), deallocate_wsvg_Rational(), deallocate_wsvg_ScatteringMetaData(), deallocate_wsvg_SingleScatteringData(), deallocate_wsvg_Sparse(), deallocate_wsvg_SpeciesAuxData(), deallocate_wsvg_StokesVector(), deallocate_wsvg_String(), deallocate_wsvg_TelsemAtlas(), deallocate_wsvg_Tensor3(), deallocate_wsvg_Tensor4(), deallocate_wsvg_Tensor5(), deallocate_wsvg_Tensor6(), deallocate_wsvg_Tensor7(), deallocate_wsvg_TessemNN(), deallocate_wsvg_Time(), deallocate_wsvg_Timer(), deallocate_wsvg_TransmissionMatrix(), deallocate_wsvg_Vector(), deallocate_wsvg_Verbosity(), deallocation_ptrs_, duplicate_wsvg_AbsorptionLines(), duplicate_wsvg_Agenda(), duplicate_wsvg_Any(), duplicate_wsvg_ArrayOfAbsorptionLines(), duplicate_wsvg_ArrayOfAgenda(), duplicate_wsvg_ArrayOfArrayOfAbsorptionLines(), duplicate_wsvg_ArrayOfArrayOfGriddedField1(), duplicate_wsvg_ArrayOfArrayOfGriddedField2(), duplicate_wsvg_ArrayOfArrayOfGriddedField3(), duplicate_wsvg_ArrayOfArrayOfIndex(), duplicate_wsvg_ArrayOfArrayOfMatrix(), duplicate_wsvg_ArrayOfArrayOfPropagationMatrix(), duplicate_wsvg_ArrayOfArrayOfRadiationVector(), duplicate_wsvg_ArrayOfArrayOfScatteringMetaData(), duplicate_wsvg_ArrayOfArrayOfSingleScatteringData(), duplicate_wsvg_ArrayOfArrayOfSpeciesTag(), duplicate_wsvg_ArrayOfArrayOfStokesVector(), duplicate_wsvg_ArrayOfArrayOfString(), duplicate_wsvg_ArrayOfArrayOfTensor3(), duplicate_wsvg_ArrayOfArrayOfTensor6(), duplicate_wsvg_ArrayOfArrayOfTime(), duplicate_wsvg_ArrayOfArrayOfTransmissionMatrix(), duplicate_wsvg_ArrayOfArrayOfVector(), duplicate_wsvg_ArrayOfCIARecord(), duplicate_wsvg_ArrayOfGriddedField1(), duplicate_wsvg_ArrayOfGriddedField2(), duplicate_wsvg_ArrayOfGriddedField3(), duplicate_wsvg_ArrayOfGriddedField4(), duplicate_wsvg_ArrayOfIndex(), duplicate_wsvg_ArrayOfMatrix(), duplicate_wsvg_ArrayOfPpath(), duplicate_wsvg_ArrayOfPropagationMatrix(), duplicate_wsvg_ArrayOfQuantumIdentifier(), duplicate_wsvg_ArrayOfRadiationVector(), duplicate_wsvg_ArrayOfRetrievalQuantity(), duplicate_wsvg_ArrayOfScatteringMetaData(), duplicate_wsvg_ArrayOfSingleScatteringData(), duplicate_wsvg_ArrayOfSparse(), duplicate_wsvg_ArrayOfStokesVector(), duplicate_wsvg_ArrayOfString(), duplicate_wsvg_ArrayOfTelsemAtlas(), duplicate_wsvg_ArrayOfTensor3(), duplicate_wsvg_ArrayOfTensor4(), duplicate_wsvg_ArrayOfTensor5(), duplicate_wsvg_ArrayOfTensor6(), duplicate_wsvg_ArrayOfTensor7(), duplicate_wsvg_ArrayOfTime(), duplicate_wsvg_ArrayOfTransmissionMatrix(), duplicate_wsvg_ArrayOfVector(), duplicate_wsvg_ArrayOfXsecRecord(), duplicate_wsvg_CIARecord(), duplicate_wsvg_CovarianceMatrix(), duplicate_wsvg_EnergyLevelMap(), duplicate_wsvg_GasAbsLookup(), duplicate_wsvg_GriddedField1(), duplicate_wsvg_GriddedField2(), duplicate_wsvg_GriddedField3(), duplicate_wsvg_GriddedField4(), duplicate_wsvg_GriddedField5(), duplicate_wsvg_GriddedField6(), duplicate_wsvg_GridPos(), duplicate_wsvg_HitranRelaxationMatrixData(), duplicate_wsvg_Index(), duplicate_wsvg_Matrix(), duplicate_wsvg_MCAntenna(), duplicate_wsvg_Numeric(), duplicate_wsvg_Ppath(), duplicate_wsvg_PropagationMatrix(), duplicate_wsvg_QuantumIdentifier(), duplicate_wsvg_RadiationVector(), duplicate_wsvg_Rational(), duplicate_wsvg_ScatteringMetaData(), duplicate_wsvg_SingleScatteringData(), duplicate_wsvg_Sparse(), duplicate_wsvg_SpeciesAuxData(), duplicate_wsvg_StokesVector(), duplicate_wsvg_String(), duplicate_wsvg_TelsemAtlas(), duplicate_wsvg_Tensor3(), duplicate_wsvg_Tensor4(), duplicate_wsvg_Tensor5(), duplicate_wsvg_Tensor6(), duplicate_wsvg_Tensor7(), duplicate_wsvg_TessemNN(), duplicate_wsvg_Time(), duplicate_wsvg_Timer(), duplicate_wsvg_TransmissionMatrix(), duplicate_wsvg_Vector(), duplicate_wsvg_Verbosity(), and duplication_ptrs_.
Referenced by ARTS::init(), InteractiveWorkspace::initialize(), and main().
|
private |
Definition at line 69 of file workspace_memory_handler.h.
Referenced by allocate(), and initialize().
|
private |
Definition at line 70 of file workspace_memory_handler.h.
Referenced by deallocate(), and initialize().
|
private |
Definition at line 71 of file workspace_memory_handler.h.
Referenced by duplicate(), and initialize().