mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-06 19:49:41 +03:00
timer
This commit is contained in:
parent
e58e2fd777
commit
500e967730
@ -47,6 +47,7 @@ import path ;
|
||||
legacy/Range.cpp
|
||||
legacy/SquareMatrix.cpp
|
||||
legacy/ThreadPool.cpp
|
||||
legacy/Timer.cpp
|
||||
legacy/Util2.cpp
|
||||
legacy/ProbingPT/hash.cpp
|
||||
legacy/ProbingPT/huffmanish.cpp
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "legacy/InputFileStream.h"
|
||||
#include "legacy/Parameter.h"
|
||||
#include "legacy/ThreadPool.h"
|
||||
#include "legacy/Timer.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -34,6 +35,8 @@ int main(int argc, char** argv)
|
||||
istream &inStream = GetInputStream(params);
|
||||
|
||||
cerr << "system.numThreads=" << system.numThreads << endl;
|
||||
Timer timer;
|
||||
timer.start();
|
||||
|
||||
ThreadPool pool(system.numThreads);
|
||||
|
||||
@ -51,6 +54,8 @@ int main(int argc, char** argv)
|
||||
delete &inStream;
|
||||
}
|
||||
|
||||
|
||||
cerr << "Decoding took " << timer.get_elapsed_time() << endl;
|
||||
// cerr << "g_numHypos=" << g_numHypos << endl;
|
||||
cerr << "Finished" << endl;
|
||||
}
|
||||
|
@ -100,9 +100,13 @@ void PhraseTableMemory::Load(System &system)
|
||||
|
||||
MemPool tmpPool;
|
||||
vector<string> toks;
|
||||
size_t lineNum = 0;
|
||||
InputFileStream strme(m_path);
|
||||
string line;
|
||||
while (getline(strme, line)) {
|
||||
if (++lineNum % 10000) {
|
||||
cerr << lineNum << " ";
|
||||
}
|
||||
toks.clear();
|
||||
TokenizeMultiCharSeparator(toks, line, "|||");
|
||||
assert(toks.size() >= 3);
|
||||
|
Loading…
Reference in New Issue
Block a user