src/Field/AssignTags.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /***************************************************************************
00003  *
00004  * The IPPL Framework
00005  * 
00006  *
00007  * Visit http://people.web.psi.ch/adelmann/ for more details
00008  *
00009  ***************************************************************************/
00010 
00011 #ifndef ASSIGN_TAGS_H
00012 #define ASSIGN_TAGS_H
00013 
00014 // include files
00015 #include "Index/NDIndex.h"
00016 
00017 // Forward declarations:
00018 template<class T, unsigned int D> class BareField;
00019 
00020 //
00021 // A functor that knows an id.
00022 //
00023 struct SameFieldID
00024 {
00025   int ID;
00026   SameFieldID(int id) : ID(id) {}
00027   typedef bool PETE_Return_t;
00028 };
00029 
00030 
00031 struct IsCompressed
00032 {
00033 #ifdef IPPL_PURIFY
00034   IsCompressed() {}
00035   IsCompressed(const IsCompressed &) {}
00036   IsCompressed& operator=(const IsCompressed &) { return *this; }
00037 #endif
00038   typedef bool PETE_Return_t;
00039 };
00040 
00041 
00042 struct EvalFunctor_1
00043 {
00044   int I;
00045   EvalFunctor_1(int i) : I(i) {}
00046 };
00047 
00048 struct UnitEvalFunctor_1 : public EvalFunctor_1
00049 {
00050   UnitEvalFunctor_1(int i) : EvalFunctor_1(i) {}
00051 };
00052 
00053 struct EvalFunctor_2
00054 {
00055   int I, J;
00056   EvalFunctor_2(int i, int j) : I(i), J(j) {}
00057 };
00058 
00059 struct UnitEvalFunctor_2 : public EvalFunctor_2
00060 {
00061   UnitEvalFunctor_2(int i, int j) : EvalFunctor_2(i,j) {}
00062 };
00063 
00064 struct EvalFunctor_3
00065 {
00066   int I, J, K;
00067   EvalFunctor_3(int i, int j, int k) : I(i), J(j), K(k) {}
00068 };
00069 
00070 struct UnitEvalFunctor_3 : public EvalFunctor_3
00071 {
00072   UnitEvalFunctor_3(int i, int j, int k) : EvalFunctor_3(i,j,k) {}
00073 };
00074 
00075 //
00076 // A tag for beginning an LField
00077 //
00078 struct BeginLField
00079 {
00080 #ifdef IPPL_PURIFY
00081   BeginLField() {}
00082   BeginLField(const BeginLField &) {}
00083   BeginLField& operator=(const BeginLField &) { return *this; }
00084 #endif
00085   typedef int PETE_Return_t;
00086 };
00087 
00088 //
00089 // A tag for going on to next LField
00090 //
00091 struct NextLField
00092 {
00093 #ifdef IPPL_PURIFY
00094   NextLField() {}
00095   NextLField(const NextLField &) {}
00096   NextLField& operator=(const NextLField &) { return *this; }
00097 #endif
00098   typedef int PETE_Return_t;
00099 };
00100 
00101 
00102 struct StepFunctor
00103 {
00104   unsigned D;
00105   StepFunctor(unsigned d) : D(d) {}
00106   typedef int PETE_Return_t;
00107 };
00108 
00109 struct RewindFunctor
00110 {
00111   unsigned D;
00112   RewindFunctor(unsigned d) : D(d) {}
00113   typedef int PETE_Return_t;
00114 };
00115 
00116 
00117 //
00118 // Do the iterators have unit stride in the inner loop?
00119 //
00120 
00121 struct HasUnitStride
00122 {
00123 #ifdef IPPL_PURIFY
00124   HasUnitStride() {}
00125   HasUnitStride(const HasUnitStride &) {}
00126   HasUnitStride& operator=(const HasUnitStride &) { return *this; }
00127 #endif
00128   typedef bool PETE_Return_t;
00129 };
00130 
00131 // Do we need to fill the guard cells?
00132 
00133 template<unsigned D, class T1>
00134 struct FillGCIfNecessaryTag
00135 {
00136   FillGCIfNecessaryTag(const BareField<T1,D> &bf) : bf_m(&bf) { }
00137 //tjw added 3/3/99:
00138   FillGCIfNecessaryTag() : bf_m(0) { }
00139 //tjw added 3/3/99.
00140   typedef int PETE_Return_t;
00141   const BareField<T1,D> *bf_m;
00142 };
00143 
00144 template<unsigned D, class T1>
00145 inline FillGCIfNecessaryTag<D,T1> 
00146 FillGCIfNecessary(const BareField<T1,D> &bf)
00147 {
00148   return FillGCIfNecessaryTag<D,T1>(bf);
00149 }
00150 
00151 //tjw added 3/3/99: 
00152 
00153 // This weird tag is needed, because writing a no-argument FillGCIFNEcessary()
00154 // function below didn't work for some reason, at least with some compilers
00155 // like the pre-7.3 SGI compiler and CodeWarrior Pro4. Once the global
00156 // function invocation syntax FillGCIfNecessary<T,D>() is supported by all our
00157 // compilers (it's not there yet in the non-beta SGI compiler), should be able
00158 // to eliminate this FGCINTag business. --tjw 3/3/1999
00159 template<unsigned D, class T1>
00160 struct FGCINTag
00161 {
00162 };
00163 
00164 template<unsigned D, class T1>
00165 inline FillGCIfNecessaryTag<D,T1> 
00166 FillGCIfNecessary(FGCINTag<D,T1>)
00167 {
00168   return FillGCIfNecessaryTag<D,T1>();
00169 }
00170 
00171 //tjw added 3/3/99.
00172 
00173 
00174 #endif // ASSIGN_TAGS_H
00175 
00176 /***************************************************************************
00177  * $RCSfile: AssignTags.h,v $   $Author: adelmann $
00178  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:26 $
00179  * IPPL_VERSION_ID: $Id: AssignTags.h,v 1.1.1.1 2003/01/23 07:40:26 adelmann Exp $ 
00180  ***************************************************************************/

Generated on Mon Jan 16 13:23:43 2006 for IPPL by  doxygen 1.4.6