atlas
FieldInterface.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2013 ECMWF.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation
8  * nor does it submit to any jurisdiction.
9  */
10 
14 
15 #pragma once
16 
17 #include "atlas/field/detail/FieldImpl.h"
18 
19 namespace atlas {
20 namespace functionspace {
21 class FunctionSpaceImpl;
22 }
23 } // namespace atlas
24 
25 namespace atlas {
26 namespace field {
27 
28 //----------------------------------------------------------------------------------------------------------------------
29 
30 // C wrapper interfaces to C++ routines
31 extern "C" {
32 FieldImpl* atlas__Field__wrap_int_specf( const char* name, int data[], int rank, int shapef[], int stridesf[] );
33 FieldImpl* atlas__Field__wrap_long_specf( const char* name, long data[], int rank, int shapef[], int stridesf[] );
34 FieldImpl* atlas__Field__wrap_float_specf( const char* name, float data[], int rank, int shapef[], int stridesf[] );
35 FieldImpl* atlas__Field__wrap_double_specf( const char* name, double data[], int rank, int shapef[], int stridesf[] );
36 FieldImpl* atlas__Field__create( eckit::Parametrisation* params );
37 void atlas__Field__delete( FieldImpl* This );
38 const char* atlas__Field__name( FieldImpl* This );
39 void atlas__Field__datatype( FieldImpl* This, char*& datatype, int& size, int& allocated );
40 int atlas__Field__kind( FieldImpl* This );
41 int atlas__Field__rank( FieldImpl* This );
42 int atlas__Field__size( FieldImpl* This );
43 int atlas__Field__levels( FieldImpl* This );
44 double atlas__Field__bytes( FieldImpl* This );
45 void atlas__Field__shapef( FieldImpl* This, int*& shape, int& rank );
46 void atlas__Field__stridesf( FieldImpl* This, int*& strides, int& rank );
47 void atlas__Field__data_int_specf( FieldImpl* This, int*& field_data, int& rank, int*& field_shapef,
48  int*& field_stridesf );
49 void atlas__Field__data_long_specf( FieldImpl* This, long*& field_data, int& rank, int*& field_shapef,
50  int*& field_stridesf );
51 void atlas__Field__data_float_specf( FieldImpl* This, float*& field_data, int& rank, int*& field_shapef,
52  int*& field_stridesf );
53 void atlas__Field__data_double_specf( FieldImpl* This, double*& field_data, int& rank, int*& field_shapef,
54  int*& field_stridesf );
55 util::Metadata* atlas__Field__metadata( FieldImpl* This );
56 const functionspace::FunctionSpaceImpl* atlas__Field__functionspace( FieldImpl* This );
57 void atlas__Field__rename( FieldImpl* This, const char* name );
58 void atlas__Field__set_levels( FieldImpl* This, int levels );
59 void atlas__Field__set_functionspace( FieldImpl* This, const functionspace::FunctionSpaceImpl* functionspace );
60 int atlas__Field__host_needs_update( const FieldImpl* This );
61 int atlas__Field__device_needs_update( const FieldImpl* This );
62 void atlas__Field__update_device( FieldImpl* This );
63 void atlas__Field__update_host( FieldImpl* This );
64 void atlas__Field__sync_host_device( FieldImpl* This );
65 void atlas__Field__set_dirty( FieldImpl* This, int value );
66 void atlas__Field__halo_exchange( FieldImpl* This, int on_device );
67 void atlas__Field__adjoint_halo_exchange( FieldImpl* This, int on_device );
68 int atlas__Field__dirty( FieldImpl* This );
69 int atlas__Field__contiguous( FieldImpl* This );
70 }
71 
72 //----------------------------------------------------------------------------------------------------------------------
73 
74 } // namespace field
75 } // namespace atlas
Contains all atlas classes and methods.
Definition: atlas-grids.cc:33