Patch: Fix Array Layout_t Regressions
Jeffrey Oldham
oldham at codesourcery.com
Fri Sep 14 22:40:33 UTC 2001
Yesterday, src/Array/Array.h was modified using an unannounced patch,
attached for your information. Nightly Pooma regression tests
performed using QMTest showed
src/Array/tests/array_test{19,18,14,23,20,15} subsequently failed.
This patch fixes these regressions by ensuring Layout_t is available
for all Array engine specializations.
2001-09-14 Jeffrey D. Oldham <oldham at codesourcery.com>
* Array/Array.h (class Array): Add Layout_t typedef.
* Engine/IndirectionEngine.h (Engine<...,IndirectionTag>):
Likewise.
* Engine/Stencil.h (Engine<...,StencilEngine>): Likewise.
* Engine/UserFunction.h (Engine<...,UserFunctionEngine>): Fix
spelling mistake in comments. Add Layout_t typedef.
Tested on sequential Linux using gcc3.1 by compiling Pooma library and Array tests
Approved by Stephen Smith
Applied to mainline
Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com
-------------- next part --------------
Index: Array/Array.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Array/Array.h,v
retrieving revision 1.143
diff -c -p -r1.143 Array.h
*** Array/Array.h 2001/09/13 23:22:55 1.143
--- Array/Array.h 2001/09/14 22:37:00
*************** public:
*** 1429,1434 ****
--- 1429,1435 ----
typedef typename Engine_t::Element_t Element_t;
typedef typename Engine_t::ElementRef_t ElementRef_t;
typedef typename Engine_t::Domain_t Domain_t;
+ typedef typename Engine_t::Layout_t Layout_t;
enum { dimensions = Engine_t::dimensions };
enum { rank = Engine_t::dimensions };
Index: Engine/IndirectionEngine.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Engine/IndirectionEngine.h,v
retrieving revision 1.22
diff -c -p -r1.22 IndirectionEngine.h
*** Engine/IndirectionEngine.h 2001/03/28 22:33:15 1.22
--- Engine/IndirectionEngine.h 2001/09/14 22:37:01
*************** public:
*** 85,90 ****
--- 85,91 ----
typedef typename A1::Element_t Element_t;
typedef typename A1::ElementRef_t ElementRef_t;
typedef typename A2::Domain_t Domain_t;
+ typedef DomainLayout<Dim> Layout_t;
typedef typename A1::Engine_t Engine1_t;
typedef typename A2::Engine_t Engine2_t;
Index: Engine/Stencil.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Engine/Stencil.h,v
retrieving revision 1.43
diff -c -p -r1.43 Stencil.h
*** Engine/Stencil.h 2001/07/02 20:11:29 1.43
--- Engine/Stencil.h 2001/09/14 22:37:02
*************** public:
*** 262,267 ****
--- 262,268 ----
typedef Engine<D, T, Tag_t> This_t;
typedef This_t Engine_t;
typedef Interval<D> Domain_t;
+ typedef DomainLayout<D> Layout_t;
typedef T Element_t;
typedef ErrorType ElementRef_t;
typedef typename Expression::Engine_t ExprEngine_t;
Index: Engine/UserFunction.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Engine/UserFunction.h,v
retrieving revision 1.27
diff -c -p -r1.27 UserFunction.h
*** Engine/UserFunction.h 2000/12/12 15:53:23 1.27
--- Engine/UserFunction.h 2001/09/14 22:37:02
*************** struct UserFunctionEngine
*** 120,126 ****
//
// Typedefs for the tag, element types, domain and dimensions.
// Operator() with integers to evaluate elements quickly.
! // Operator() with a doman to subset.
// Accessor for the domain.
//
//-----------------------------------------------------------------------------
--- 120,126 ----
//
// Typedefs for the tag, element types, domain and dimensions.
// Operator() with integers to evaluate elements quickly.
! // Operator() with a domain to subset.
// Accessor for the domain.
//
//-----------------------------------------------------------------------------
*************** public:
*** 138,143 ****
--- 138,144 ----
typedef Engine<D,T,Tag_t> This_t;
typedef This_t Engine_t;
typedef typename Expression::Domain_t Domain_t;
+ typedef typename Expression::Layout_t Layout_t;
typedef T Element_t;
typedef ErrorType ElementRef_t;
typedef typename Expression::Engine_t ExprEngine_t;
-------------- next part --------------
Index: Array.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Array/Array.h,v
retrieving revision 1.142
retrieving revision 1.143
diff -c -p -r1.142 -r1.143
*** Array.h 2001/09/13 20:56:17 1.142
--- Array.h 2001/09/13 23:22:55 1.143
*************** public:
*** 1818,1823 ****
--- 1818,1831 ----
}
//---------------------------------------------------------------------------
+ // Returns the Array's layout.
+
+ inline typename Engine_t::Layout_t layout() const
+ {
+ return engine_m.layout();
+ }
+
+ //---------------------------------------------------------------------------
// View-creation operations. These operator() functions take one or more
// sub-domains, which combine to form a domain with dimensionality identical
// to the rank of the array. Views based on up to 7 subdomains are supported.
*************** struct ElementProperties< Array<Dim, T,
*** 2575,2580 ****
// ACL:rcsinfo
// ----------------------------------------------------------------------
// $RCSfile: Array.h,v $ $Author: haney $
! // $Revision: 1.142 $ $Date: 2001/09/13 20:56:17 $
// ----------------------------------------------------------------------
// ACL:rcsinfo
--- 2583,2588 ----
// ACL:rcsinfo
// ----------------------------------------------------------------------
// $RCSfile: Array.h,v $ $Author: haney $
! // $Revision: 1.143 $ $Date: 2001/09/13 23:22:55 $
// ----------------------------------------------------------------------
// ACL:rcsinfo
More information about the pooma-dev
mailing list