diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-04-23 22:34:02 +0100 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-04-23 22:34:02 +0100 |
commit | 65a91daa39cd16971d52bd01330a2b2b470a549e (patch) | |
tree | 1afac56ac2e1876937bee948755f427b156da550 | |
parent | 581ecdbad3c691e4e749098bd8568d9cdc48323c (diff) |
Print num threads used for grammar extraction.
-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("|||"); |