sapt::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
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


Detailed Description

Definition at line 13 of file ug_bitext_pstats.h.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

sapt::pstats::pstats ( bool const   track_sids  ) 

Definition at line 13 of file ug_bitext_pstats.cc.

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

sapt::pstats::~pstats (  ) 

Definition at line 20 of file ug_bitext_pstats.cc.


Member Function Documentation

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.

Here is the call graph for this function:

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 (  ) 

Definition at line 30 of file ug_bitext_pstats.cc.

References in_progress, and lock.

void sapt::pstats::release (  ) 

Definition at line 39 of file ug_bitext_pstats.cc.

References in_progress, lock, and ready.

void sapt::pstats::wait (  )  const

Definition at line 87 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 sapt::PhrasePair< Token >::init().

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]

Definition at line 34 of file ug_bitext_pstats.h.

Referenced by pstats().

uint32_t sapt::pstats::ofwd[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 sapt::PhrasePair< Token >::init().

boost::condition_variable sapt::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 sapt::PhrasePair< Token >::init().

Definition at line 30 of file ug_bitext_pstats.h.

Definition at line 38 of file ug_bitext_pstats.h.

Referenced by add().

Definition at line 37 of file ug_bitext_pstats.h.

Referenced by add().


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

Generated on Thu Jul 6 00:34:25 2017 for Moses by  doxygen 1.5.9