diff options
Diffstat (limited to 'extractor/run_extractor.cc')
-rw-r--r-- | extractor/run_extractor.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/extractor/run_extractor.cc b/extractor/run_extractor.cc index d5ff23b2..aec83e3b 100644 --- a/extractor/run_extractor.cc +++ b/extractor/run_extractor.cc @@ -96,6 +96,9 @@ int main(int argc, char** argv) { return 1; } + int num_threads = vm["threads"].as<int>(); + cout << "Grammar extraction will use " << num_threads << " threads." << endl; + // Reads the parallel corpus. Clock::time_point preprocess_start_time = Clock::now(); cerr << "Reading source and target data..." << endl; @@ -210,8 +213,7 @@ int main(int argc, char** argv) { // Extracts the grammar for each sentence and saves it to a file. vector<string> suffixes(sentences.size()); - #pragma omp parallel for schedule(dynamic) \ - num_threads(vm["threads"].as<int>()) + #pragma omp parallel for schedule(dynamic) num_threads(num_threads) for (size_t i = 0; i < sentences.size(); ++i) { string suffix; int position = sentences[i].find("|||"); |