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...
#include <Teuchos_Workspace.hpp>
|
| RawWorkspace (WorkspaceStore *workspace_store, size_t num_bytes) |
| Allocate num_bytes bytes of temporary workspace. When this object is created if workspace_store != NULL the workspace_store object will be used to get the raw memory. If workspace_store == NULL || workspace_store->num_bytes_remaining() < num_bytes then this memory will have to be dynamically allocated. More...
|
|
| ~RawWorkspace () |
| Deallocate workspace. More...
|
|
size_t | num_bytes () const |
| Return the number of bytes of raw workspace. More...
|
|
char * | workspace_ptr () |
| Give a raw pointer to the beginning of the workspace. More...
|
|
const char * | workspace_ptr () const |
|
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.
Definition at line 103 of file Teuchos_Workspace.hpp.
Teuchos::RawWorkspace::RawWorkspace |
( |
WorkspaceStore * |
workspace_store, |
|
|
size_t |
num_bytes |
|
) |
| |
Allocate num_bytes bytes of temporary workspace. When this object is created if workspace_store != NULL
the workspace_store
object will be used to get the raw memory. If workspace_store == NULL ||
workspace_store->num_bytes_remaining() < num_bytes
then this memory will have to be dynamically allocated.
Preconditons:
-
num_bytes >= 0
(throw std::invalid_arguemnt)
Postconditons:
- Parameters
-
workspace_store | [in] Pointer to the workspace object to get the memory from. This can be NULL in which case new T[] and delete [] will be used instead. |
num_bytes | [in] The number of bytes to allocate. |
Definition at line 122 of file Teuchos_Workspace.cpp.
Teuchos::RawWorkspace::~RawWorkspace |
( |
| ) |
|
Teuchos::RawWorkspace::RawWorkspace |
( |
| ) |
|
|
private |
Teuchos::RawWorkspace::RawWorkspace |
( |
const RawWorkspace & |
| ) |
|
|
private |
size_t Teuchos::RawWorkspace::num_bytes |
( |
| ) |
const |
|
inline |
char * Teuchos::RawWorkspace::workspace_ptr |
( |
| ) |
|
|
inline |
const char * Teuchos::RawWorkspace::workspace_ptr |
( |
| ) |
const |
|
inline |
static void* Teuchos::RawWorkspace::operator new |
( |
size_t |
| ) |
|
|
staticprivate |
void Teuchos::RawWorkspace::operator delete |
( |
void * |
| ) |
|
|
inlinestaticprivate |
char* Teuchos::RawWorkspace::workspace_begin_ |
|
private |
char* Teuchos::RawWorkspace::workspace_end_ |
|
private |
bool Teuchos::RawWorkspace::owns_memory_ |
|
private |
The documentation for this class was generated from the following files: