#include <ug_bitext_pstats.h>
Public Types | |
typedef boost::unordered_map < uint64_t, SPTR< pstats > > | map_t |
typedef Moses::ThreadSafeContainer < uint64_t, SPTR< pstats > , map_t > | cache_t |
typedef std::vector< unsigned char > | alnvec |
typedef boost::unordered_map < uint64_t, jstats > | trg_map_t |
typedef boost::unordered_map < uint32_t, uint32_t > | indoc_map_t |
Public Member Functions | |
pstats (bool const track_sids) | |
~pstats () | |
void | release () |
void | register_worker () |
size_t | count_workers () |
size_t | add (uint64_t const pid, float const w, float const b, alnvec const &a, uint32_t const cnt2, uint32_t fwd_o, uint32_t bwd_o, int const docid, uint32_t const sid) |
void | count_sample (int const docid, size_t const num_pairs, int const po_fwd, int const po_bwd) |
void | wait () const |
Public Attributes | |
boost::mutex | lock |
boost::condition_variable | ready |
size_t | raw_cnt |
size_t | sample_cnt |
size_t | good |
size_t | sum_pairs |
size_t | in_progress |
uint32_t | ofwd [LRModel::NONE+1] |
uint32_t | obwd [LRModel::NONE+1] |
indoc_map_t | indoc |
trg_map_t | trg |
bool | track_sids |
Definition at line 13 of file ug_bitext_pstats.h.
typedef std::vector<unsigned char> sapt::pstats::alnvec |
Definition at line 18 of file ug_bitext_pstats.h.
typedef Moses::ThreadSafeContainer<uint64_t, SPTR<pstats>, map_t> sapt::pstats::cache_t |
Definition at line 17 of file ug_bitext_pstats.h.
typedef boost::unordered_map<uint32_t,uint32_t> sapt::pstats::indoc_map_t |
Definition at line 20 of file ug_bitext_pstats.h.
typedef boost::unordered_map<uint64_t, SPTR<pstats> > sapt::pstats::map_t |
Definition at line 16 of file ug_bitext_pstats.h.
typedef boost::unordered_map<uint64_t, jstats> sapt::pstats::trg_map_t |
Definition at line 19 of file ug_bitext_pstats.h.
sapt::pstats::pstats | ( | bool const | track_sids | ) |
sapt::pstats::~pstats | ( | ) |
Definition at line 20 of file ug_bitext_pstats.cc.
size_t sapt::pstats::add | ( | uint64_t const | pid, | |
float const | w, | |||
float const | b, | |||
alnvec const & | a, | |||
uint32_t const | cnt2, | |||
uint32_t | fwd_o, | |||
uint32_t | bwd_o, | |||
int const | docid, | |||
uint32_t const | sid | |||
) |
Definition at line 68 of file ug_bitext_pstats.cc.
References sapt::jstats::add(), good, lock, sapt::jstats::rcnt(), track_sids, trg, and UTIL_THROW.
void sapt::pstats::count_sample | ( | int const | docid, | |
size_t const | num_pairs, | |||
int const | po_fwd, | |||
int const | po_bwd | |||
) |
Definition at line 49 of file ug_bitext_pstats.cc.
size_t sapt::pstats::count_workers | ( | ) | [inline] |
Definition at line 43 of file ug_bitext_pstats.h.
void sapt::pstats::register_worker | ( | ) |
void sapt::pstats::release | ( | ) |
void sapt::pstats::wait | ( | ) | const |
size_t sapt::pstats::good |
Definition at line 29 of file ug_bitext_pstats.h.
Referenced by add(), and sapt::PhrasePair< Token >::init().
size_t sapt::pstats::in_progress |
Definition at line 31 of file ug_bitext_pstats.h.
Referenced by register_worker(), release(), and wait().
Definition at line 36 of file ug_bitext_pstats.h.
boost::mutex sapt::pstats::lock [mutable] |
Definition at line 24 of file ug_bitext_pstats.h.
Referenced by add(), register_worker(), release(), and wait().
uint32_t sapt::pstats::obwd[LRModel::NONE+1] |
uint32_t sapt::pstats::ofwd[LRModel::NONE+1] |
size_t sapt::pstats::raw_cnt |
boost::condition_variable sapt::pstats::ready [mutable] |
size_t sapt::pstats::sample_cnt |
size_t sapt::pstats::sum_pairs |
Definition at line 30 of file ug_bitext_pstats.h.