Teuchos - Trilinos Tools Package
Version of the Day
|
Workspace encapsulation class. More...
#include <Teuchos_Workspace.hpp>
Public Member Functions | |
~WorkspaceStore () | |
size_t | num_bytes_total () const |
Return the total number of bytes that where initially allocated. More... | |
size_t | num_bytes_remaining () const |
Return the number of bytes remaining currently. More... | |
int | num_static_allocations () const |
Return the number of static memory allocations granted thus far. This is the number of memory allocations requested by the creation of RawWorkspace objects where there was sufficient preallocated memory to satisfy the request. More... | |
int | num_dyn_allocations () const |
Return the number of dynamic memory allocations granted thus far. This is the number of memory allocations requested by the creation of RawWorkspace objects where there was not sufficient preallocated memory to satisfy the request and dynamic memory had to be created. More... | |
size_t | num_current_bytes_total () |
Return the total number of bytes currently allocated.. This is the total number of bytes currently being used. More... | |
size_t | num_max_bytes_needed () const |
Return the maximum storage in bytes needed. This is the maximum total amount of * storage that was needed at any one time. More... | |
Protected Member Functions | |
WorkspaceStore (size_t num_bytes) | |
void | protected_initialize (size_t num_bytes) |
Friends | |
class | RawWorkspace |
Workspace encapsulation class.
Base class for objects that allocate a huge block of memory at once and then allow RawWorkspace (an hense Workspace<T>) objects to be created that make use of this memory in a stack-like fasion. The classes WorkspaceStore and RawWorkspace work closely together and are useless on their own.
Through this interface, a client can not initialize or resize the size of the available workspace and can not directly instantiate objects of this type. Instead it must create a derived WorkspaceStoreInitializeable object defined later.
Definition at line 235 of file Teuchos_Workspace.hpp.
Teuchos::WorkspaceStore::~WorkspaceStore | ( | ) |
Definition at line 67 of file Teuchos_Workspace.cpp.
|
protected |
Definition at line 54 of file Teuchos_Workspace.cpp.
|
inline |
Return the total number of bytes that where initially allocated.
Definition at line 437 of file Teuchos_Workspace.hpp.
|
inline |
Return the number of bytes remaining currently.
Definition at line 443 of file Teuchos_Workspace.hpp.
|
inline |
Return the number of static memory allocations granted thus far. This is the number of memory allocations requested by the creation of RawWorkspace objects where there was sufficient preallocated memory to satisfy the request.
Definition at line 449 of file Teuchos_Workspace.hpp.
|
inline |
Return the number of dynamic memory allocations granted thus far. This is the number of memory allocations requested by the creation of RawWorkspace objects where there was not sufficient preallocated memory to satisfy the request and dynamic memory had to be created.
Definition at line 455 of file Teuchos_Workspace.hpp.
|
inline |
Return the total number of bytes currently allocated.. This is the total number of bytes currently being used.
Definition at line 461 of file Teuchos_Workspace.hpp.
|
inline |
Return the maximum storage in bytes needed. This is the maximum total amount of * storage that was needed at any one time.
Definition at line 467 of file Teuchos_Workspace.hpp.
|
protected |
Definition at line 71 of file Teuchos_Workspace.cpp.
|
friend |
Definition at line 238 of file Teuchos_Workspace.hpp.