ModErn Text Analysis
META Enumerates Textual Applications
parallel_test.h
Go to the documentation of this file.
1 
10 #ifndef META_PARALLEL_TEST_H_
11 #define META_PARALLEL_TEST_H_
12 
13 #include <cmath>
14 #include <algorithm>
15 #include <numeric>
16 
17 #include "test/unit_test.h"
18 #include "util/time.h"
19 #include "parallel/parallel_for.h"
20 #include "parallel/thread_pool.h"
21 
22 namespace meta
23 {
24 namespace testing
25 {
26 
27 template <class Type>
28 void hard_func(Type& x);
29 
30 template <class Type>
31 void easy_func(Type& x);
32 
39 int test_speed(std::vector<double>& v);
40 
46 int test_correctness(std::vector<double>& v);
47 
52 int test_threadpool();
53 
58 int parallel_tests();
59 }
60 }
61 
62 #endif
int parallel_tests()
Tests all the parallel functions.
Definition: parallel_test.cpp:81
int test_threadpool()
Tests the threadpool.
Definition: parallel_test.cpp:59
The ModErn Text Analysis toolkit is a suite of natural language processing, classification, information retreival, data mining, and other applications of text processing.
Definition: analyzer.h:24
int test_correctness(std::vector< double > &v)
Checks that each thread touches each index exactly once.
Definition: parallel_test.cpp:47
int test_speed(std::vector< double > &v)
Assumes multi-core machine: tests speed; serial should be slower than parallel.
Definition: parallel_test.cpp:30