This commit is contained in:
Hieu Hoang 2015-11-13 16:29:55 +00:00
parent e58e2fd777
commit 500e967730
3 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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);