replicode
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
r_exec::AutoFocusController Class Reference

#include <auto_focus.h>

Inheritance diagram for r_exec::AutoFocusController:
Inheritance graph
Collaboration diagram for r_exec::AutoFocusController:
Collaboration graph

Classes

class  Rating
 

Public Member Functions

 AutoFocusController (r_code::View *view)
 
 ~AutoFocusController ()
 
Codeget_core_object () const
 
void take_input (r_exec::View *input)
 
void reduce (r_exec::View *input)
 
Viewinject_input (View *input)
 
void inject_input (View *input, uint64_t start)
 
void inject_input (View *input, _Fact *abstract_input, BindingMap *bm)
 
void inject_hlps (const std::vector< P< Code > > &hlps) const
 inject in the primary group; models will be injected in the secondary group automatically. More...
 
bool decompile_models () const
 
bool gtpx_on () const
 
bool ptpx_on () const
 
Groupget_primary_group () const
 
void copy_cross_buffer (r_code::list< Input > &destination)
 copy inputs so they can be flagged independently by the tpxs that share the cross buffer More...
 
time_buffer< CInput, CInput::IsInvalidated > & get_cache ()
 
- Public Member Functions inherited from r_exec::Controller
virtual ~Controller ()
 
uint64_t get_tsc ()
 
virtual void invalidate ()
 
bool is_invalidated ()
 
void activate (bool a)
 
bool is_activated () const
 
bool is_alive () const
 
r_code::CodegetObject () const
 
r_exec::ViewgetView () const
 
void _take_input (r_exec::View *input)
 
virtual void gain_activation ()
 
virtual void lose_activation ()
 
void set_view (View *view)
 
void debug (View *input)
 
- Public Member Functions inherited from core::_Object
virtual ~_Object ()
 
void incRef ()
 
virtual void decRef ()
 

Private Types

typedef std::unordered_map< P< _Fact >, P< TPX >, PHash< _Fact > > TPXMap
 
typedef std::unordered_map< P< _Fact >, Rating, PHash< _Fact > > RatingMap
 

Private Member Functions

void notify (_Fact *target, View *input, TPXMap &map)
 
void dispatch_pred_success (_Fact *predicted_f, TPXMap &map)
 
void dispatch (View *input, _Fact *abstract_input, BindingMap *bm, bool &injected, TPXMap &map)
 
void dispatch_no_inject (View *input, _Fact *abstract_input, BindingMap *bm, TPXMap &map)
 
template<class T >
TPXbuild_tpx (_Fact *target, _Fact *pattern, BindingMap *bm, RatingMap &map, Fact *f_imdl, bool wr_enabled)
 
void rate (_Fact *target, bool success, TPXMap &map, RatingMap &ratings)
 

Private Attributes

bool _pass_through
 
bool _ctpx_on
 
bool _gtpx_on
 
bool _ptpx_on
 
bool _trace_injections
 
bool _decompile_models
 
std::vector< Group * > output_groups
 
TPXMap goals
 
TPXMap predictions
 
RatingMap goal_ratings
 
RatingMap prediction_ratings
 
time_buffer< CInput, CInput::IsInvalidatedcache
 
time_buffer< Input, Input::IsInvalidatedcross_buffer
 

Static Private Attributes

static const size_t CacheInitialSize = 128
 
static const size_t CrossBufferInitialSize = 1024
 

Additional Inherited Members

- Protected Member Functions inherited from r_exec::Controller
template<class C >
void __take_input (r_exec::View *input)
 
 Controller (r_code::View *view)
 
- Protected Member Functions inherited from core::_Object
 _Object ()
 
- Protected Attributes inherited from r_exec::Controller
volatile uint64_t invalidated
 
volatile uint64_t activated
 
uint64_t tsc
 
r_code::Viewview
 
std::mutex m_reductionMutex
 
- Protected Attributes inherited from core::_Object
std::atomic_int_fast64_t refCount
 

Member Typedef Documentation

typedef std::unordered_map<P<_Fact>, Rating, PHash<_Fact> > r_exec::AutoFocusController::RatingMap
private
typedef std::unordered_map<P<_Fact>, P<TPX>, PHash<_Fact> > r_exec::AutoFocusController::TPXMap
private

Constructor & Destructor Documentation

r_exec::AutoFocusController::AutoFocusController ( r_code::View view)

Here is the call graph for this function:

r_exec::AutoFocusController::~AutoFocusController ( )

Member Function Documentation

template<class T >
TPX* r_exec::AutoFocusController::build_tpx ( _Fact target,
_Fact pattern,
BindingMap bm,
RatingMap map,
Fact f_imdl,
bool  wr_enabled 
)
inlineprivate
void r_exec::AutoFocusController::copy_cross_buffer ( r_code::list< Input > &  destination)

copy inputs so they can be flagged independently by the tpxs that share the cross buffer

Here is the call graph for this function:

Here is the caller graph for this function:

bool r_exec::AutoFocusController::decompile_models ( ) const
inline

Here is the caller graph for this function:

void r_exec::AutoFocusController::dispatch ( View input,
_Fact abstract_input,
BindingMap bm,
bool &  injected,
TPXMap map 
)
inlineprivate

Here is the call graph for this function:

Here is the caller graph for this function:

void r_exec::AutoFocusController::dispatch_no_inject ( View input,
_Fact abstract_input,
BindingMap bm,
TPXMap map 
)
inlineprivate

Here is the caller graph for this function:

void r_exec::AutoFocusController::dispatch_pred_success ( _Fact predicted_f,
TPXMap map 
)
inlineprivate

Here is the caller graph for this function:

time_buffer<CInput, CInput::IsInvalidated>& r_exec::AutoFocusController::get_cache ( )
inline

Here is the caller graph for this function:

Code * r_exec::AutoFocusController::get_core_object ( ) const
virtual

Implements r_exec::Controller.

Here is the call graph for this function:

Group* r_exec::AutoFocusController::get_primary_group ( ) const
inline

Here is the caller graph for this function:

bool r_exec::AutoFocusController::gtpx_on ( ) const
inline

Here is the caller graph for this function:

void r_exec::AutoFocusController::inject_hlps ( const std::vector< P< Code > > &  hlps) const

inject in the primary group; models will be injected in the secondary group automatically.

Here is the call graph for this function:

Here is the caller graph for this function:

View * r_exec::AutoFocusController::inject_input ( View input)
inline

Here is the call graph for this function:

Here is the caller graph for this function:

void r_exec::AutoFocusController::inject_input ( View input,
uint64_t  start 
)
inline

Here is the call graph for this function:

void r_exec::AutoFocusController::inject_input ( View input,
_Fact abstract_input,
BindingMap bm 
)
inline

Here is the call graph for this function:

void r_exec::AutoFocusController::notify ( _Fact target,
View input,
TPXMap map 
)
inlineprivate

Here is the caller graph for this function:

bool r_exec::AutoFocusController::ptpx_on ( ) const
inline

Here is the caller graph for this function:

void r_exec::AutoFocusController::rate ( _Fact target,
bool  success,
TPXMap map,
RatingMap ratings 
)
inlineprivate
void r_exec::AutoFocusController::reduce ( r_exec::View input)

Here is the call graph for this function:

void r_exec::AutoFocusController::take_input ( r_exec::View input)
virtual

Reimplemented from r_exec::Controller.

Here is the call graph for this function:

Member Data Documentation

bool r_exec::AutoFocusController::_ctpx_on
private
bool r_exec::AutoFocusController::_decompile_models
private
bool r_exec::AutoFocusController::_gtpx_on
private
bool r_exec::AutoFocusController::_pass_through
private
bool r_exec::AutoFocusController::_ptpx_on
private
bool r_exec::AutoFocusController::_trace_injections
private
time_buffer<CInput, CInput::IsInvalidated> r_exec::AutoFocusController::cache
private
const size_t r_exec::AutoFocusController::CacheInitialSize = 128
staticprivate
time_buffer<Input, Input::IsInvalidated> r_exec::AutoFocusController::cross_buffer
private
const size_t r_exec::AutoFocusController::CrossBufferInitialSize = 1024
staticprivate
RatingMap r_exec::AutoFocusController::goal_ratings
private
TPXMap r_exec::AutoFocusController::goals
private
std::vector<Group *> r_exec::AutoFocusController::output_groups
private
RatingMap r_exec::AutoFocusController::prediction_ratings
private
TPXMap r_exec::AutoFocusController::predictions
private

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