diff options
author | mfederico <mfederico@1f5c12ca-751b-0410-a591-d2e778427230> | 2006-08-16 07:20:44 +0400 |
---|---|---|
committer | mfederico <mfederico@1f5c12ca-751b-0410-a591-d2e778427230> | 2006-08-16 07:20:44 +0400 |
commit | be6b9d8ce586034c3e0f4df700cdda890805d94f (patch) | |
tree | d3b15cbde6436545dd3ecf08de6d4ff5d68e7d10 /irstlm/src/lmtable.h | |
parent | 0aaf45fd98e036c61c4aa32ec5922f055d4019ad (diff) |
Tuning of cache values
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@766 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'irstlm/src/lmtable.h')
-rw-r--r-- | irstlm/src/lmtable.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/irstlm/src/lmtable.h b/irstlm/src/lmtable.h index 7960c766c..15f7e4fa2 100644 --- a/irstlm/src/lmtable.h +++ b/irstlm/src/lmtable.h @@ -185,7 +185,7 @@ public: void init_probcache(){ assert(probcache==NULL); - probcache=new ngramcache(maxlev,sizeof(double),200000); + probcache=new ngramcache(maxlev,sizeof(double),400000); #ifdef TRACE_CACHE cacheout=new std::fstream("/tmp/tracecache",std::ios::out); sentence_id=0; @@ -194,7 +194,7 @@ public: void init_statecache(){ assert(statecache==NULL); - statecache=new ngramcache(maxlev-1,sizeof(char *),100000); + statecache=new ngramcache(maxlev-1,sizeof(char *),200000); } void init_lmtcaches(int uptolev){ @@ -206,10 +206,10 @@ public: } void check_cache_levels(){ - if (probcache && probcache->isfull()) probcache->reset(); - if (statecache && statecache->isfull()) statecache->reset(); + if (probcache && probcache->isfull()) probcache->reset(probcache->cursize()); + if (statecache && statecache->isfull()) statecache->reset(statecache->cursize()); for (int i=2;i<=max_cache_lev;i++) - if (lmtcache[i]->isfull()) lmtcache[i]->reset(); + if (lmtcache[i]->isfull()) lmtcache[i]->reset(lmtcache[i]->cursize()); } bool is_probcache_active(){return probcache!=NULL;} |