Fleet  0.0.9
Inference in the LOT
Public Member Functions | Public Attributes | List of all members
EnumerationInference< HYP, Grammar_t, Enumerator > Class Template Reference

#include <EnumerationInference.h>

Inheritance diagram for EnumerationInference< HYP, Grammar_t, Enumerator >:
Inheritance graph
[legend]
Collaboration diagram for EnumerationInference< HYP, Grammar_t, Enumerator >:
Collaboration graph
[legend]

Public Member Functions

 EnumerationInference (Grammar_t *g, typename HYP::data_t *d)
 
generator< HYP & > run_thread (Control &ctl) override
 
- Public Member Functions inherited from ThreadedInferenceInterface< HYP >
virtual generator< HYP &> run_thread (Control &ctl, Args... args)=0
 
 ThreadedInferenceInterface ()
 
unsigned long next_index ()
 Return the next index to operate on (in a thread-safe way). More...
 
size_t nthreads ()
 How many threads are currently run in this interface? More...
 
void run_thread_generator_wrapper (size_t thr, Control &ctl, Args... args)
 We have to wrap run_thread in something that manages the sync with main. This really just synchronizes the output of run_thread with run below. NOTE this makes a copy of x into the local next_x, so that when the thread keeps running, it doesn't mess anything up. We may in the future block the thread and return a reference, but its not clear that's faster. More...
 
generator< HYP &> run (Control ctl, Args... args)
 Set up the multiple threads and actually run, calling run_thread_generator_wrapper. More...
 
generator< HYP &> unthreaded_run (Control ctl, Args... args)
 

Public Attributes

Grammar_t * grammar
 
HYP::data_t * data
 
- Public Attributes inherited from ThreadedInferenceInterface< HYP >
std::atomic< size_t > index
 
size_t __nthreads
 
std::atomic< size_t > __nrunning
 
ConcurrentQueueRing< HYP > to_yield
 

Detailed Description

template<typename HYP, typename Grammar_t, typename Enumerator>
class EnumerationInference< HYP, Grammar_t, Enumerator >

Author
piantado
Date
09/06/20

Constructor & Destructor Documentation

◆ EnumerationInference()

template<typename HYP , typename Grammar_t , typename Enumerator >
EnumerationInference< HYP, Grammar_t, Enumerator >::EnumerationInference ( Grammar_t *  g,
typename HYP::data_t *  d 
)
inline

Member Function Documentation

◆ run_thread()

template<typename HYP , typename Grammar_t , typename Enumerator >
generator<HYP&> EnumerationInference< HYP, Grammar_t, Enumerator >::run_thread ( Control ctl)
inlineoverride

Member Data Documentation

◆ data

template<typename HYP , typename Grammar_t , typename Enumerator >
HYP::data_t* EnumerationInference< HYP, Grammar_t, Enumerator >::data

◆ grammar

template<typename HYP , typename Grammar_t , typename Enumerator >
Grammar_t* EnumerationInference< HYP, Grammar_t, Enumerator >::grammar

The documentation for this class was generated from the following file: