Sacado  Development
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
Sacado::Fad::Exp::MemPoolStorage< T > Class Template Reference

Derivative array storage class using dynamic memory allocation. More...

#include <Sacado_Fad_Exp_MemPoolStorage.hpp>

Collaboration diagram for Sacado::Fad::Exp::MemPoolStorage< T >:
Collaboration graph
[legend]

Classes

struct  apply
 Turn MemPoolStorage into a meta-function class usable with mpl::apply. More...
 
struct  apply_N
 Replace static derivative length. More...
 

Public Types

typedef std::remove_cv< T >::type value_type
 

Public Member Functions

KOKKOS_INLINE_FUNCTION MemPoolStorage ()
 Default constructor.
 
 MemPoolStorage (const T &x)
 Constructor with value.
 
 MemPoolStorage (const int sz, const T &x, const DerivInit zero_out)
 Constructor with size sz. More...
 
 MemPoolStorage (const MemPoolStorage &x)
 Copy constructor.
 
 ~MemPoolStorage ()
 Destructor.
 
MemPoolStorageoperator= (const MemPoolStorage &x)
 Assignment.
 
int size () const
 Returns number of derivative components.
 
KOKKOS_INLINE_FUNCTION int length () const
 Returns array length.
 
void resize (int sz)
 Resize the derivative array to sz. More...
 
void resizeAndZero (int sz)
 Resize the derivative array to sz. More...
 
void expand (int sz)
 Expand derivative array to size sz. More...
 
void zero ()
 Zero out derivative array.
 
const T & val () const
 Returns value.
 
T & val ()
 Returns value.
 
const T * dx () const
 Returns derivative array.
 
dx (int i) const
 Returns derivative component i with bounds checking.
 
T & fastAccessDx (int i)
 Returns derivative component i without bounds checking.
 
const T & fastAccessDx (int i) const
 Returns derivative component i without bounds checking.
 

Static Public Member Functions

static void setDefaultPool (MemPool *pool)
 Set the default memory pool for new objects.
 

Static Public Attributes

static constexpr bool is_statically_sized = false
 
static constexpr int static_size = 0
 
static MemPooldefaultPool_
 Default memory pool.
 

Protected Attributes

MemPoolmyPool_
 Memory pool.
 

Detailed Description

template<typename T>
class Sacado::Fad::Exp::MemPoolStorage< T >

Derivative array storage class using dynamic memory allocation.

Constructor & Destructor Documentation

template<typename T >
Sacado::Fad::Exp::MemPoolStorage< T >::MemPoolStorage ( const int  sz,
const T &  x,
const DerivInit  zero_out 
)
inline

Member Function Documentation

template<typename T >
void Sacado::Fad::Exp::MemPoolStorage< T >::expand ( int  sz)
inline
template<typename T >
void Sacado::Fad::Exp::MemPoolStorage< T >::resize ( int  sz)
inline
template<typename T >
void Sacado::Fad::Exp::MemPoolStorage< T >::resizeAndZero ( int  sz)
inline

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