atlas
Public Member Functions | Static Public Member Functions | Friends | List of all members
atlas::field::FieldImpl Class Reference
Inheritance diagram for atlas::field::FieldImpl:
Inheritance graph
[legend]
Collaboration diagram for atlas::field::FieldImpl:
Collaboration graph
[legend]

Public Member Functions

 operator const array::Array & () const
 Implicit conversion to Array.
 
 operator array::Array & ()
 
const array::Arrayarray () const
 
array::Arrayarray ()
 
void * storage ()
 Access to raw data.
 
array::DataType datatype () const
 Internal data type of field.
 
const std::string & name () const
 Name associated to this field.
 
void rename (const std::string &name)
 Rename this field.
 
const util::Metadatametadata () const
 Access to metadata associated to this field.
 
util::Metadatametadata ()
 
void resize (const array::ArrayShape &)
 Resize field to given shape.
 
void insert (idx_t idx1, idx_t size1)
 
const std::vector< int > & shapef () const
 Shape of this field in Fortran style (reverse order of C style)
 
const std::vector< int > & stridesf () const
 Strides of this field in Fortran style (reverse order of C style)
 
const array::ArrayShapeshape () const
 Shape of this field (reverse order of Fortran style)
 
const array::ArrayStridesstrides () const
 Strides of this field.
 
idx_t shape (idx_t i) const
 Shape of this field associated to index 'i'.
 
idx_t stride (idx_t i) const
 Stride of this field associated to index 'i'.
 
size_t size () const
 Number of values stored in this field.
 
idx_t rank () const
 Rank of field.
 
size_t bytes () const
 Number of bytes occupied by the values of this field.
 
void dump (std::ostream &os) const
 Output information of field plus raw data.
 
void set_levels (idx_t n)
 Metadata that is more intrinsic to the Field, and queried often.
 
void set_variables (idx_t n)
 
idx_t levels () const
 
idx_t variables () const
 
void set_functionspace (const FunctionSpace &)
 
const FunctionSpacefunctionspace () const
 
size_t footprint () const
 Return the memory footprint of the Field.
 
bool dirty () const
 
void set_dirty (bool=true) const
 
template<typename DATATYPE >
DATATYPE const * host_data () const
 
template<typename DATATYPE >
DATATYPE * host_data ()
 
template<typename DATATYPE >
DATATYPE const * device_data () const
 
template<typename DATATYPE >
DATATYPE * device_data ()
 
template<typename DATATYPE >
DATATYPE const * data () const
 
template<typename DATATYPE >
DATATYPE * data ()
 
void updateHost () const
 
void updateDevice () const
 
void syncHostDevice () const
 
bool hostNeedsUpdate () const
 
bool deviceNeedsUpdate () const
 
void reactivateDeviceWriteViews () const
 
void reactivateHostWriteViews () const
 
void haloExchange (bool on_device=false) const
 
void adjointHaloExchange (bool on_device=false) const
 
void callbackOnDestruction (std::function< void()> &&f)
 

Static Public Member Functions

static FieldImplcreate (const eckit::Parametrisation &)
 Create field from parametrisation.
 
static FieldImplcreate (const std::string &name, array::DataType, const array::ArrayShape &=array::ArrayShape())
 Create field with given name, Datatype and ArrayShape.
 
static FieldImplcreate (const std::string &name, array::DataType, array::ArraySpec &&)
 Create field with given name, Datatype and ArrayShape.
 
template<typename DATATYPE >
static FieldImplcreate (const std::string &name, const array::ArrayShape &=array::ArrayShape())
 Create field with given name, Datatype of template and ArrayShape.
 
static FieldImplcreate (const std::string &name, array::Array *)
 Create field with given name, and take ownership of given Array.
 
template<typename DATATYPE >
static FieldImplwrap (const std::string &name, DATATYPE *data, const array::ArraySpec &)
 Create field by wrapping existing data, Datatype of template and ArraySpec.
 
template<typename DATATYPE >
static FieldImplwrap (const std::string &name, DATATYPE *data, const array::ArrayShape &)
 Create field by wrapping existing data, Datatype of template and ArrayShape.
 

Friends

std::ostream & operator<< (std::ostream &os, const FieldImpl &v)
 Output information of field.
 

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