Patch: PETE Patches: NewField->Field

Jeffrey Oldham oldham at codesourcery.com
Wed Sep 12 21:10:05 UTC 2001


We continue replacing the old field abstraction with the new field
abstraction.  Using an updated PETE (not included), we modify the PETE
input files by replacing PoomaField{,Vector}.in with
PoomaNewField{,Vector}.in.  The changes to the resulting header files
consists of additional blank lines produced by PETE's MakeOperator.

2001-09-11  Jeffrey D. Oldham  <oldham at codesourcery.com>

        * Field/FieldOperators.h: Minor blank lines added.
        * Field/PoomaFieldOperators.h: Likewise.
        * Field/VectorFieldOperators.h: Likewise.
        * Pooma/PETE/PoomaClass.in: Remove ConstArray.
        * Pooma/PETE/PoomaDynamicArray.in: Likewise.
        * Pooma/PETE/PoomaField.in: Remove ConstField.  Add MakeReturn.
        * Pooma/PETE/PoomaFieldVector.in: Likewise.
        * Pooma/PETE/PoomaNewField.in: Remove this file.
        * Pooma/PETE/PoomaNewFieldVector.in: Likewise.
        * Pooma/PETE/PoomaOps.in: Prefix abs with 'std'.
        * Pooma/PETE/PoomaVectorClass.in: Remove ConstArray.

Tested by       constructing new header files
                compiling Pooma library
                building Field tests
                using Linux and gcc 3.1
Approved by     Stephen Smith
Applied to      mainline

Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com
-------------- next part --------------
Index: Field/FieldOperators.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Field/FieldOperators.h,v
retrieving revision 1.4
diff -c -p -r1.4 FieldOperators.h
*** Field/FieldOperators.h	2001/08/30 01:15:06	1.4
--- Field/FieldOperators.h	2001/09/12 01:04:26
***************
*** 13,23 ****
--- 13,26 ----
  //
  ///////////////////////////////////////////////////////////////////////////////
  
+ 
  template<class G, class T, class E> class Field;
  
  #undef MakeReturn
  #define MakeReturn MakeFieldReturn
  
+ 
+ 
  template<class G1,class T1,class E1>
  inline typename MakeReturn<UnaryNode<FnArcCos,
    typename CreateLeaf<Field<G1,T1,E1> >::Leaf_t> >::Expression_t
*************** where(const Field<G1,T1,E1> & c,const T2
*** 1819,1825 ****
--- 1822,1830 ----
      CreateLeaf<T3 >::make(f)));
  }
  
+ 
  #undef MakeReturn
+ 
  
  #endif // POOMA_FIELD_FIELDOPERATORS_H
  
Index: Field/PoomaFieldOperators.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Field/PoomaFieldOperators.h,v
retrieving revision 1.8
diff -c -p -r1.8 PoomaFieldOperators.h
*** Field/PoomaFieldOperators.h	2001/08/30 01:15:06	1.8
--- Field/PoomaFieldOperators.h	2001/09/12 01:04:26
*************** Tensor<D, T, OutputEngineTag>
*** 23,28 ****
--- 23,29 ----
  symmetrize(const Tensor<D, T, EngineTag> &x);
  #endif
  
+ 
  template<class G, class T, class E> class Field;
  
  #undef MakeReturn
*************** NE(const T1 & l,const Field<G2,T2,E2> & 
*** 1096,1102 ****
--- 1097,1105 ----
  #ifdef PETE_ALLOW_SCALAR_SHIFT
  #endif // PETE_ALLOW_SCALAR_SHIFT
  
+ 
  #undef MakeReturn
+ 
  
  #endif // POOMA_FIELD_POOMAFIELDOPERATORS_H
  
Index: Field/VectorFieldOperators.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Field/VectorFieldOperators.h,v
retrieving revision 1.4
diff -c -p -r1.4 VectorFieldOperators.h
*** Field/VectorFieldOperators.h	2001/08/30 01:15:07	1.4
--- Field/VectorFieldOperators.h	2001/09/12 01:04:26
***************
*** 15,25 ****
--- 15,28 ----
  //
  ///////////////////////////////////////////////////////////////////////////////
  
+ 
  template<class G, class T, class E> class Field;
  
  #undef MakeReturn
  #define MakeReturn MakeFieldReturn
  
+ 
+ 
  template<class G1,class T1,class E1,int D2,class T2,class E2>
  inline typename MakeReturn<BinaryNode<OpAdd,
    typename CreateLeaf<Field<G1,T1,E1> >::Leaf_t,
*************** operator!=(const TinyMatrix<DR1,DC1,T1,E
*** 1282,1288 ****
--- 1285,1293 ----
  #ifdef PETE_ALLOW_SCALAR_SHIFT
  #endif // PETE_ALLOW_SCALAR_SHIFT
  
+ 
  #undef MakeReturn
+ 
  
  #endif // POOMA_POOMA_VECTORFIELDOPERATORS_H
  
Index: Pooma/PETE/PoomaClass.in
===================================================================
RCS file: /home/pooma/Repository/r2/src/Pooma/PETE/PoomaClass.in,v
retrieving revision 1.2
diff -c -p -r1.2 PoomaClass.in
*** Pooma/PETE/PoomaClass.in	1999/01/08 00:36:44	1.2
--- Pooma/PETE/PoomaClass.in	2001/09/12 01:04:28
*************** classes
*** 2,9 ****
  -----
    ARG   = "int D[n],class T[n],class E[n]"
    CLASS = "Array<D[n],T[n],E[n]>"
- -----
-   ARG   = "int D[n],class T[n],class E[n]"
-   CLASS = "ConstArray<D[n],T[n],E[n]>"
  
  
--- 2,6 ----
Index: Pooma/PETE/PoomaDynamicArray.in
===================================================================
RCS file: /home/pooma/Repository/r2/src/Pooma/PETE/PoomaDynamicArray.in,v
retrieving revision 1.1
diff -c -p -r1.1 PoomaDynamicArray.in
*** Pooma/PETE/PoomaDynamicArray.in	1999/03/24 03:49:39	1.1
--- Pooma/PETE/PoomaDynamicArray.in	2001/09/12 01:04:28
*************** classes
*** 2,10 ****
  -----
    ARG   = "int D[n],class T[n],class E[n]"
    CLASS = "Array<D[n],T[n],E[n]>"
- -----
-   ARG   = "int D[n],class T[n],class E[n]"
-   CLASS = "ConstArray<D[n],T[n],E[n]>"
  
  extraClasses
  -----
--- 2,7 ----
Index: Pooma/PETE/PoomaField.in
===================================================================
RCS file: /home/pooma/Repository/r2/src/Pooma/PETE/PoomaField.in,v
retrieving revision 1.1
diff -c -p -r1.1 PoomaField.in
*** Pooma/PETE/PoomaField.in	1999/06/29 00:06:33	1.1
--- Pooma/PETE/PoomaField.in	2001/09/12 01:04:28
***************
*** 1,15 ****
  classes
  -----
    ARG   = "class G[n],class T[n],class E[n]"
    CLASS = "Field<G[n],T[n],E[n]>"
- -----
-   ARG   = "class G[n],class T[n],class E[n]"
-   CLASS = "ConstField<G[n],T[n],E[n]>"
  
  scalars
  -----
    ARG   = "int D[n],class T[n],class E[n]"
    CLASS = "Array<D[n],T[n],E[n]>"
- -----
-   ARG   = "int D[n],class T[n],class E[n]"
-   CLASS = "ConstArray<D[n],T[n],E[n]>"
--- 1,24 ----
+ prefix
+ -----
+ TEXT = "
+ template<class G, class T, class E> class Field;
+ 
+ #undef MakeReturn
+ #define MakeReturn MakeFieldReturn
+ "
+ 
+ suffix
+ -----
+ TEXT = "
+ #undef MakeReturn
+ "
+ 
  classes
  -----
    ARG   = "class G[n],class T[n],class E[n]"
    CLASS = "Field<G[n],T[n],E[n]>"
  
  scalars
  -----
    ARG   = "int D[n],class T[n],class E[n]"
    CLASS = "Array<D[n],T[n],E[n]>"
Index: Pooma/PETE/PoomaFieldVector.in
===================================================================
RCS file: /home/pooma/Repository/r2/src/Pooma/PETE/PoomaFieldVector.in,v
retrieving revision 1.3
diff -c -p -r1.3 PoomaFieldVector.in
*** Pooma/PETE/PoomaFieldVector.in	1999/08/20 00:58:29	1.3
--- Pooma/PETE/PoomaFieldVector.in	2001/09/12 01:04:28
***************
*** 1,10 ****
  classes
  -----
    ARG   = "class G[n],class T[n],class E[n]"
    CLASS = "Field<G[n],T[n],E[n]>"
- -----
-   ARG   = "class G[n],class T[n],class E[n]"
-   CLASS = "ConstField<G[n],T[n],E[n]>"
  
  scalars
  -----
--- 1,22 ----
+ prefix
+ -----
+ TEXT = "
+ template<class G, class T, class E> class Field;
+ 
+ #undef MakeReturn
+ #define MakeReturn MakeFieldReturn
+ "
+ 
+ suffix
+ -----
+ TEXT = "
+ #undef MakeReturn
+ "
+ 
  classes
  -----
    ARG   = "class G[n],class T[n],class E[n]"
    CLASS = "Field<G[n],T[n],E[n]>"
  
  scalars
  -----
Index: Pooma/PETE/PoomaNewField.in
===================================================================
RCS file: PoomaNewField.in
diff -N PoomaNewField.in
*** /tmp/cvsXQQdza	Tue Sep 11 19:04:30 2001
--- /dev/null	Tue May  5 14:32:27 1998
***************
*** 1,27 ****
- prefix
- -----
- TEXT = "
- template<class G, class T, class E> class Field;
- 
- #undef MakeReturn
- #define MakeReturn MakeFieldReturn
- "
- 
- suffix
- -----
- TEXT = "
- #undef MakeReturn"
- "
- 
- classes
- -----
-   ARG   = "class G[n],class T[n],class E[n]"
-   CLASS = "Field<G[n],T[n],E[n]>"
- 
- scalars
- -----
-   ARG   = "int D[n],class T[n],class E[n]"
-   CLASS = "Array<D[n],T[n],E[n]>"
- -----
-   ARG   = "int D[n],class T[n],class E[n]"
-   CLASS = "ConstArray<D[n],T[n],E[n]>"
--- 0 ----
Index: Pooma/PETE/PoomaNewFieldVector.in
===================================================================
RCS file: PoomaNewFieldVector.in
diff -N PoomaNewFieldVector.in
*** /tmp/cvsmjP50n	Tue Sep 11 19:04:30 2001
--- /dev/null	Tue May  5 14:32:27 1998
***************
*** 1,30 ****
- prefix
- -----
- TEXT = "
- template<class G, class T, class E> class Field;
- 
- #undef MakeReturn
- #define MakeReturn MakeFieldReturn
- "
- 
- suffix
- -----
- TEXT = "
- #undef MakeReturn"
- "
- 
- classes
- -----
-   ARG   = "class G[n],class T[n],class E[n]"
-   CLASS = "Field<G[n],T[n],E[n]>"
- 
- scalars
- -----
-   ARG   = "int D[n],class T[n],class E[n]"
-   CLASS = "Vector<D[n],T[n],E[n]>"
- -----
-   ARG   = "int D[n],class T[n],class E[n]"
-   CLASS = "Tensor<D[n],T[n],E[n]>"
- -----
-   ARG   = "int DR[n],int DC[n],class T[n],class E[n]"
-   CLASS = "TinyMatrix<DR[n],DC[n],T[n],E[n]>"
--- 0 ----
Index: Pooma/PETE/PoomaOps.in
===================================================================
RCS file: /home/pooma/Repository/r2/src/Pooma/PETE/PoomaOps.in,v
retrieving revision 1.8
diff -c -p -r1.8 PoomaOps.in
*** Pooma/PETE/PoomaOps.in	2001/03/28 19:14:51	1.8
--- Pooma/PETE/PoomaOps.in	2001/09/12 01:04:28
*************** unarySpecialOps
*** 21,27 ****
  -----
    TAG      = "FnAbs"
    FUNCTION = "abs"
!   EXPR     = "return (abs(a));"
  -----
    TAG      = "FnArg"
    FUNCTION = "arg"
--- 21,27 ----
  -----
    TAG      = "FnAbs"
    FUNCTION = "abs"
!   EXPR     = "return (std::abs(a));"
  -----
    TAG      = "FnArg"
    FUNCTION = "arg"
Index: Pooma/PETE/PoomaVectorClass.in
===================================================================
RCS file: /home/pooma/Repository/r2/src/Pooma/PETE/PoomaVectorClass.in,v
retrieving revision 1.4
diff -c -p -r1.4 PoomaVectorClass.in
*** Pooma/PETE/PoomaVectorClass.in	1999/08/20 00:58:29	1.4
--- Pooma/PETE/PoomaVectorClass.in	2001/09/12 01:04:28
*************** classes
*** 2,10 ****
  -----
    ARG   = "int D[n],class T[n],class E[n]"
    CLASS = "Array<D[n],T[n],E[n]>"
- -----
-   ARG   = "int D[n],class T[n],class E[n]"
-   CLASS = "ConstArray<D[n],T[n],E[n]>"
  
  scalars
  -----
--- 2,7 ----


More information about the pooma-dev mailing list