mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-10-26 19:37:58 +03:00
Default number of workers to thread count
(control workers with command line --threads option)
This commit is contained in:
parent
e0fb456dbb
commit
297691db57
@ -188,7 +188,7 @@ namespace Moses
|
||||
|
||||
dflt = pair<string,string>("workers","0");
|
||||
m_workers = atoi(param.insert(dflt).first->second.c_str());
|
||||
if (m_workers == 0) m_workers = boost::thread::hardware_concurrency();
|
||||
if (m_workers == 0) m_workers = StaticData::Instance().ThreadCount();
|
||||
else m_workers = min(m_workers,size_t(boost::thread::hardware_concurrency()));
|
||||
|
||||
dflt = pair<string,string>("bias-loglevel","0");
|
||||
|
Loading…
Reference in New Issue
Block a user