#include <Phalanx_Allocator_New.hpp>
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) |
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.
| PHX::NewAllocator::NewAllocator | ( | ) | [inline] |
| PHX::NewAllocator::~NewAllocator | ( | ) | [inline] |
| 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.
| Teuchos::ArrayRCP<DataT> PHX::NewAllocator::allocate | ( | std::size_t | num_elements | ) | [inline] |
| void PHX::NewAllocator::reset | ( | ) | [inline] |
| void PHX::NewAllocator::setup | ( | ) | [inline] |
1.5.9