FLAME  devel
 All Classes Functions Variables Typedefs Enumerations Pages
Public Types | Public Member Functions | Public Attributes | List of all members
StateBase::ArrayInfo Struct Reference

Used with StateBase::getArray() to describe a single parameter. More...

#include <base.h>

Public Types

enum  { maxdims =3 }
 
enum  Type { Double, Sizet }
 The parameter type Double (double) or Sizet (size_t)
 

Public Member Functions

bool inbounds (size_t *d) const
 is the given index valid?
 
void * raw (size_t *d)
 
template<typename E >
E * get (size_t *d)
 Helper to fetch the pointer for a given index (assumed valid)
 

Public Attributes

const char * name
 The parameter name.
 
enum StateBase::ArrayInfo::Type type
 
void * ptr
 
unsigned ndim
 
size_t dim [maxdims]
 Array dimensions in elements.
 
size_t stride [maxdims]
 Array strides in bytes.
 

Detailed Description

Used with StateBase::getArray() to describe a single parameter.

Definition at line 48 of file base.h.

Member Data Documentation

unsigned StateBase::ArrayInfo::ndim

Number of dimensions. Indicates how many entries in dim[] and stride[] are valid. ndim==0 indicates a scalar.

Precondition
ndim<=maxdims

Definition at line 64 of file base.h.

void* StateBase::ArrayInfo::ptr

Pointer to parameter storage. Actual type depends on the type: Double (double) or Sizet (size_t)

Definition at line 59 of file base.h.


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