Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/no-batching
into lp:zorba.
Commit message:
Removed the Batcher class from the runtime (saves 10% off the size of the zorba
library)
Requested reviews:
Markos Zaharioudakis (markos-za)
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/no-batching/+merge/166118
Removed the Batcher class from the runtime (saves 10% off the size of the zorba
library)
--
https://code.launchpad.net/~zorba-coders/zorba/no-batching/+merge/166118
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'include/zorba/config.h.cmake'
--- include/zorba/config.h.cmake 2013-02-07 17:24:36 +
+++ include/zorba/config.h.cmake 2013-05-28 18:20:34 +
@@ -194,8 +194,6 @@
#cmakedefine ZORBA_DEBUG_STRING
// Zorba runtime configuration parameters
-#define ZORBA_BATCHING_TYPE ${ZORBA_BATCHING_TYPE}
-#define ZORBA_BATCHING_BATCHSIZE${ZORBA_BATCHING_BATCHSIZE}
#define ZORBA_FLOAT_POINT_PRECISION ${ZORBA_FLOAT_POINT_PRECISION}
// Zorba threading mechanism
=== modified file 'src/runtime/base/binarybase.h'
--- src/runtime/base/binarybase.h 2013-02-07 17:24:36 +
+++ src/runtime/base/binarybase.h 2013-05-28 18:20:34 +
@@ -31,7 +31,7 @@
data members.
/
template
-class BinaryBaseIterator : public Batcher
+class BinaryBaseIterator : public PlanIterator
{
protected:
PlanIter_t theChild0;
@@ -39,10 +39,10 @@
public:
SERIALIZABLE_ABSTRACT_CLASS(BinaryBaseIterator)
- SERIALIZABLE_CLASS_CONSTRUCTOR2(BinaryBaseIterator, Batcher)
+ SERIALIZABLE_CLASS_CONSTRUCTOR2(BinaryBaseIterator, PlanIterator)
void serialize(::zorba::serialization::Archiver& ar)
{
-serialize_baseclass(ar, (Batcher*)this);
+serialize_baseclass(ar, (PlanIterator*)this);
ar & theChild0;
ar & theChild1;
}
@@ -54,7 +54,7 @@
PlanIter_t& child0,
PlanIter_t& child1)
:
-Batcher(sctx, loc),
+PlanIterator(sctx, loc),
theChild0(child0),
theChild1(child1)
{
=== modified file 'src/runtime/base/narybase.h'
--- src/runtime/base/narybase.h 2013-02-07 17:24:36 +
+++ src/runtime/base/narybase.h 2013-05-28 18:20:34 +
@@ -34,17 +34,17 @@
data members.
/
template
-class NaryBaseIterator : public Batcher
+class NaryBaseIterator : public PlanIterator
{
protected:
std::vector theChildren;
public:
SERIALIZABLE_ABSTRACT_CLASS(NaryBaseIterator)
- SERIALIZABLE_CLASS_CONSTRUCTOR2(NaryBaseIterator, Batcher)
+ SERIALIZABLE_CLASS_CONSTRUCTOR2(NaryBaseIterator, PlanIterator)
void serialize(::zorba::serialization::Archiver& ar)
{
-serialize_baseclass(ar, (Batcher*)this);
+serialize_baseclass(ar, (PlanIterator*)this);
ar & theChildren;
}
@@ -80,18 +80,17 @@
NaryBaseIterator::NaryBaseIterator(
static_context* sctx,
const QueryLoc& loc,
-std::vector& aChildren)
+std::vector& children)
:
- Batcher(sctx, loc),
- theChildren(aChildren)
+ PlanIterator(sctx, loc),
+ theChildren(children)
{
#ifndef NDEBUG
- std::vector::const_iterator lEnd = aChildren.end();
- for(std::vector::const_iterator lIter = aChildren.begin();
- lIter != lEnd;
- ++lIter)
+ std::vector::const_iterator end = children.end();
+ std::vector::const_iterator ite = children.begin();
+ for(; ite != end; ++ite)
{
-assert(*lIter != 0);
+assert(*ite != 0);
}
#endif
}
@@ -114,11 +113,11 @@
{
uint32_t size = 0;
- std::vector::const_iterator lIter = theChildren.begin();
- std::vector::const_iterator lEnd = theChildren.end();
- for (; lIter != lEnd; ++lIter )
+ std::vector::const_iterator ite = theChildren.begin();
+ std::vector::const_iterator end = theChildren.end();
+ for (; ite != end; ++ite)
{
-size += (*lIter)->getStateSizeOfSubtree();
+size += (*ite)->getStateSizeOfSubtree();
}
return this->getStateSize() + size;
@@ -126,47 +125,44 @@
template
-void
-NaryBaseIterator::openImpl(
+void NaryBaseIterator::openImpl(
PlanState& planState,
uint32_t& offset)
{
StateTraitsImpl::createState(planState, this->theStateOffset, offset);
StateTraitsImpl::initState(planState, this->theStateOffset);
- std::vector::iterator lIter = theChildren.begin();
- std::vector::iterator lEnd = theChildren.end();
- for ( ; lIter != lEnd; ++lIter )
+ std::vector::iterator ite = theChildren.begin();
+ std::vector::iterator end = theChildren.end();
+ for (; ite != end; ++ite)
{
-(*lIter)->open(planState, offset);
+(*ite)->open(planState, offset);
}
}
template
-void
-NaryBaseIterator::resetImpl(PlanState& planState) const
+void NaryBaseIterator::resetImpl(PlanState& planState) const
{
StateTraitsImpl::reset(planState, this->theStateOffset);
- std::vector::const_iterator lIter = theChildren.begin();
- std::vector::c