[PATCH] Fix compile warnings
Richard Guenther
rguenth at tat.physik.uni-tuebingen.de
Tue Dec 17 18:59:26 UTC 2002
The following patch fixes compiler warnings mainly due to missing
typename keywords and misordered initializers. Some unused variables
are removed, too.
Tested on serial powerpc-linux by compiling and running the complete
testsuite.
2002Dec17 Richard Guenther <richard.guenther at uni-tuebingen.de>
* Utilities/algorithms.h: kill unused variable.
Utilities/Benchmark.cmpl.cpp: likewise.
Field/tests/NearestNeighbors.cpp: added missing typenames.
Field/FieldCentering.cmpl.cpp: likewise.
Evaluator/PatchFunction.h: likewise.
Engine/tests/brickviewbase_test2.cpp: likewise.
Engine/tests/brickviewbase_test3.cpp: likewise.
Engine/tests/brickviewbase_test4.cpp: likewise.
Utilities/Inform.cmpl.cpp: re-ordered initializers to
match declaration order.
Layout/SparseTileLayout.cpp: likewise.
Layout/Node.h: likewise.
Layout/LayoutBase.h: likewise.
Layout/DynamicLayout.h: likewise.
Evaluator/SimpleIntersector.h: likewise.
Evaluator/PatchKernel.h: likewise.
Engine/ViewEngine.h: likewise.
Engine/Stencil.h: likewise.
Engine/RemoteDynamicEngine.h: likewise.
Engine/DynamicEngine.cpp: likewise.
Connect/Connector.h: likewise.
diff -Nru a/r2/src/Connect/Connector.h b/r2/src/Connect/Connector.h
--- a/r2/src/Connect/Connector.h Tue Dec 17 19:45:14 2002
+++ b/r2/src/Connect/Connector.h Tue Dec 17 19:45:14 2002
@@ -150,7 +150,7 @@
// and the transfer mode.
ConnectorBase(const char *conname, ConnectionBase &c, int mode)
- : name_m(conname), connection_m(&c), mode_m(mode)
+ : connection_m(&c), name_m(conname), mode_m(mode)
{
PAssert(mode == ConnectionBase::in ||
mode == ConnectionBase::out ||
diff -Nru a/r2/src/Engine/DynamicEngine.cpp b/r2/src/Engine/DynamicEngine.cpp
--- a/r2/src/Engine/DynamicEngine.cpp Tue Dec 17 19:45:14 2002
+++ b/r2/src/Engine/DynamicEngine.cpp Tue Dec 17 19:45:14 2002
@@ -486,8 +486,8 @@
template <class T>
Engine<1,T,DynamicView>::
Engine(const Engine<1,T,Dynamic> &engine, const Interval<1> &dom)
-: data_m(engine.dataBlock(), dom.first() - engine.domain().first()),
- domain_m(Interval<1>(dom.length())),
+: domain_m(Interval<1>(dom.length())),
+ data_m(engine.dataBlock(), dom.first() - engine.domain().first()),
stride_m(1)
{
// The engine's data pointer should be at the beginning.
diff -Nru a/r2/src/Engine/RemoteDynamicEngine.h b/r2/src/Engine/RemoteDynamicEngine.h
--- a/r2/src/Engine/RemoteDynamicEngine.h Tue Dec 17 19:45:14 2002
+++ b/r2/src/Engine/RemoteDynamicEngine.h Tue Dec 17 19:45:14 2002
@@ -616,8 +616,8 @@
Engine<1, T, Remote<Dynamic> >::
Engine(const Engine<1, T, Remote<Dynamic> > &modelEngine)
: owningContext_m(modelEngine.owningContext()),
- domain_m(modelEngine.domain()),
- localEnginePtr_m(modelEngine.localEnginePtr_m)
+ localEnginePtr_m(modelEngine.localEnginePtr_m),
+ domain_m(modelEngine.domain())
{
}
@@ -626,8 +626,8 @@
Engine(const Engine<1, T, Remote<Dynamic> > &modelEngine,
const EngineConstructTag &)
: owningContext_m(modelEngine.owningContext()),
- domain_m(modelEngine.domain()),
- localEnginePtr_m(modelEngine.localEnginePtr_m)
+ localEnginePtr_m(modelEngine.localEnginePtr_m),
+ domain_m(modelEngine.domain())
{
}
diff -Nru a/r2/src/Engine/Stencil.h b/r2/src/Engine/Stencil.h
--- a/r2/src/Engine/Stencil.h Tue Dec 17 19:45:14 2002
+++ b/r2/src/Engine/Stencil.h Tue Dec 17 19:45:14 2002
@@ -779,12 +779,13 @@
enum { dimensions = Intersect::dimensions };
StencilIntersector(const This_t &model)
- : intersector_m(model.intersector_m),
- domain_m(model.domain_m)
+ : domain_m(model.domain_m),
+ intersector_m(model.intersector_m)
{ }
StencilIntersector(const Interval<Dim> &domain, const Intersect &intersect)
- : intersector_m(intersect), domain_m(domain)
+ : domain_m(domain),
+ intersector_m(intersect)
{ }
This_t &operator=(const This_t &model)
diff -Nru a/r2/src/Engine/ViewEngine.h b/r2/src/Engine/ViewEngine.h
--- a/r2/src/Engine/ViewEngine.h Tue Dec 17 19:45:14 2002
+++ b/r2/src/Engine/ViewEngine.h Tue Dec 17 19:45:14 2002
@@ -476,7 +476,7 @@
ViewIntersector(const ViewIndexer<ViewD1, ViewD2> &indexer,
const Intersector<Dim> &model)
- : indexer_m(indexer), pdata_m(model.data())
+ : pdata_m(model.data()), indexer_m(indexer)
{
// We haven't yet implemented the case where the view doesn't have
// the same dimensions as the original expression
diff -Nru a/r2/src/Engine/tests/brickviewbase_test2.cpp b/r2/src/Engine/tests/brickviewbase_test2.cpp
--- a/r2/src/Engine/tests/brickviewbase_test2.cpp Tue Dec 17 19:45:14 2002
+++ b/r2/src/Engine/tests/brickviewbase_test2.cpp Tue Dec 17 19:45:14 2002
@@ -89,7 +89,7 @@
// simply a matter of summing up the offset in a particular
// direction multiplied by the stride in that direction.
- typedef Interval<Dim>::iterator Iterator_t;
+ typedef typename Interval<Dim>::iterator Iterator_t;
Iterator_t ploc = AV.domain().begin();
while (ploc != AV.domain().end())
diff -Nru a/r2/src/Engine/tests/brickviewbase_test3.cpp b/r2/src/Engine/tests/brickviewbase_test3.cpp
--- a/r2/src/Engine/tests/brickviewbase_test3.cpp Tue Dec 17 19:45:14 2002
+++ b/r2/src/Engine/tests/brickviewbase_test3.cpp Tue Dec 17 19:45:14 2002
@@ -89,7 +89,7 @@
// simply a matter of summing up the offset in a particular
// direction multiplied by the stride in that direction.
- typedef Interval<Dim>::iterator Iterator_t;
+ typedef typename Interval<Dim>::iterator Iterator_t;
Iterator_t ploc = AV.domain().begin();
while (ploc != AV.domain().end())
diff -Nru a/r2/src/Engine/tests/brickviewbase_test4.cpp b/r2/src/Engine/tests/brickviewbase_test4.cpp
--- a/r2/src/Engine/tests/brickviewbase_test4.cpp Tue Dec 17 19:45:14 2002
+++ b/r2/src/Engine/tests/brickviewbase_test4.cpp Tue Dec 17 19:45:14 2002
@@ -89,7 +89,7 @@
// simply a matter of summing up the offset in a particular
// direction multiplied by the stride in that direction.
- typedef Interval<Dim>::iterator Iterator_t;
+ typedef typename Interval<Dim>::iterator Iterator_t;
Iterator_t ploc = AV.domain().begin();
while (ploc != AV.domain().end())
diff -Nru a/r2/src/Evaluator/PatchFunction.h b/r2/src/Evaluator/PatchFunction.h
--- a/r2/src/Evaluator/PatchFunction.h Tue Dec 17 19:45:14 2002
+++ b/r2/src/Evaluator/PatchFunction.h Tue Dec 17 19:45:14 2002
@@ -298,7 +298,7 @@
expressionApply(a1, IntersectorTag<Inter_t>(inter));
- Inter_t::const_iterator i = inter.begin();
+ typename Inter_t::const_iterator i = inter.begin();
while (i != inter.end())
{
PatchEvaluator<SinglePatchEvaluatorTag>().evaluate(a1(*i),function);
@@ -323,7 +323,7 @@
expressionApply(a1, IntersectorTag<Inter_t>(inter));
expressionApply(a2, IntersectorTag<Inter_t>(inter));
- Inter_t::const_iterator i = inter.begin();
+ typename Inter_t::const_iterator i = inter.begin();
while (i != inter.end())
{
PatchEvaluator<SinglePatchEvaluatorTag>().evaluate2(a1(*i), a2(*i),
@@ -344,7 +344,7 @@
expressionApply(a2, IntersectorTag<Inter_t>(inter));
expressionApply(a3, IntersectorTag<Inter_t>(inter));
- Inter_t::const_iterator i = inter.begin();
+ typename Inter_t::const_iterator i = inter.begin();
while (i != inter.end())
{
PatchEvaluator<SinglePatchEvaluatorTag>().
diff -Nru a/r2/src/Evaluator/PatchKernel.h b/r2/src/Evaluator/PatchKernel.h
--- a/r2/src/Evaluator/PatchKernel.h Tue Dec 17 19:45:14 2002
+++ b/r2/src/Evaluator/PatchKernel.h Tue Dec 17 19:45:14 2002
@@ -70,7 +70,7 @@
public:
PatchKernel(const A1& a1, const Function& function, bool write = true)
: Pooma::Iterate_t(Pooma::scheduler()),
- a1_m(a1), function_m(function), write_m(write)
+ write_m(write), a1_m(a1), function_m(function)
{
DataObjectRequest<BlockAffinity> getAffinity;
hintAffinity(engineFunctor(a1_m.engine(),getAffinity));
@@ -237,8 +237,8 @@
ParticleKernel(const Array& array, const Function& function, int patchID,
bool write1)
: Pooma::Iterate_t(Pooma::scheduler()),
- array_m(array), function_m(function), patchID_m(patchID),
- write1_m(write1)
+ write1_m(write1), array_m(array), function_m(function),
+ patchID_m(patchID)
{
hintAffinity(engineFunctor(array_m.engine(),
DataObjectRequest<BlockAffinity>()));
diff -Nru a/r2/src/Evaluator/SimpleIntersector.h b/r2/src/Evaluator/SimpleIntersector.h
--- a/r2/src/Evaluator/SimpleIntersector.h Tue Dec 17 19:45:14 2002
+++ b/r2/src/Evaluator/SimpleIntersector.h Tue Dec 17 19:45:14 2002
@@ -86,7 +86,7 @@
// Default constructor is trival.
inline SimpleIntersectorData(const Interval<Dim> &domain)
- : domain_m(domain), seenFirst_m(false)
+ : seenFirst_m(false), domain_m(domain)
{
}
diff -Nru a/r2/src/Evaluator/tests/ReductionTest4.cpp b/r2/src/Evaluator/tests/ReductionTest4.cpp
--- a/r2/src/Evaluator/tests/ReductionTest4.cpp Tue Dec 17 19:45:14 2002
+++ b/r2/src/Evaluator/tests/ReductionTest4.cpp Tue Dec 17 19:45:14 2002
@@ -45,8 +45,8 @@
Loc<1> blocks2(2), blocks5(5);
UniformGridPartition<1> partition2(blocks2), partition5(blocks5);
- UniformGridLayout<1> layout2(Interval<1>(10), partition2),
- layout5(Interval<1>(10), partition5);
+ UniformGridLayout<1> layout2(Interval<1>(10), partition2, DistributedTag()),
+ layout5(Interval<1>(10), partition5, DistributedTag());
Array<1, int, MultiPatch<UniformTag, Remote<Brick> > > a(layout2),
b(layout5);
Array<1, int> c(10);
diff -Nru a/r2/src/Field/FieldCentering.cmpl.cpp b/r2/src/Field/FieldCentering.cmpl.cpp
--- a/r2/src/Field/FieldCentering.cmpl.cpp Tue Dec 17 19:45:14 2002
+++ b/r2/src/Field/FieldCentering.cmpl.cpp Tue Dec 17 19:45:14 2002
@@ -40,10 +40,10 @@
CanonicalCentering<Dim>::CanonicalCentering()
{
Centering<Dim> centering;
- Centering<Dim>::Orientation orientation;
- Centering<Dim>::Position position;
- Centering<Dim>::Orientations orientations[Dim][2];
- Centering<Dim>::Positions positions[Dim][2];
+ typename Centering<Dim>::Orientation orientation;
+ typename Centering<Dim>::Position position;
+ typename Centering<Dim>::Orientations orientations[Dim][2];
+ typename Centering<Dim>::Positions positions[Dim][2];
enum { x = 0, y, z };
// Create the tables if necessary.
diff -Nru a/r2/src/Field/tests/NearestNeighbors.cpp b/r2/src/Field/tests/NearestNeighbors.cpp
--- a/r2/src/Field/tests/NearestNeighbors.cpp Tue Dec 17 19:45:14 2002
+++ b/r2/src/Field/tests/NearestNeighbors.cpp Tue Dec 17 19:45:14 2002
@@ -44,7 +44,7 @@
checkForFieldOffset(const FieldOffsetList<Dim> &lst,
const FieldOffset<Dim> &offset)
{
- for (FieldOffsetList<Dim>::size_type index = 0;
+ for (typename FieldOffsetList<Dim>::size_type index = 0;
index < lst.size();
++index)
if (lst[index] == offset)
@@ -124,8 +124,8 @@
const Centering<Dim> &inputCentering,
const Centering<Dim> &outputCentering)
{
- typedef std::vector<FieldOffsetList<Dim> >::size_type nn_size_type;
- typedef FieldOffsetList<Dim>::size_type fol_size_type;
+ typedef typename std::vector<FieldOffsetList<Dim> >::size_type nn_size_type;
+ typedef typename FieldOffsetList<Dim>::size_type fol_size_type;
PInsist(nn.size() == outputCentering.size(),
"Nearest neighbors and output centering must have the same length.");
diff -Nru a/r2/src/Layout/DynamicLayout.h b/r2/src/Layout/DynamicLayout.h
--- a/r2/src/Layout/DynamicLayout.h Tue Dec 17 19:45:14 2002
+++ b/r2/src/Layout/DynamicLayout.h Tue Dec 17 19:45:14 2002
@@ -1402,10 +1402,10 @@
template <class DT>
inline DynamicLayoutViewData(const Layout_t &layout,
const Domain<1, DT> &dom)
- : layout_m(layout),
+ : id_m(Unique::get()),
+ layout_m(layout),
domain_m(dom.unwrap().length()),
- baseDomain_m(dom.unwrap()),
- id_m(Unique::get()),
+ baseDomain_m(dom.unwrap()),
subdomainsComputed_m(false)
{
// The layout passed in must be initialized.
@@ -1420,9 +1420,9 @@
template <class DT>
DynamicLayoutViewData(const ViewLayout_t &layout, const Domain<1, DT> &dom)
- : layout_m(layout.baseLayout()),
+ : id_m(Unique::get()),
+ layout_m(layout.baseLayout()),
domain_m(dom.unwrap().length()),
- id_m(Unique::get()),
subdomainsComputed_m(false)
{
// The layout passed in must be initialized.
diff -Nru a/r2/src/Layout/LayoutBase.h b/r2/src/Layout/LayoutBase.h
--- a/r2/src/Layout/LayoutBase.h Tue Dec 17 19:45:14 2002
+++ b/r2/src/Layout/LayoutBase.h Tue Dec 17 19:45:14 2002
@@ -820,8 +820,8 @@
template <class DT>
LayoutBaseViewData(const L &layout, const SliceDomain<DT> &dom)
- : layout_m(layout), indexer_m(dom),
- id_m(Unique::get()), subdomainsComputed_m(false)
+ : id_m(Unique::get()), layout_m(layout), indexer_m(dom),
+ subdomainsComputed_m(false)
{
// We are a slice and our dimensions must be consistent with us
// and the layout we're being spawned by.
@@ -863,11 +863,12 @@
GuardLayers_t ig,
GuardLayers_t eg)
:
+ id_m(Unique::get()),
layout_m(layout),
- indexer_m(indexer, dom),
- id_m(Unique::get()), subdomainsComputed_m(false),
internalGuards_m(ig),
- externalGuards_m(eg)
+ externalGuards_m(eg),
+ indexer_m(indexer, dom),
+ subdomainsComputed_m(false)
{
// The layout passed in must be initialized.
@@ -886,9 +887,9 @@
const LV &viewLayout,
const Indexer_t indexer,
const SliceDomain<DT> &dom)
- : layout_m(layout),
+ : id_m(Unique::get()), layout_m(layout),
indexer_m(indexer),
- id_m(Unique::get()), subdomainsComputed_m(false)
+ subdomainsComputed_m(false)
{
// Our dimensionality must be the same as the slice's reduced
// dimensionality.
diff -Nru a/r2/src/Layout/Node.h b/r2/src/Layout/Node.h
--- a/r2/src/Layout/Node.h Tue Dec 17 19:45:14 2002
+++ b/r2/src/Layout/Node.h Tue Dec 17 19:45:14 2002
@@ -109,7 +109,7 @@
// The default constructor initializing to empty domains.
Node()
- : context_m(0), global_m(0), local_m(-1), affinity_m(-1)
+ : local_m(-1), global_m(0), context_m(0), affinity_m(-1)
{
}
diff -Nru a/r2/src/Layout/SparseTileLayout.cpp b/r2/src/Layout/SparseTileLayout.cpp
--- a/r2/src/Layout/SparseTileLayout.cpp Tue Dec 17 19:45:14 2002
+++ b/r2/src/Layout/SparseTileLayout.cpp Tue Dec 17 19:45:14 2002
@@ -705,7 +705,6 @@
for( a = dmti.first ;a != dmti.second; ++a)
{
- int globalID = (*a).first;
int nodeListIndex = (*a).second;
outDomain = intersect(a.domain(), fulld);
@@ -760,7 +759,6 @@
for( a = dmti.first ;a != dmti.second; ++a)
{
- int globalID = (*a).first;
int nodeListIndex = (*a).second;
@@ -858,9 +856,8 @@
template<int Dim>
SparseTileLayout<Dim>::SparseTileLayout()
- : Observable<This_t>(*this),
- LayoutBase<Dim,SparseTileLayoutData<Dim> >
- (new LayoutData_t())
+ : LayoutBase<Dim,SparseTileLayoutData<Dim> >(new LayoutData_t()),
+ Observable<This_t>(*this)
{
pdata_m->attach(*this);
}
@@ -869,9 +866,9 @@
SparseTileLayout<Dim>::SparseTileLayout(Domain_t & boundingbox,
const PatchList_t &patchlist,
const ReplicatedTag &)
- : Observable<This_t>(*this),
- LayoutBase<Dim,SparseTileLayoutData<Dim> >
- (new LayoutData_t(boundingbox,patchlist,LocalMapper<Dim>()))
+ : LayoutBase<Dim,SparseTileLayoutData<Dim> >
+ (new LayoutData_t(boundingbox,patchlist,LocalMapper<Dim>())),
+ Observable<This_t>(*this)
{
pdata_m->attach(*this);
}
@@ -880,9 +877,9 @@
SparseTileLayout<Dim>::SparseTileLayout(Domain_t & boundingbox,
const PatchList_t &patchlist,
const DistributedTag &)
- : Observable<This_t>(*this),
- LayoutBase<Dim,SparseTileLayoutData<Dim> >
- (new LayoutData_t(boundingbox,patchlist,DistributedMapper<Dim>()))
+ : LayoutBase<Dim,SparseTileLayoutData<Dim> >
+ (new LayoutData_t(boundingbox,patchlist,DistributedMapper<Dim>())),
+ Observable<This_t>(*this)
{
pdata_m->attach(*this);
}
@@ -891,20 +888,20 @@
const GuardLayers_t & globalGL,
const PatchList_t & patchlist,
const DistributedTag &)
- : Observable<This_t>(*this),
- LayoutBase<Dim,SparseTileLayoutData<Dim> >
- (new LayoutData_t(boundingbox,globalGL,patchlist,DistributedMapper<Dim>()))
+ : LayoutBase<Dim,SparseTileLayoutData<Dim> >
+ (new LayoutData_t(boundingbox,globalGL,patchlist,DistributedMapper<Dim>())),
+ Observable<This_t>(*this)
{
pdata_m->attach(*this);
}
- template<int Dim>
+template<int Dim>
SparseTileLayout<Dim>::SparseTileLayout(const Domain_t &boundingbox,
const GuardLayers_t & globalGL,
const PatchList_t & patchlist,
const ReplicatedTag &)
- : Observable<This_t>(*this),
- LayoutBase<Dim,SparseTileLayoutData<Dim> >
- (new LayoutData_t(boundingbox,globalGL,patchlist,LocalMapper<Dim>()))
+ : LayoutBase<Dim,SparseTileLayoutData<Dim> >
+ (new LayoutData_t(boundingbox,globalGL,patchlist,LocalMapper<Dim>())),
+ Observable<This_t>(*this)
{
pdata_m->attach(*this);
}
@@ -915,13 +912,13 @@
const GuardLayers_t & externalGL,
const PatchList_t & patchlist,
const DistributedTag &)
- : Observable<This_t>(*this),
- LayoutBase<Dim,SparseTileLayoutData<Dim> >
+ : LayoutBase<Dim,SparseTileLayoutData<Dim> >
(new LayoutData_t(boundingbox,
internalGL,
externalGL,
patchlist,
- DistributedMapper<Dim>()))
+ DistributedMapper<Dim>())),
+ Observable<This_t>(*this)
{
pdata_m->attach(*this);
}
@@ -932,22 +929,22 @@
const GuardLayers_t & externalGL,
const PatchList_t & patchlist,
const ReplicatedTag &)
- : Observable<This_t>(*this),
- LayoutBase<Dim,SparseTileLayoutData<Dim> >
+ : LayoutBase<Dim,SparseTileLayoutData<Dim> >
(new LayoutData_t(boundingbox,
internalGL,
externalGL,
patchlist,
- LocalMapper<Dim>()))
+ LocalMapper<Dim>())),
+ Observable<This_t>(*this)
{
pdata_m->attach(*this);
}
template<int Dim>
SparseTileLayout<Dim>::SparseTileLayout(const Domain_t &boundingbox)
- : Observable<This_t>(*this),
- LayoutBase<Dim,SparseTileLayoutData<Dim> >
- (new LayoutData_t(boundingbox))
+ : LayoutBase<Dim,SparseTileLayoutData<Dim> >
+ (new LayoutData_t(boundingbox)),
+ Observable<This_t>(*this)
{
pdata_m->attach(*this);
}
@@ -955,9 +952,9 @@
template<int Dim>
SparseTileLayout<Dim>:: SparseTileLayout(const Domain_t &boundingbox,
const GuardLayers_t & globalGL)
- : Observable<This_t>(*this),
- LayoutBase<Dim,SparseTileLayoutData<Dim> >
- (new LayoutData_t(boundingbox,globalGL))
+ : LayoutBase<Dim,SparseTileLayoutData<Dim> >
+ (new LayoutData_t(boundingbox,globalGL)),
+ Observable<This_t>(*this)
{
pdata_m->attach(*this);
}
@@ -966,9 +963,9 @@
SparseTileLayout<Dim>::SparseTileLayout(const Domain_t &boundingbox,
const GuardLayers_t & internalGL,
const GuardLayers_t & externalGL)
- : Observable<This_t>(*this),
- LayoutBase<Dim,SparseTileLayoutData<Dim> >
- (new LayoutData_t(boundingbox,internalGL,externalGL))
+ : LayoutBase<Dim,SparseTileLayoutData<Dim> >
+ (new LayoutData_t(boundingbox,internalGL,externalGL)),
+ Observable<This_t>(*this)
{
pdata_m->attach(*this);
}
@@ -979,9 +976,9 @@
SparseTileLayout<Dim>::SparseTileLayout(const Domain_t &bbox,
const Partitioner &gpar,
const DistributedTag &)
- : Observable<This_t>(*this),
- LayoutBase<Dim,SparseTileLayoutData<Dim> >
- (new LayoutData_t(bbox, gpar,DistributedMapper<Dim>(gpar)) )
+ : LayoutBase<Dim,SparseTileLayoutData<Dim> >
+ (new LayoutData_t(bbox, gpar,DistributedMapper<Dim>(gpar))),
+ Observable<This_t>(*this)
{
pdata_m->attach(*this);
}
@@ -990,9 +987,9 @@
SparseTileLayout<Dim>::SparseTileLayout(const Domain_t &bbox,
const Partitioner &gpar,
const ReplicatedTag &)
- : Observable<This_t>(*this),
- LayoutBase<Dim,SparseTileLayoutData<Dim> >
- (new LayoutData_t(bbox, gpar,LocalMapper<Dim>()) )
+ : LayoutBase<Dim,SparseTileLayoutData<Dim> >
+ (new LayoutData_t(bbox, gpar,LocalMapper<Dim>())),
+ Observable<This_t>(*this)
{
pdata_m->attach(*this);
}
@@ -1001,8 +998,8 @@
template<int Dim>
SparseTileLayout<Dim>::SparseTileLayout(const This_t &model)
- : Observable<This_t>(*this),
- LayoutBase<Dim,SparseTileLayoutData<Dim> >(model.pdata_m)
+ : LayoutBase<Dim,SparseTileLayoutData<Dim> >(model.pdata_m),
+ Observable<This_t>(*this)
{
pdata_m->attach(*this);
}
diff -Nru a/r2/src/Utilities/Benchmark.cmpl.cpp b/r2/src/Utilities/Benchmark.cmpl.cpp
--- a/r2/src/Utilities/Benchmark.cmpl.cpp Tue Dec 17 19:45:14 2002
+++ b/r2/src/Utilities/Benchmark.cmpl.cpp Tue Dec 17 19:45:14 2002
@@ -317,7 +317,7 @@
Pooma::perr << "Variation " << variation_m << std::endl;
Pooma::perr.setPrefix(" ");
}
- int i = 0, size = impls_m.size();
+ int size = impls_m.size();
for (int i = 0; i < size; ++i)
{
Pooma::perr << i << "\t " << impls_m[i]->type();
diff -Nru a/r2/src/Utilities/Inform.cmpl.cpp b/r2/src/Utilities/Inform.cmpl.cpp
--- a/r2/src/Utilities/Inform.cmpl.cpp Tue Dec 17 19:45:14 2002
+++ b/r2/src/Utilities/Inform.cmpl.cpp Tue Dec 17 19:45:14 2002
@@ -77,14 +77,14 @@
public:
// Constructor which takes the ostream to use and the destination context
InformStream(std::ostream *s, Inform::Context_t oc)
- : stream_m(s), outputContext_m(oc), close_m(false), level_m(0)
+ : stream_m(s), close_m(false), outputContext_m(oc), level_m(0)
{
PAssert(s != 0);
}
// Constructor which takes a filename, and opens a file.
InformStream(const char *fname, int mode, Inform::Context_t oc)
- : stream_m(0), outputContext_m(oc), close_m(true), level_m(0)
+ : stream_m(0), close_m(true), outputContext_m(oc), level_m(0)
{
PAssert(fname != 0);
PAssert(mode == Inform::out || mode == Inform::app);
@@ -239,8 +239,8 @@
//-----------------------------------------------------------------------------
Inform::Inform(const char *prefix, Context_t outputContext)
- : prefix_m(""), level_m(0), message_m(0), nextID_m(0), buffer_m(0),
- outputContext_m(outputContext)
+ : prefix_m(""), outputContext_m(outputContext), level_m(0),
+ message_m(0), buffer_m(0), nextID_m(0)
{
// Create a connection to cout
open(outputContext);
@@ -264,8 +264,8 @@
Inform::Inform(const char *prefix, const char *fname, int writemode,
Context_t outputContext)
- : prefix_m(""), level_m(0), message_m(0), nextID_m(0), buffer_m(0),
- outputContext_m(outputContext)
+ : prefix_m(""), outputContext_m(outputContext), level_m(0),
+ message_m(0), buffer_m(0), nextID_m(0)
{
// Create a connection to the given file
open(fname, writemode, outputContext);
@@ -284,8 +284,8 @@
Inform::Inform(const char *prefix, std::ostream &outstream,
Context_t outputContext)
- : prefix_m(""), level_m(0), message_m(0), nextID_m(0), buffer_m(0),
- outputContext_m(outputContext)
+ : prefix_m(""), outputContext_m(outputContext), level_m(0),
+ message_m(0), buffer_m(0), nextID_m(0)
{
// Create a connection to the given file
open(outstream, outputContext);
diff -Nru a/r2/src/Utilities/Pool.cmpl.cpp b/r2/src/Utilities/Pool.cmpl.cpp
--- a/r2/src/Utilities/Pool.cmpl.cpp Tue Dec 17 19:45:14 2002
+++ b/r2/src/Utilities/Pool.cmpl.cpp Tue Dec 17 19:45:14 2002
@@ -41,14 +41,14 @@
Pool::Pool(size_t sz)
:
+ // The first one. Start out with nothing there.
+ head_m(0),
// The number of outstanding allocs.
outstandingAllocs_m(0),
// The size of each block
bsize_m(roundToAlign(sz)),
// Number of blocks
- nblock_m(blocksInPage(bsize_m)),
- // The first one. Start out with nothing there.
- head_m(0)
+ nblock_m(blocksInPage(bsize_m))
{
}
@@ -60,14 +60,14 @@
Pool::Pool()
:
+ // The first one. Start out with nothing there.
+ head_m(0),
// The number of outstanding allocs.
outstandingAllocs_m(0),
// The size of each block
bsize_m(0),
// Number of blocks
- nblock_m(0),
- // The first one. Start out with nothing there.
- head_m(0)
+ nblock_m(0)
{
}
diff -Nru a/r2/src/Utilities/algorithms.h b/r2/src/Utilities/algorithms.h
--- a/r2/src/Utilities/algorithms.h Tue Dec 17 19:45:14 2002
+++ b/r2/src/Utilities/algorithms.h Tue Dec 17 19:45:14 2002
@@ -144,23 +144,25 @@
typedef typename DataTraits_t::difference_type Diff_t;
#endif
typedef typename DataTraits_t::value_type Value_t;
- const Diff_t len = end - begin;
// Comment out this test for long data block and just use std::copy
// because std::advance does not work correctly with MS header files
// when tmp is not a pointer or a std::iterator type.
+#if 0
+ const Diff_t len = end - begin;
- // if (len < 100)
+ if (len < 100)
return std::copy(begin, end, dest);
- /*
- else
+ else
{
memmove(&(*dest), &(*begin), len*sizeof(Value_t));
It2 tmp(dest);
std::advance(tmp,len);
return tmp;
}
- */
+#else
+ return std::copy(begin, end, dest);
+#endif
}
//-----------------------------------------------------------------------------
More information about the pooma-dev
mailing list