Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
lst-data-process-128
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lst
lst-data-process-128
Commits
7a67c117
Commit
7a67c117
authored
May 18, 2016
by
legoc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
guide
parent
28dabc9e
Pipeline
#335
skipped
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
doc/UsersGuide.md
doc/UsersGuide.md
+10
-1
src/lstdpp128/apps/common/IterativeVectorInsert.cpp
src/lstdpp128/apps/common/IterativeVectorInsert.cpp
+8
-1
No files found.
doc/UsersGuide.md
View file @
7a67c117
...
...
@@ -86,10 +86,19 @@ Read and Process the File
There are two methods to read and process a file:
*
Use a simple reader event by event
*
Use a more advanced
algorithm configured with a method of reading the events.
*
Use a more advanced
processor configured with an algorithm
An example of a simple reader is provided
[
here
](
../src/lstdpp128/apps/common/SimpleReader.cpp
)
.
A more advanced strategy is to use a concept of algorithms used through arrays of events.
The advantage is that it is possible to read a block of events, sort them in time and process them.
It can be very interesting for very large files for which the entire sequence of events cannot reside in RAM.
The programmer defines a processor class and can use it by two read strategy (EventArray or EventBlockArray).
An example of such processor and algorithm is provided
[
here
](
../src/lstdpp128/apps/common/IterativeVectorInsert.cpp
)
.
...
...
src/lstdpp128/apps/common/IterativeVectorInsert.cpp
View file @
7a67c117
...
...
@@ -56,18 +56,25 @@ int main(int argc, char * argv[]) {
cout
<<
"reading "
<<
fileName
<<
", block size "
<<
blockSize
<<
", buffer size "
<<
BUFFER_SIZE
<<
endl
;
// Initialize a reader with a buffer of size 4096.
Reader
reader
(
BUFFER_SIZE
);
// Open the file.
bool
success
=
reader
.
open
(
fileName
);
// Exit in case of error.
if
(
!
success
)
{
return
EXIT_FAILURE
;
}
// Print the context.
cout
<<
listModeContext
<<
endl
;
// algorithm
// Define the algorithm using the class template EventArrayAlgorithm configured with the processor Insert.
//
EventArrayAlgorithm
<
Insert
>
algorithm
;
// Initialize
algorithm
.
processor
().
init
();
// creating the events
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment