PHX::NewAllocator Class Reference

Allocator that uses "new" to allocate each array separately. More...

#include <Phalanx_Allocator_New.hpp>

List of all members.

Public Member Functions

 NewAllocator ()
 ~NewAllocator ()
void reset ()
void addRequiredChunk (std::size_t size_of_data_type, std::size_t num_elements)
 data_type_size is the size of a single element of the data type and num_elements is the number of elements of the data type that need to be allocated.
void setup ()
template<class DataT >
Teuchos::ArrayRCP< DataT > allocate (std::size_t num_elements)


Detailed Description

Allocator that uses "new" to allocate each array separately.

This object just uses new on the fly to allocate field data. The memory for different fields is therefore non-contiguous. This is a very safe allocator, but may be inefficient due to cache issues/page thrashing.


Constructor & Destructor Documentation

PHX::NewAllocator::NewAllocator (  )  [inline]

PHX::NewAllocator::~NewAllocator (  )  [inline]


Member Function Documentation

void PHX::NewAllocator::addRequiredChunk ( std::size_t  size_of_data_type,
std::size_t  num_elements 
) [inline]

data_type_size is the size of a single element of the data type and num_elements is the number of elements of the data type that need to be allocated.

template<class DataT >
Teuchos::ArrayRCP<DataT> PHX::NewAllocator::allocate ( std::size_t  num_elements  )  [inline]

void PHX::NewAllocator::reset (  )  [inline]

void PHX::NewAllocator::setup (  )  [inline]


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

Generated on Thu Dec 17 11:06:13 2009 for Phalanx by  doxygen 1.5.9