Teuchos::WorkspaceStore Class Reference
[Set of utilities for allocating temporary workspace.]

Workspace encapsulation class. More...

#include <Teuchos_Workspace.hpp>

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

List of all members.

Public Member Functions

 ~WorkspaceStore ()
 
size_t num_bytes_total () const
 Return the total number of bytes that where initially allocated.
size_t num_bytes_remaining () const
 Return the number of bytes remaining currently.
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.
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.
size_t num_current_bytes_total ()
 Return the total number of bytes currently allocated.. This is the total number of bytes currently being used.
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.

Protected Member Functions

 WorkspaceStore (size_t num_bytes)
 
void protected_initialize (size_t num_bytes)
 

Private Member Functions

 WorkspaceStore (const WorkspaceStore &)
WorkspaceStoreoperator= (const WorkspaceStore &)

Private Attributes

char * workspace_begin_
char * workspace_end_
char * curr_ws_ptr_
int num_static_allocations_
int num_dyn_allocations_
size_t num_current_bytes_total_
size_t num_max_bytes_needed_

Friends

class RawWorkspace
 

Detailed Description

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 254 of file Teuchos_Workspace.hpp.


Constructor & Destructor Documentation

Teuchos::WorkspaceStore::~WorkspaceStore (  ) 

Definition at line 86 of file Teuchos_Workspace.cpp.

Teuchos::WorkspaceStore::WorkspaceStore ( size_t  num_bytes  )  [protected]

Definition at line 73 of file Teuchos_Workspace.cpp.

Teuchos::WorkspaceStore::WorkspaceStore ( const WorkspaceStore  )  [private]

Member Function Documentation

size_t Teuchos::WorkspaceStore::num_bytes_total (  )  const [inline]

Return the total number of bytes that where initially allocated.

Definition at line 456 of file Teuchos_Workspace.hpp.

size_t Teuchos::WorkspaceStore::num_bytes_remaining (  )  const [inline]

Return the number of bytes remaining currently.

Definition at line 462 of file Teuchos_Workspace.hpp.

int Teuchos::WorkspaceStore::num_static_allocations (  )  const [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 468 of file Teuchos_Workspace.hpp.

int Teuchos::WorkspaceStore::num_dyn_allocations (  )  const [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 474 of file Teuchos_Workspace.hpp.

size_t Teuchos::WorkspaceStore::num_current_bytes_total (  )  [inline]

Return the total number of bytes currently allocated.. This is the total number of bytes currently being used.

Definition at line 480 of file Teuchos_Workspace.hpp.

size_t Teuchos::WorkspaceStore::num_max_bytes_needed (  )  const [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 486 of file Teuchos_Workspace.hpp.

void Teuchos::WorkspaceStore::protected_initialize ( size_t  num_bytes  )  [protected]

Definition at line 90 of file Teuchos_Workspace.cpp.

WorkspaceStore& Teuchos::WorkspaceStore::operator= ( const WorkspaceStore  )  [private]

Friends And Related Function Documentation

friend class RawWorkspace [friend]

Definition at line 257 of file Teuchos_Workspace.hpp.


Member Data Documentation

Definition at line 292 of file Teuchos_Workspace.hpp.

Definition at line 294 of file Teuchos_Workspace.hpp.

Definition at line 296 of file Teuchos_Workspace.hpp.

Definition at line 298 of file Teuchos_Workspace.hpp.

Definition at line 300 of file Teuchos_Workspace.hpp.

Definition at line 303 of file Teuchos_Workspace.hpp.

Definition at line 304 of file Teuchos_Workspace.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Tue Oct 20 10:14:05 2009 for Teuchos Package Browser (Single Doxygen Collection) by  doxygen 1.6.1