Patch: Add typenames
Jeffrey Oldham
oldham at codesourcery.com
Thu Mar 29 00:42:51 UTC 2001
Add "typename" in appropriate places.
2001-03-28 Jeffrey D. Oldham <oldham at codesourcery.com>
* Domain/DomainRemoveOverlap.h (DomainRemoveOverlap): Add `typename's.
* Engine/RemoteEngine.h (Evaluator::evaluate): Likewise
* Evaluator/Evaluator.h (Evaluate::evaluate): Likewise.
* Evaluator/MultiArgEvaluator.h (MultiArgEvaluator::evaluate):
Likewise.
* Evaluator/Reduction.h (Reduction::evaluate): Likewise.
* Field/Field.cpp (assign): Likewise.
* Field/Field.h (Field::array): Reorder template and `inline'.
(Field::arrayAll): Likewise.
* Layout/GridLayout.cpp (GridLayoutData<Dim>::initialize): Add
`typename's.
* Layout/SparseTileLayout.cpp
(SparseTileLayoutData<Dim>::~SparseTileLayoutData): Likewise.
(SparseTileLayoutData<Dim>::calcMaps): Likewise.
(SparseTileLayoutData<Dim>::calcAllocMaps): Likewise.
(SparseTileLayoutData<Dim>::calcGCFillList): Likewise.
(SparseTileLayoutData<Dim>::touches): Likewise.
(SparseTileLayoutData<Dim>::touchesAlloc): Likewise.
(SparseTileLayoutData<Dim>::print): Likewise.
* Layout/UniformGridLayout.cpp
(UniformGridLayoutData<Dim>::partition): Likewise.
(UniformGridLayoutData<Dim>::initialize): Likewise.
* Partition/BisectionMapper.h (BisectionMapper::map): Likewise.
Tested on sequential Linux using gcc 3.1
Approved by Scott Haney
Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com
-------------- next part --------------
Index: Domain/DomainRemoveOverlap.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Domain/DomainRemoveOverlap.h,v
retrieving revision 1.6
diff -c -p -r1.6 DomainRemoveOverlap.h
*** Domain/DomainRemoveOverlap.h 2000/03/07 13:16:35 1.6
--- Domain/DomainRemoveOverlap.h 2001/03/28 01:59:30
*************** DomainRemoveOverlap(const Interval<Dim>
*** 47,54 ****
for (int i=0;i<Dim;++i)
{
! DomainList_t::iterator start = result.begin();
! DomainList_t::iterator end = result.end();
for ( ; start!=end; ++start)
{
if (touches( (*start)[i], Loc<1>(r[i].min())))
--- 47,54 ----
for (int i=0;i<Dim;++i)
{
! typename DomainList_t::iterator start = result.begin();
! typename DomainList_t::iterator end = result.end();
for ( ; start!=end; ++start)
{
if (touches( (*start)[i], Loc<1>(r[i].min())))
*************** DomainRemoveOverlap(const Interval<Dim>
*** 90,97 ****
temp.clear();
}
! DomainList_t::iterator start = result.begin();
! DomainList_t::iterator end = result.end();
for ( ; start!=end ; ++start)
{
if (!touches(*start,r ) )
--- 90,97 ----
temp.clear();
}
! typename DomainList_t::iterator start = result.begin();
! typename DomainList_t::iterator end = result.end();
for ( ; start!=end ; ++start)
{
if (!touches(*start,r ) )
Index: Engine/RemoteEngine.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Engine/RemoteEngine.h,v
retrieving revision 1.30
diff -c -p -r1.30 RemoteEngine.h
*** Engine/RemoteEngine.h 2000/09/20 16:22:07 1.30
--- Engine/RemoteEngine.h 2001/03/28 01:59:33
*************** struct Evaluator<RemoteMultiPatchEvaluat
*** 1890,1896 ****
expressionApply(lhs, IntersectorTag<Inter_t>(inter));
expressionApply(rhs, IntersectorTag<Inter_t>(inter));
! Inter_t::const_iterator i = inter.begin();
while (i != inter.end())
{
Evaluator<RemoteSinglePatchEvaluatorTag>().
--- 1890,1896 ----
expressionApply(lhs, IntersectorTag<Inter_t>(inter));
expressionApply(rhs, IntersectorTag<Inter_t>(inter));
! typename Inter_t::const_iterator i = inter.begin();
while (i != inter.end())
{
Evaluator<RemoteSinglePatchEvaluatorTag>().
*************** struct Reduction<RemoteMultiPatchEvaluat
*** 2017,2023 ****
std::vector<bool> present(inter.size());
std::vector<int> computationalContext(inter.size());
! Inter_t::const_iterator i = inter.begin();
int j, k, n = 0;
for (j = 0; j < inter.size(); j++)
{
--- 2017,2023 ----
std::vector<bool> present(inter.size());
std::vector<int> computationalContext(inter.size());
! typename Inter_t::const_iterator i = inter.begin();
int j, k, n = 0;
for (j = 0; j < inter.size(); j++)
{
Index: Evaluator/Evaluator.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Evaluator/Evaluator.h,v
retrieving revision 1.56
diff -c -p -r1.56 Evaluator.h
*** Evaluator/Evaluator.h 2000/09/20 16:22:10 1.56
--- Evaluator/Evaluator.h 2001/03/28 01:59:33
*************** struct Evaluator<MultiPatchEvaluatorTag>
*** 201,207 ****
expressionApply(lhs, IntersectorTag<Inter_t>(inter));
expressionApply(rhs, IntersectorTag<Inter_t>(inter));
! Inter_t::const_iterator i = inter.begin();
while (i != inter.end())
{
Evaluator<SinglePatchEvaluatorTag>().evaluate(lhs(*i), op, rhs(*i));
--- 201,207 ----
expressionApply(lhs, IntersectorTag<Inter_t>(inter));
expressionApply(rhs, IntersectorTag<Inter_t>(inter));
! typename Inter_t::const_iterator i = inter.begin();
while (i != inter.end())
{
Evaluator<SinglePatchEvaluatorTag>().evaluate(lhs(*i), op, rhs(*i));
Index: Evaluator/MultiArgEvaluator.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Evaluator/MultiArgEvaluator.h,v
retrieving revision 1.5
diff -c -p -r1.5 MultiArgEvaluator.h
*** Evaluator/MultiArgEvaluator.h 2001/03/04 06:46:48 1.5
--- Evaluator/MultiArgEvaluator.h 2001/03/28 01:59:33
*************** public:
*** 248,254 ****
applyMultiArg(multiArg, inter, info.writers());
! Inter_t::const_iterator i = inter.begin();
while (i != inter.end())
{
INode<Dim> inode = info.extendDomain(*i);
--- 248,254 ----
applyMultiArg(multiArg, inter, info.writers());
! typename Inter_t::const_iterator i = inter.begin();
while (i != inter.end())
{
INode<Dim> inode = info.extendDomain(*i);
*************** struct MultiArgEvaluator<RemoteMultiPatc
*** 349,355 ****
applyMultiArg(multiArg, inter, info.writers());
! Inter_t::const_iterator i = inter.begin();
while (i != inter.end())
{
MultiArgEvaluator<RemoteSinglePatchEvaluatorTag>().
--- 349,355 ----
applyMultiArg(multiArg, inter, info.writers());
! typename Inter_t::const_iterator i = inter.begin();
while (i != inter.end())
{
MultiArgEvaluator<RemoteSinglePatchEvaluatorTag>().
Index: Evaluator/Reduction.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Evaluator/Reduction.h,v
retrieving revision 1.9
diff -c -p -r1.9 Reduction.h
*** Evaluator/Reduction.h 2000/09/20 16:22:10 1.9
--- Evaluator/Reduction.h 2001/03/28 01:59:33
*************** struct Reduction<MultiPatchEvaluatorTag>
*** 222,228 ****
Pooma::scheduler().beginGeneration();
! Inter_t::const_iterator i = inter.begin();
int j = 0;
while (j < n)
{
--- 222,228 ----
Pooma::scheduler().beginGeneration();
! typename Inter_t::const_iterator i = inter.begin();
int j = 0;
while (j < n)
{
Index: Field/Field.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Field/Field.cpp,v
retrieving revision 1.8
diff -c -p -r1.8 Field.cpp
*** Field/Field.cpp 2000/07/20 15:39:27 1.8
--- Field/Field.cpp 2001/03/28 01:59:34
*************** assign(const Field<Geom, T, EngineTag> &
*** 114,120 ****
// if the rhs is an expression.
// This will allow subsequent functors to actually reach the leaves.
! CreateLeaf<ViewedRHS_t>::Leaf_t rhsExpr =
CreateLeaf<ViewedRHS_t>::make(vrhs);
// Optionally, check conformance.
--- 114,120 ----
// if the rhs is an expression.
// This will allow subsequent functors to actually reach the leaves.
! typename CreateLeaf<ViewedRHS_t>::Leaf_t rhsExpr =
CreateLeaf<ViewedRHS_t>::make(vrhs);
// Optionally, check conformance.
*************** assign(const Field<Geom, T, EngineTag> &
*** 175,181 ****
// if the rhs is an expression.
// This will allow subsequent functors to actually reach the leaves.
! CreateLeaf<ViewedRHS_t>::Leaf_t rhsExpr =
CreateLeaf<ViewedRHS_t>::make(vrhs);
// Optionally, check conformance.
--- 175,181 ----
// if the rhs is an expression.
// This will allow subsequent functors to actually reach the leaves.
! typename CreateLeaf<ViewedRHS_t>::Leaf_t rhsExpr =
CreateLeaf<ViewedRHS_t>::make(vrhs);
// Optionally, check conformance.
*************** assign(const Field<Geom, T, EngineTag> &
*** 240,246 ****
// if the rhs is an expression.
// This will allow subsequent functors to actually reach the leaves.
! CreateLeaf<ViewedRHS_t>::Leaf_t rhsExpr =
CreateLeaf<ViewedRHS_t>::make(vrhs);
// Optionally, check conformance.
--- 240,246 ----
// if the rhs is an expression.
// This will allow subsequent functors to actually reach the leaves.
! typename CreateLeaf<ViewedRHS_t>::Leaf_t rhsExpr =
CreateLeaf<ViewedRHS_t>::make(vrhs);
// Optionally, check conformance.
*************** assign(const Array<Dim, T, EngineTag> &l
*** 309,315 ****
// if the rhs is an expression.
// This will allow subsequent functors to actually reach the leaves.
! CreateLeaf<ViewedRHS_t>::Leaf_t rhsExpr =
CreateLeaf<ViewedRHS_t>::make(vrhs);
// Optionally, check conformance.
--- 309,315 ----
// if the rhs is an expression.
// This will allow subsequent functors to actually reach the leaves.
! typename CreateLeaf<ViewedRHS_t>::Leaf_t rhsExpr =
CreateLeaf<ViewedRHS_t>::make(vrhs);
// Optionally, check conformance.
*************** assign(const Array<Dim, T, EngineTag> &l
*** 366,372 ****
// if the rhs is an expression.
// This will allow subsequent functors to actually reach the leaves.
! CreateLeaf<ViewedRHS_t>::Leaf_t rhsExpr =
CreateLeaf<ViewedRHS_t>::make(vrhs);
// Optionally, check conformance.
--- 366,372 ----
// if the rhs is an expression.
// This will allow subsequent functors to actually reach the leaves.
! typename CreateLeaf<ViewedRHS_t>::Leaf_t rhsExpr =
CreateLeaf<ViewedRHS_t>::make(vrhs);
// Optionally, check conformance.
Index: Field/Field.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Field/Field.h,v
retrieving revision 1.68
diff -c -p -r1.68 Field.h
*** Field/Field.h 2000/09/20 16:22:13 1.68
--- Field/Field.h 2001/03/28 01:59:34
*************** public:
*** 1074,1089 ****
//---------------------------------------------------------------------------
// View-creation operations yielding Arrays.
!
typename ArrayView<This_t, Domain_t>::Type_t
! inline array() const
{
typedef ArrayView<This_t, Domain_t> Ret_t;
return Ret_t::make(*this, physicalDomain());
};
typename ArrayView<This_t, Domain_t>::Type_t
! inline arrayAll() const
{
typedef ArrayView<This_t, Domain_t> Ret_t;
return Ret_t::make(*this, totalDomain());
--- 1074,1091 ----
//---------------------------------------------------------------------------
// View-creation operations yielding Arrays.
!
! inline
typename ArrayView<This_t, Domain_t>::Type_t
! array() const
{
typedef ArrayView<This_t, Domain_t> Ret_t;
return Ret_t::make(*this, physicalDomain());
};
+ inline
typename ArrayView<This_t, Domain_t>::Type_t
! arrayAll() const
{
typedef ArrayView<This_t, Domain_t> Ret_t;
return Ret_t::make(*this, totalDomain());
Index: Layout/GridLayout.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Layout/GridLayout.cpp,v
retrieving revision 1.82
diff -c -p -r1.82 GridLayout.cpp
*** Layout/GridLayout.cpp 2000/06/27 01:58:29 1.82
--- Layout/GridLayout.cpp 2001/03/28 01:59:35
*************** inline void GridLayoutData<Dim>::initial
*** 178,185 ****
gpar.partition(innerdomain_m, all_m, cmap);
! List_t::iterator start = all_m.begin();
! List_t::iterator end = all_m.end();
for ( ; start!=end ;++start )
{
--- 178,185 ----
gpar.partition(innerdomain_m, all_m, cmap);
! typename List_t::iterator start = all_m.begin();
! typename List_t::iterator end = all_m.end();
for ( ; start!=end ;++start )
{
*************** void GridLayoutData<Dim>::initialize(con
*** 283,290 ****
// Iterate through the complete list of nodes provided and assign to the
// appropriate subcategories.
! List_t::iterator start = all_m.begin();
! List_t::iterator end = all_m.end();
for ( ; start!=end ;++start )
{
--- 283,290 ----
// Iterate through the complete list of nodes provided and assign to the
// appropriate subcategories.
! typename List_t::iterator start = all_m.begin();
! typename List_t::iterator end = all_m.end();
for ( ; start!=end ;++start )
{
Index: Layout/SparseTileLayout.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Layout/SparseTileLayout.cpp,v
retrieving revision 1.25
diff -c -p -r1.25 SparseTileLayout.cpp
*** Layout/SparseTileLayout.cpp 2000/10/04 04:14:26 1.25
--- Layout/SparseTileLayout.cpp 2001/03/28 01:59:36
*************** SparseTileLayoutData<Dim>::~SparseTileLa
*** 170,177 ****
template<int Dim>
void SparseTileLayoutData<Dim>::syncPatch()
{
! List_t::iterator start = all_m.begin();
! List_t::iterator end = all_m.end();
for ( ; start != end ; ++start)
if ( (*start)->context() == Pooma::context()
||(*start)->context() == -1 )
--- 170,177 ----
template<int Dim>
void SparseTileLayoutData<Dim>::syncPatch()
{
! typename List_t::iterator start = all_m.begin();
! typename List_t::iterator end = all_m.end();
for ( ; start != end ; ++start)
if ( (*start)->context() == Pooma::context()
||(*start)->context() == -1 )
*************** void SparseTileLayoutData<Dim>::calcMaps
*** 202,209 ****
map_m.initialize(domain_m);
! List_t::const_iterator start = all_m.begin();
! List_t::const_iterator end = all_m.end();
int i=0;
for ( ; start != end ; ++start, ++i )
--- 202,209 ----
map_m.initialize(domain_m);
! typename List_t::const_iterator start = all_m.begin();
! typename List_t::const_iterator end = all_m.end();
int i=0;
for ( ; start != end ; ++start, ++i )
*************** void SparseTileLayoutData<Dim>::calcAllo
*** 229,236 ****
mapAloc_m.initialize(domain_m);
! List_t::const_iterator start = all_m.begin();
! List_t::const_iterator end = all_m.end();
int i=0;
--- 229,236 ----
mapAloc_m.initialize(domain_m);
! typename List_t::const_iterator start = all_m.begin();
! typename List_t::const_iterator end = all_m.end();
int i=0;
*************** void SparseTileLayoutData<Dim>::calcGCFi
*** 421,428 ****
TouchList_t tlist;
// first we do the internal overlap regions
! List_t::iterator start = all_m.begin();
! List_t::iterator end = all_m.end();
for ( ; start!=end; ++start)
{
--- 421,428 ----
TouchList_t tlist;
// first we do the internal overlap regions
! typename List_t::iterator start = all_m.begin();
! typename List_t::iterator end = all_m.end();
for ( ; start!=end; ++start)
{
*************** void SparseTileLayoutData<Dim>::calcGCFi
*** 432,439 ****
// now pack the tlist into the GCFillInfo object
// The if test is to remove the self-touch entry
! TouchList_t::iterator GCLstart = tlist.begin();
! TouchList_t::iterator GCLend = tlist.end();
for( ; GCLstart != GCLend ;++GCLstart)
{
--- 432,439 ----
// now pack the tlist into the GCFillInfo object
// The if test is to remove the self-touch entry
! typename TouchList_t::iterator GCLstart = tlist.begin();
! typename TouchList_t::iterator GCLend = tlist.end();
for( ; GCLstart != GCLend ;++GCLstart)
{
*************** void SparseTileLayoutData<Dim>::calcGCFi
*** 508,514 ****
for ( ; gst!=gen ; ++gst )
{
! std::vector<Domain_t>::iterator ts = temp2.begin();
for ( ; ts != temp2.end() ; ++ts )
{
temp3 = DomainRemoveOverlap(*ts,gst->domain_m);
--- 508,514 ----
for ( ; gst!=gen ; ++gst )
{
! typename std::vector<Domain_t>::iterator ts = temp2.begin();
for ( ; ts != temp2.end() ; ++ts )
{
temp3 = DomainRemoveOverlap(*ts,gst->domain_m);
*************** void SparseTileLayoutData<Dim>::calcGCFi
*** 518,524 ****
temp4.clear();
}
! std::vector<Domain_t>::iterator ts = temp2.begin();
for( ; ts != temp2.end(); ++ts)
temp.push_back(GCBorderFillInfo(*ts, bst->patchID() ));
}
--- 518,524 ----
temp4.clear();
}
! typename std::vector<Domain_t>::iterator ts = temp2.begin();
for( ; ts != temp2.end(); ++ts)
temp.push_back(GCBorderFillInfo(*ts, bst->patchID() ));
}
*************** int SparseTileLayoutData<Dim>::touches(c
*** 697,704 ****
typedef Node<OutDomain_t,Domain_t> OutNode_t;
// Ack!!! OutDomain_t is a Range, but DomainMap::touches requires an Interval.
! DomainMap<Interval<Dim>,pidx_t>::Touch_t dmti = map_m.touch(Interval<Dim>(d));
! DomainMap<Interval<Dim>,pidx_t>::touch_iterator a;
int count = 0;
--- 697,705 ----
typedef Node<OutDomain_t,Domain_t> OutNode_t;
// Ack!!! OutDomain_t is a Range, but DomainMap::touches requires an Interval.
! typename DomainMap<Interval<Dim>,pidx_t>::Touch_t dmti =
! map_m.touch(Interval<Dim>(d));
! typename DomainMap<Interval<Dim>,pidx_t>::touch_iterator a;
int count = 0;
*************** int SparseTileLayoutData<Dim>::touchesAl
*** 752,759 ****
typedef Node<OutDomain_t,Domain_t> OutNode_t;
! DomainMap<Interval<Dim>,pidx_t>::Touch_t dmti = map_m.touch(d);
! DomainMap<Interval<Dim>,pidx_t>::touch_iterator a;
int count = 0;
--- 753,760 ----
typedef Node<OutDomain_t,Domain_t> OutNode_t;
! typename DomainMap<Interval<Dim>,pidx_t>::Touch_t dmti = map_m.touch(d);
! typename DomainMap<Interval<Dim>,pidx_t>::touch_iterator a;
int count = 0;
*************** void SparseTileLayoutData<Dim>::print(Ou
*** 791,798 ****
o<< " domain_m " << domain_m <<std::endl;
o<< " innerdomain_m " << innerdomain_m <<std::endl;
o<< " all_m : " << std::endl;
! List_t::const_iterator start = all_m.begin();
! List_t::const_iterator end = all_m.end();
for ( ; start!=end ; ++start)
o<< (*start)->globalID()<<" "<<
(*start)->domain()<<" "<<
--- 792,799 ----
o<< " domain_m " << domain_m <<std::endl;
o<< " innerdomain_m " << innerdomain_m <<std::endl;
o<< " all_m : " << std::endl;
! typename List_t::const_iterator start = all_m.begin();
! typename List_t::const_iterator end = all_m.end();
for ( ; start!=end ; ++start)
o<< (*start)->globalID()<<" "<<
(*start)->domain()<<" "<<
Index: Layout/UniformGridLayout.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Layout/UniformGridLayout.cpp,v
retrieving revision 1.34
diff -c -p -r1.34 UniformGridLayout.cpp
*** Layout/UniformGridLayout.cpp 2000/08/15 17:30:31 1.34
--- Layout/UniformGridLayout.cpp 2001/03/28 01:59:36
*************** void UniformGridLayoutData<Dim>::partiti
*** 155,162 ****
// fill local and remote lists
! List_t::const_iterator start = all_m.begin();
! List_t::const_iterator end = all_m.end();
for ( ; start!=end ; ++start)
{
--- 155,162 ----
// fill local and remote lists
! typename List_t::const_iterator start = all_m.begin();
! typename List_t::const_iterator end = all_m.end();
for ( ; start!=end ; ++start)
{
*************** void UniformGridLayoutData<Dim>::initial
*** 258,265 ****
// Iterate through the complete list of nodes provided and assign to the
// appropriate subcategories.
! List_t::iterator start = all_m.begin();
! List_t::iterator end = all_m.end();
for ( ; start!=end ;++start )
{
--- 258,265 ----
// Iterate through the complete list of nodes provided and assign to the
// appropriate subcategories.
! typename List_t::iterator start = all_m.begin();
! typename List_t::iterator end = all_m.end();
for ( ; start!=end ;++start )
{
Index: Partition/BisectionMapper.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Partition/BisectionMapper.h,v
retrieving revision 1.3
diff -c -p -r1.3 BisectionMapper.h
*** Partition/BisectionMapper.h 2000/06/08 23:07:59 1.3
--- Partition/BisectionMapper.h 2001/03/28 01:59:36
*************** public:
*** 86,94 ****
while ( bvec.size() < ncontexts )
{
int s = 0;
! std::list<Domain_t>::iterator bstart = bvec.begin();
! std::list<Domain_t>::iterator bend = bvec.end();
! std::list<Domain_t>::iterator bpatch;
// find the largest patch.
for ( ; bstart != bend ; ++bstart)
{
--- 86,94 ----
while ( bvec.size() < ncontexts )
{
int s = 0;
! typename std::list<Domain_t>::iterator bstart = bvec.begin();
! typename std::list<Domain_t>::iterator bend = bvec.end();
! typename std::list<Domain_t>::iterator bpatch;
// find the largest patch.
for ( ; bstart != bend ; ++bstart)
{
*************** public:
*** 133,140 ****
for ( int i=1; i<Dim; ++i)
strides[i] = strides[i-1]*blocks_m[i-1].first();
! std::list<Domain_t>::iterator start = bvec.begin();
! std::list<Domain_t>::iterator end = bvec.end();
int pcontext = 0;
for ( ; start != end ; ++start)
{
--- 133,140 ----
for ( int i=1; i<Dim; ++i)
strides[i] = strides[i-1]*blocks_m[i-1].first();
! typename std::list<Domain_t>::iterator start = bvec.begin();
! typename std::list<Domain_t>::iterator end = bvec.end();
int pcontext = 0;
for ( ; start != end ; ++start)
{
More information about the pooma-dev
mailing list