Sacado Package Browser (Single Doxygen Collection)
Version of the Day
|
Derivative array storage class using dynamic memory allocation. More...
#include <Sacado_Fad_VectorDynamicStorage.hpp>
Public Types | |
typedef T | value_type |
Public Member Functions | |
template<typename S > | |
KOKKOS_INLINE_FUNCTION | VectorDynamicStorage (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL) |
Default constructor. More... | |
KOKKOS_INLINE_FUNCTION | VectorDynamicStorage (const int sz, const T &x, const DerivInit zero_out=InitDerivArray) |
Constructor with size sz . More... | |
KOKKOS_INLINE_FUNCTION | VectorDynamicStorage (const int sz, T *x, U *dx_p, const int stride, bool zero_out) |
Constructor with supplied memory. More... | |
KOKKOS_INLINE_FUNCTION | VectorDynamicStorage (const VectorDynamicStorage &x) |
Copy constructor. More... | |
KOKKOS_INLINE_FUNCTION | ~VectorDynamicStorage () |
Destructor. More... | |
KOKKOS_INLINE_FUNCTION VectorDynamicStorage & | operator= (const VectorDynamicStorage &x) |
Assignment. More... | |
KOKKOS_INLINE_FUNCTION int | size () const |
Returns number of derivative components. More... | |
KOKKOS_INLINE_FUNCTION int | length () const |
Returns array length. More... | |
KOKKOS_INLINE_FUNCTION void | resize (int sz) |
Resize the derivative array to sz. More... | |
KOKKOS_INLINE_FUNCTION void | resizeAndZero (int sz) |
Resize the derivative array to sz. More... | |
KOKKOS_INLINE_FUNCTION void | expand (int sz) |
Expand derivative array to size sz. More... | |
KOKKOS_INLINE_FUNCTION void | zero () |
Zero out derivative array. More... | |
KOKKOS_INLINE_FUNCTION void | setMemory (int sz, T *x, U *dx_p, int stride) |
Set value/derivative array memory. More... | |
KOKKOS_INLINE_FUNCTION const T & | val () const |
Returns value. More... | |
KOKKOS_INLINE_FUNCTION T & | val () |
Returns value. More... | |
KOKKOS_INLINE_FUNCTION const U * | dx () const |
Returns derivative array. More... | |
KOKKOS_INLINE_FUNCTION U | dx (int i) const |
Returns derivative component i with bounds checking. More... | |
KOKKOS_INLINE_FUNCTION U & | fastAccessDx (int i) |
Returns derivative component i without bounds checking. More... | |
KOKKOS_INLINE_FUNCTION const U & | fastAccessDx (int i) const |
Returns derivative component i without bounds checking. More... | |
Private Attributes | |
T | v_ |
bool | owns_mem |
Do we own the val/dx storage. More... | |
int | sz_ |
Derivative array size. More... | |
int | len_ |
Derivative array length. More... | |
int | stride_ |
Derivative array stride. More... | |
T * | val_ |
Value. More... | |
U * | dx_ |
Derivative array. More... | |
Derivative array storage class using dynamic memory allocation.
Definition at line 42 of file Sacado_Fad_VectorDynamicStorage.hpp.
typedef T Sacado::Fad::VectorDynamicStorage< T, U >::value_type |
Definition at line 46 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Default constructor.
Definition at line 51 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Constructor with size sz
.
Initializes derivative array 0 of length sz
Definition at line 60 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Constructor with supplied memory.
Definition at line 70 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Copy constructor.
Definition at line 80 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Destructor.
Definition at line 88 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Assignment.
Definition at line 97 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Returns number of derivative components.
Definition at line 123 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Returns array length.
Definition at line 127 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Resize the derivative array to sz.
Note: This does not necessarily preserve derivative components.
Definition at line 134 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Resize the derivative array to sz.
This method doest not preserve any existing derivative components but sets any that are added to zero.
Definition at line 154 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Expand derivative array to size sz.
This method preserves any existing derivative components and sets any that are added to zero.
Definition at line 176 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Zero out derivative array.
Definition at line 196 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Set value/derivative array memory.
Definition at line 202 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Returns value.
Definition at line 221 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Returns value.
Definition at line 225 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Returns derivative array.
Definition at line 229 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Returns derivative component i
with bounds checking.
Definition at line 233 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Returns derivative component i
without bounds checking.
Definition at line 237 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
inline |
Returns derivative component i
without bounds checking.
Definition at line 241 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
private |
Definition at line 245 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
private |
Do we own the val/dx storage.
Definition at line 250 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
private |
Derivative array size.
Definition at line 253 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
private |
Derivative array length.
Definition at line 256 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
private |
Derivative array stride.
Definition at line 259 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
private |
Definition at line 262 of file Sacado_Fad_VectorDynamicStorage.hpp.
|
private |
Derivative array.
Definition at line 265 of file Sacado_Fad_VectorDynamicStorage.hpp.