source: XMLIO_V2/dev/common/src/xmlio/array_mac.hpp @ 219

Last change on this file since 219 was 219, checked in by hozdoba, 10 years ago

Préparation nouvelle arborescence

File size: 992 bytes
Line 
1#ifndef __XMLIO_CArray_mac__
2#define __XMLIO_CArray_mac__
3
4/// ////////////////////// Macros ////////////////////// ///
5
6// Type Fortran
7#define ARRAY(valuetype, numdims) boost::shared_ptr<CArray<valuetype, numdims> >
8
9#define ARRAY_ASSIGN(value, valuetype, numdims, extent)\
10   value.reset(new CArray<valuetype, numdims>(boost::extents extent))
11
12#define ARRAY_CREATE(value, valuetype, numdims, extent)\
13   ARRAY(valuetype, numdims) value =                   \
14   ARRAY(valuetype, numdims)(new CArray<valuetype, numdims>(boost::extents extent))
15
16// Type C
17#define ARRAY_C_ASSIGN(value, valuetype, numdims, extent)\
18   value = ARRAY(valuetype, numdims)                     \
19   (new CArray<valuetype, numdims>(boost::extents extent, c_storage_order()))
20
21#define ARRAY_C_CREATE(value, valuetype, numdims, extent)\
22   ARRAY_C_ASSIGN(ARRAY(valuetype, numdims) value, valuetype, numdims, extent)
23
24///---------------------------------------------------------------
25
26#endif // __XMLIO_CArray_mac__
Note: See TracBrowser for help on using the repository browser.