Commit 970aec43 authored by legoc's avatar legoc

comments

parent 7a67c117
Pipeline #337 skipped
......@@ -71,36 +71,36 @@ int main(int argc, char * argv[]) {
cout << listModeContext << endl;
// Define the algorithm using the class template EventArrayAlgorithm configured with the processor Insert.
//
EventArrayAlgorithm<Insert> algorithm;
// Initialize
// Initialize the Insert processor.
algorithm.processor().init();
// creating the events
// Create the event array with a size (the size is not necessarily twice the size of the read buffer).
EventArray events(blockSize);
int currentPercentage = 0;
// Measure the time for processing.
time_t start = time(0);
time_t t1 = start;
// reading list mode
// Loop until there is no data.
while (true) {
// reading next block
// Read the next buffer.
int32_t size = reader.read();
// exiting if no data
// Exit if the buffer is empty.
if (size == 0) {
break;
}
// processing block
// Process the buffer.
algorithm.process(reader.buffer(), size, events);
}
// Call a terminal function.
algorithm.finish(events);
// Print the results.
time_t t2 = time(0);
cout << "insertion terminated in " << (t2 - t1) << "s" << endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment