Skip to content
Snippets Groups Projects
Commit 70cbda0d authored by Jan Trávníček's avatar Jan Trávníček
Browse files

improvements in atest

parent 962917d4
No related branches found
No related merge requests found
......@@ -61,8 +61,8 @@
//#define SUBTREE_NAIVE
//#define NAIVE
//#define NONLINEAR_NAIVE
#define TREE_PATTERN_PDA
//#define NONLINEAR_TREE_PATTERN_PDA
//#define TREE_PATTERN_PDA
#define NONLINEAR_TREE_PATTERN_PDA
//#define TREE_PATTERN_MATCHING_PDA
//#define FULL_AND_LINEAR_POSITION_HEAP
//#define NONLINEAR_FULL_AND_LINEAR_POSITION_HEAP
......@@ -374,19 +374,19 @@ auto preprocessSubject ( Subject subject ) {
}
 
template < class Subject >
void testPreprocess ( Subject subject ) {
void testPreprocess ( const Subject & subject ) {
measurements::start("Setup", measurements::Type::MAIN);
 
measurements::start("First", measurements::Type::MAIN);
 
auto res = preprocessSubject ( subject );
preprocessSubject ( subject );
 
measurements::end();
 
for ( unsigned i = 0; i < REPEATS - 1; ++i ) {
measurements::start("Other", measurements::Type::MAIN);
 
auto tmp = preprocessSubject ( subject );
preprocessSubject ( subject );
 
measurements::end();
}
......@@ -585,13 +585,13 @@ int main(int argc, char** argv) {
// unsigned i = 0; {
for ( unsigned i = 0; i < subjects.size ( ); ++ i ) {
testPreprocess ( subjects [ i ] );
auto index = preprocessSubject ( std::move ( subjects [ i ] ) );
// auto index = preprocessSubject ( std::move ( subjects [ i ] ) );
 
// unsigned j = 0; {
for ( unsigned j = 0; j < matchers.size ( ); ++ j ) {
/* for ( unsigned j = 0; j < matchers.size ( ); ++ j ) {
ext::set < unsigned > results = match ( index, matchers [ j ] );
std::clog << "Subject " << i << ", pattern " << j << " finished, results " << results << std::endl;
}
}*/
}
 
measurements::end();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment