mageec  0.1.0
MAchine Guided Energy Efficient Compilation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | List of all members
mageec::file_ml Class Reference

File based "Machine Learner". More...

#include <mageec-ml.h>

Inheritance diagram for mageec::file_ml:
mageec::mageec_ml

Public Member Functions

virtual int init (std::string dbfilename)
 Initilizes the MAGEEC Machine Learner. More...
 
virtual int init (std::string compiler_version, std::string compiler_target)
 Initilizes the MAGEEC Machine Learner. More...
 
virtual decision make_decision (mageec_pass *pass, std::vector< mageec_feature * > features)
 Make a single function/pass decision based on provided feature vector. More...
 
- Public Member Functions inherited from mageec::mageec_ml
virtual ~mageec_ml ()
 
void new_file (void)
 Prepares Machine Learner for a new file. More...
 
void end_file (void)
 Declares to Machine Learner processing has finished. More...
 
void finish (void)
 Hook for Machine Learner to e.g. More...
 
void provide_features (std::vector< mageec_feature * > features)
 Provide a set of program features to the machine learner to base decisions on. More...
 
std::vector< mageec_passget_passes ()
 Returns a set of passes the machine learner has chosen the compiler to execute. More...
 
std::vector< mageec_pass * > all_passes ()
 Returns complete list of passes known to machine learner for disabling upon initialisation. More...
 
void process_results ()
 Informs the machine learner that it can process all new data to update internal decisions. More...
 
void add_result (std::vector< mageec_feature * > features, std::vector< mageec_pass * > passes, int64_t metric, bool good)
 Adds a result to the machine learner database. More...
 
void add_result (result res)
 Adds a result to the machine learner database. More...
 
void raw_result (std::vector< mageec_feature * > features, std::vector< mageec_pass * > passes, std::vector< int64_t > metrics, bool good)
 Adds a set of result points to machine learner raw database. More...
 

Detailed Description

File based "Machine Learner".

This is a static decision maker that loads a file containing passes to execute. This is intended to be used for generating training data.

Definition at line 150 of file mageec-ml.h.

Member Function Documentation

virtual int mageec::file_ml::init ( std::string  dbfilename)
virtual

Initilizes the MAGEEC Machine Learner.

Parameters
dbfilenamePath of database file to open.
Returns
0 if MAGEEC successfully set up, 1 otherwise.

Reimplemented from mageec::mageec_ml.

virtual int mageec::file_ml::init ( std::string  compiler_version,
std::string  compiler_target 
)
virtual

Initilizes the MAGEEC Machine Learner.

Parameters
compiler_versionCompiler and version, e.g. GCC-4.8.
compiler_targetCompiler target, e.g. arm-none-gnueabi.
Returns
0 if MAGEEC successfully set up, 1 otherwise.

Reimplemented from mageec::mageec_ml.

decision file_ml::make_decision ( mageec_pass pass,
std::vector< mageec_feature * >  features 
)
virtual

Make a single function/pass decision based on provided feature vector.

Parameters
passPass to make a decision about.
featuresFeature vector of function to run pass on.
Returns
decision

Reimplemented from mageec::mageec_ml.

Definition at line 280 of file ml.cpp.


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