Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
Teuchos::WorkspaceStoreInitializeable Class Reference

WorkspaceStore class that can be used to actually reinitialize memory. More...

#include <Teuchos_Workspace.hpp>

Inheritance diagram for Teuchos::WorkspaceStoreInitializeable:
Inheritance graph
[legend]

Public Member Functions

 WorkspaceStoreInitializeable (size_t num_bytes=0)
 Default constructs to no memory set and will dynamically allocate all memory requested. More...
 
void initialize (size_t num_bytes)
 Set the size block of memory to be given as workspace. More...
 
- Public Member Functions inherited from Teuchos::WorkspaceStore
 ~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...
 

Additional Inherited Members

- Protected Member Functions inherited from Teuchos::WorkspaceStore
 WorkspaceStore (size_t num_bytes)
 
void protected_initialize (size_t num_bytes)
 

Detailed Description

WorkspaceStore class that can be used to actually reinitialize memory.

The client can create concrete instances of this type and initialize the memory used. The client should call initialize(num_bytes) to set the number of bytes to allocate where num_bytes should be large enough to satisfy all but the largests of memory request needs.

Definition at line 330 of file Teuchos_Workspace.hpp.

Constructor & Destructor Documentation

Teuchos::WorkspaceStoreInitializeable::WorkspaceStoreInitializeable ( size_t  num_bytes = 0)
inline

Default constructs to no memory set and will dynamically allocate all memory requested.

Definition at line 508 of file Teuchos_Workspace.hpp.

Member Function Documentation

void Teuchos::WorkspaceStoreInitializeable::initialize ( size_t  num_bytes)
inline

Set the size block of memory to be given as workspace.

If there are any instantiated RawWorkspace objects then this function willl throw an std::exception. It must be called before any RawWorkspace objects are created.

Definition at line 513 of file Teuchos_Workspace.hpp.


The documentation for this class was generated from the following file: