Alexandria  2.27.0
SDC-CH common library for the Euclid project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
Example Class Reference
Inheritance diagram for Example:
Inheritance graph
[legend]
Collaboration diagram for Example:
Collaboration graph
[legend]

Public Member Functions

po::options_description defineSpecificProgramOptions () override
 
void generateGraphviz (Node< double > &node, int nparams)
 
std::map< int, std::pair
< py::object, std::shared_ptr
< Node< double > > > > 
getFunctions ()
 
std::pair< std::vector< double >
, Arguments
createParameters (int n)
 
void runPython (boost::python::object func, const std::vector< double > &args)
 
void runCpp (const std::shared_ptr< Node< double >> &node, const Arguments &args)
 
std::vector< double > measure (std::function< void(void)> func)
 
void evalExamples ()
 
Elements::ExitCode mainMethod (std::map< std::string, po::variable_value > &args) override
 
- Public Member Functions inherited from Elements::Program
virtual ExitCode mainMethod (std::map< std::string, VariableValue > &args)=0
 

Private Attributes

int m_threads
 
int m_repeats
 
fs::path m_dot_file
 

Detailed Description

Main program

Definition at line 60 of file Example.cpp.

Member Function Documentation

std::pair<std::vector<double>, Arguments> Example::createParameters ( int  n)
inline

Definition at line 135 of file Example.cpp.

po::options_description Example::defineSpecificProgramOptions ( )
inlineoverridevirtual

Reimplemented from Elements::Program.

Definition at line 67 of file Example.cpp.

void Example::evalExamples ( )
inline

Definition at line 178 of file Example.cpp.

References std::endl(), std::fixed(), Elements::Logging::info(), logger, runCpp(), runPython(), std::setprecision(), and std::setw().

Here is the call graph for this function:

void Example::generateGraphviz ( Node< double > &  node,
int  nparams 
)
inline

Definition at line 77 of file Example.cpp.

References Elements::Logging::info(), logger, std::to_string(), and Pyston::NodeBase::visit().

Here is the call graph for this function:

std::map<int, std::pair<py::object, std::shared_ptr<Node<double> > > > Example::getFunctions ( )
inline

Extract callables from Python, both Python and "compiled"

Definition at line 94 of file Example.cpp.

References Elements::Logging::info(), logger, and std::make_pair().

Here is the call graph for this function:

Elements::ExitCode Example::mainMethod ( std::map< std::string, po::variable_value > &  args)
inlineoverride

Definition at line 212 of file Example.cpp.

References std::map< K, T >::at(), std::map< K, T >::count(), Elements::OK, PYSTON_MODULE_INIT, and Pyston::ExpressionTreeBuilder::registerFunction().

Here is the call graph for this function:

std::vector<double> Example::measure ( std::function< void(void)>  func)
inline

Definition at line 158 of file Example.cpp.

References std::vector< T >::emplace_back().

Here is the call graph for this function:

void Example::runCpp ( const std::shared_ptr< Node< double >> &  node,
const Arguments args 
)
inline

Definition at line 152 of file Example.cpp.

Referenced by evalExamples().

void Example::runPython ( boost::python::object  func,
const std::vector< double > &  args 
)
inline

Definition at line 145 of file Example.cpp.

Referenced by evalExamples().

Member Data Documentation

fs::path Example::m_dot_file
private

Definition at line 64 of file Example.cpp.

int Example::m_repeats
private

Definition at line 63 of file Example.cpp.

int Example::m_threads
private

Definition at line 63 of file Example.cpp.


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