Inheritance diagram for NormalizerExecStreamGenerator:
Public Member Functions | |
NormalizerExecStreamGenerator (uint nRows, uint nKeys, std::vector< int > repeatSeqValues) | |
virtual int64_t | generateValue (uint iRow, uint iCol) |
Generates one data value. | |
Protected Attributes | |
uint | nKeys |
std::vector< int > | repeatSeqValues |
uint | interval |
boost::shared_array< uint > | changeIndexes |
uint | current |
uint | lastRow |
Definition at line 90 of file LbmNormalizerExecStreamTest.cpp.
NormalizerExecStreamGenerator::NormalizerExecStreamGenerator | ( | uint | nRows, | |
uint | nKeys, | |||
std::vector< int > | repeatSeqValues | |||
) | [inline] |
Definition at line 101 of file LbmNormalizerExecStreamTest.cpp.
References changeIndexes, current, LbmExecStreamTestBase::getTupleInterval(), getValueCount(), interval, and lastRow.
00103 { 00104 this->nKeys = nKeys; 00105 this->repeatSeqValues = repeatSeqValues; 00106 interval = LbmExecStreamTestBase::getTupleInterval(repeatSeqValues); 00107 changeIndexes.reset(new uint[interval]); 00108 changeIndexes[0] = getValueCount(nRows, interval, 0); 00109 for (uint i = 1; i < interval; i++) { 00110 changeIndexes[i] = 00111 changeIndexes[i - 1] + getValueCount(nRows, interval, i); 00112 } 00113 current = 0; 00114 lastRow = 0; 00115 }
virtual int64_t NormalizerExecStreamGenerator::generateValue | ( | uint | iRow, | |
uint | iCol | |||
) | [inline, virtual] |
Generates one data value.
iRow | 0-based row number to generate | |
iCol | 0-based col number to generate |
Implements MockProducerExecStreamGenerator.
Definition at line 117 of file LbmNormalizerExecStreamTest.cpp.
References changeIndexes, current, interval, lastRow, nKeys, and repeatSeqValues.
00118 { 00119 // must be generated in order 00120 assert (lastRow <= iRow); 00121 lastRow = iRow; 00122 00123 if (iRow >= changeIndexes[current]) { 00124 current++; 00125 assert (current < interval); 00126 } 00127 assert (iCol < nKeys); 00128 return current % repeatSeqValues[iCol]; 00129 }
uint NormalizerExecStreamGenerator::nKeys [protected] |
std::vector<int> NormalizerExecStreamGenerator::repeatSeqValues [protected] |
uint NormalizerExecStreamGenerator::interval [protected] |
Definition at line 95 of file LbmNormalizerExecStreamTest.cpp.
Referenced by generateValue(), and NormalizerExecStreamGenerator().
boost::shared_array<uint> NormalizerExecStreamGenerator::changeIndexes [protected] |
Definition at line 96 of file LbmNormalizerExecStreamTest.cpp.
Referenced by generateValue(), and NormalizerExecStreamGenerator().
uint NormalizerExecStreamGenerator::current [protected] |
Definition at line 97 of file LbmNormalizerExecStreamTest.cpp.
Referenced by generateValue(), and NormalizerExecStreamGenerator().
uint NormalizerExecStreamGenerator::lastRow [protected] |
Definition at line 98 of file LbmNormalizerExecStreamTest.cpp.
Referenced by generateValue(), and NormalizerExecStreamGenerator().