Chombo + EB  3.2
CHArray_fwd.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _CHARRAY_FWD_H_
12 #define _CHARRAY_FWD_H_
13 
14 /******************************************************************************/
15 /**
16  * \file
17  *
18  * \brief Forward declarations for class CHArray
19  *
20  * These class declarations have to be in a separate file to ensure that the
21  * default template parameters are only specified once. Include this file like
22  * normal if all you want is a foward declaration of class CHArray.
23  *
24  *//***************************************************************************/
25 
26 #ifdef CH_SPACEDIM
27 // In Chombo land
28  #include "NamespaceHeader.H"
29 #endif
30 
31 /// Array configuration parameters
32 enum
33 {
34  ArZeroRow, ///< Zero lower bound and row-storage
35  ArZeroCol, ///< Zero lower bound and column-storage
36  ArRangeRow, ///< Range of subscripts and row-storage
37  ArRangeCol ///< Range of subscripts and column-
38  ///< storage
39 };
40 
41 /// Array limits
42 enum
43 {
44  CHArrayMaximumRank = 7 ///< Maximum supported rank
45 };
46 
47 namespace ArSp // CHArray support
48 {
49 
50 // An index refers to a single dimension and a size to the overall
51 // size of the array. Except for 1D arrays, indexes are smaller than
52 // sizes by division by at least 1 stride.
53 
54  typedef int IIx_t; ///< Type of int for an index. Must be
55  ///< signed to allow for lower bounds !=
56  ///< 0
57  typedef unsigned USz_t; ///< Type of unsigned int for a size
58 
59  template <typename T> class DefaultArrayAlloc;
60 }
61 template <typename T,
62  unsigned Rank,
63  int ArConf = ArZeroCol,
64  typename Alloc = ArSp::DefaultArrayAlloc<T> >
65 class CHArray;
66 
67 #ifdef CH_SPACEDIM
68  #include "NamespaceFooter.H"
69 #endif
70 #endif
Multidimensional array class.
Definition: CHArray.H:1283
Definition: CHArray_fwd.H:37
Definition: CHArray.H:205
int IIx_t
Definition: CHArray_fwd.H:54
unsigned USz_t
Type of unsigned int for a size.
Definition: CHArray_fwd.H:57
Range of subscripts and row-storage.
Definition: CHArray_fwd.H:36
Zero lower bound and column-storage.
Definition: CHArray_fwd.H:35
Maximum supported rank.
Definition: CHArray_fwd.H:44
Zero lower bound and row-storage.
Definition: CHArray_fwd.H:34
Default allocator.
Definition: CHArray.H:325