mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-24 20:32:59 +03:00
Proper indentation with spaces (no tabs).
This commit is contained in:
parent
65bd46df65
commit
64ec34df5d
@ -46,32 +46,32 @@ struct StatsCollector
|
|||||||
if (!lcache) lcache.reset(new lcache_t);
|
if (!lcache) lcache.reset(new lcache_t);
|
||||||
if (m.down())
|
if (m.down())
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (!r.extend(m.getToken(-1)->id())) continue;
|
if (!r.extend(m.getToken(-1)->id())) continue;
|
||||||
this->process(m, r);
|
this->process(m, r);
|
||||||
uint64_t pid = r.getPid();
|
uint64_t pid = r.getPid();
|
||||||
sptr<pstats> stats;
|
sptr<pstats> stats;
|
||||||
if (hcache) stats = hcache->get(pid);
|
if (hcache) stats = hcache->get(pid);
|
||||||
if (!stats && pcache)
|
if (!stats && pcache)
|
||||||
{
|
{
|
||||||
sptr<pstats> const* foo = pcache->get(pid);
|
sptr<pstats> const* foo = pcache->get(pid);
|
||||||
if (foo) stats = *foo;
|
if (foo) stats = *foo;
|
||||||
}
|
}
|
||||||
if (!stats) // need to sample
|
if (!stats) // need to sample
|
||||||
{
|
{
|
||||||
BitextSampler<Token> s(bitext.get(), r, bias, sample_size, method);
|
BitextSampler<Token> s(bitext.get(), r, bias, sample_size, method);
|
||||||
stats = s.stats();
|
stats = s.stats();
|
||||||
if (hcache) hcache->set(pid,stats);
|
if (hcache) hcache->set(pid,stats);
|
||||||
if (pcache && r.ca() >= pcache_th) pcache->set(pid,stats);
|
if (pcache && r.ca() >= pcache_th) pcache->set(pid,stats);
|
||||||
if (tpool) tpool->add(s);
|
if (tpool) tpool->add(s);
|
||||||
else s();
|
else s();
|
||||||
}
|
}
|
||||||
(*lcache)[pid] = stats;
|
(*lcache)[pid] = stats;
|
||||||
r.up();
|
r.up();
|
||||||
}
|
}
|
||||||
while (m.over());
|
while (m.over());
|
||||||
m.up();
|
m.up();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user