new
or operator delete
.
More...
![]() |
Classes | |
class | Teuchos::RawWorkspace |
Encapulsation object for raw temporary workspace that has been allocated. These objects can only be created on the stack and should not be included as the member of any other classes. More... | |
class | Teuchos::Workspace< T > |
Templated class for workspace creation. More... | |
class | Teuchos::WorkspaceStore |
Workspace encapsulation class. More... | |
class | Teuchos::WorkspaceStoreInitializeable |
WorkspaceStore class that can be used to actually reinitialize memory. More... | |
Functions | |
void | Teuchos::set_default_workspace_store (const Teuchos::RCP< WorkspaceStore > &default_workspace_store) |
Set pointer to global workspace object. | |
Teuchos::RCP< WorkspaceStore > | Teuchos::get_default_workspace_store () |
Get the global workspace object set by set_default_workspace_store() . | |
void | Teuchos::print_memory_usage_stats (const WorkspaceStore *workspace_store, std::ostream &out) |
Print statistics on memory usage. |
new
or operator delete
. Teuchos::RCP< Teuchos::WorkspaceStore > Teuchos::get_default_workspace_store | ( | ) |
Get the global workspace object set by set_default_workspace_store()
.
Definition at line 42 of file Teuchos_Workspace.cpp.
void Teuchos::print_memory_usage_stats | ( | const WorkspaceStore * | workspace_store, | |
std::ostream & | out | |||
) |
Print statistics on memory usage.
workspace_store | [in] If workspace_store!=NULL then statistics about its memory usage to this point are printed to out . | |
out | [in/out] Stream used for printing to. |
Definition at line 47 of file Teuchos_Workspace.cpp.
void Teuchos::set_default_workspace_store | ( | const Teuchos::RCP< WorkspaceStore > & | default_workspace_store | ) |
Set pointer to global workspace object.
This function sets a smart pointer to a workspace object can be set at any time and will serve as the default workspace. This object can serve as a single workspace that can be used by all of the functions in an entire process thread for all of its temporary workspace memory needs. By default this pointer is set to NULL and it is up to some entity to set this pointer to a valid object. If the application is to be threaded, then sharing a single Teuchos::WorkspaceStore object between threads will result in incorrect behavior and could potentially crash the program in some cases and the implementation of this set function and its corresponding get function must be modified.
Postconditions:
get_default_workspace_store().get() == default_workspace_store.get()
. Definition at line 37 of file Teuchos_Workspace.cpp.