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 | 71b68a158a0ca2b5ea738b457b17e3f54b91683b (patch) | |
tree | 46d366ec702454b97ffa2bcc9e7f3987250f1594 /extractor | |
parent | fa96a3665d7d8f8aafd1c8cb46a10ef5aeb4b54e (diff) |
Print num threads used for grammar extraction.
Diffstat (limited to 'extractor')
-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("|||"); |