Moses::bitext::pstats Struct Reference

#include <ug_bitext_pstats.h>

List of all members.

Public Types

typedef boost::unordered_map
< uint64_t, SPTR< pstats > > 
map_t
typedef ThreadSafeContainer
< uint64_t, SPTR< pstats >
, map_t
cache_t
typedef std::vector< unsigned
char > 
alnvec
typedef std::map< uint64_t,
jstats
trg_map_t

Public Member Functions

 pstats ()
 ~pstats ()
void release ()
void register_worker ()
size_t count_workers ()
bool 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)
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 [Moses::LRModel::NONE+1]
uint32_t obwd [Moses::LRModel::NONE+1]
std::map< uint32_t, uint32_t > indoc
trg_map_t trg


Detailed Description

Definition at line 15 of file ug_bitext_pstats.h.


Member Typedef Documentation

typedef std::vector<unsigned char> Moses::bitext::pstats::alnvec

Definition at line 20 of file ug_bitext_pstats.h.

typedef ThreadSafeContainer<uint64_t, SPTR<pstats>, map_t> Moses::bitext::pstats::cache_t

Definition at line 19 of file ug_bitext_pstats.h.

typedef boost::unordered_map<uint64_t, SPTR<pstats> > Moses::bitext::pstats::map_t

Definition at line 18 of file ug_bitext_pstats.h.

typedef std::map<uint64_t, jstats> Moses::bitext::pstats::trg_map_t

Definition at line 38 of file ug_bitext_pstats.h.


Constructor & Destructor Documentation

Moses::bitext::pstats::pstats (  ) 

Definition at line 14 of file ug_bitext_pstats.cc.

References Moses::LRModel::NONE, obwd, and ofwd.

Moses::bitext::pstats::~pstats (  ) 

Definition at line 21 of file ug_bitext_pstats.cc.


Member Function Documentation

bool Moses::bitext::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 
)

Definition at line 69 of file ug_bitext_pstats.cc.

References Moses::bitext::jstats::add(), good, lock, Moses::bitext::jstats::rcnt(), trg, and UTIL_THROW.

Here is the call graph for this function:

void Moses::bitext::pstats::count_sample ( int const   docid,
size_t const   num_pairs,
int const   po_fwd,
int const   po_bwd 
)

Definition at line 50 of file ug_bitext_pstats.cc.

size_t Moses::bitext::pstats::count_workers (  )  [inline]

Definition at line 44 of file ug_bitext_pstats.h.

void Moses::bitext::pstats::register_worker (  ) 

Definition at line 31 of file ug_bitext_pstats.cc.

References in_progress, and lock.

void Moses::bitext::pstats::release (  ) 

Definition at line 40 of file ug_bitext_pstats.cc.

References in_progress, lock, and ready.

void Moses::bitext::pstats::wait (  )  const

Definition at line 88 of file ug_bitext_pstats.cc.

References in_progress, lock, and ready.


Member Data Documentation

Definition at line 29 of file ug_bitext_pstats.h.

Referenced by add(), and Moses::bitext::PhrasePair< Token >::init().

Definition at line 31 of file ug_bitext_pstats.h.

Referenced by register_worker(), release(), and wait().

std::map<uint32_t,uint32_t> Moses::bitext::pstats::indoc

Definition at line 37 of file ug_bitext_pstats.h.

Referenced by show().

boost::mutex Moses::bitext::pstats::lock [mutable]

Definition at line 24 of file ug_bitext_pstats.h.

Referenced by add(), register_worker(), release(), and wait().

uint32_t Moses::bitext::pstats::obwd[Moses::LRModel::NONE+1]

Definition at line 34 of file ug_bitext_pstats.h.

Referenced by pstats().

uint32_t Moses::bitext::pstats::ofwd[Moses::LRModel::NONE+1]

Definition at line 33 of file ug_bitext_pstats.h.

Referenced by pstats().

Definition at line 27 of file ug_bitext_pstats.h.

Referenced by Moses::bitext::PhrasePair< Token >::init().

boost::condition_variable Moses::bitext::pstats::ready [mutable]

Definition at line 25 of file ug_bitext_pstats.h.

Referenced by release(), and wait().

Definition at line 28 of file ug_bitext_pstats.h.

Referenced by Moses::bitext::PhrasePair< Token >::init().

Definition at line 30 of file ug_bitext_pstats.h.

Definition at line 39 of file ug_bitext_pstats.h.

Referenced by add().


The documentation for this struct was generated from the following files:

Generated on Sun Aug 9 00:33:48 2015 for Moses by  doxygen 1.5.9