Une nouvelle version du portail de gestion des comptes externes sera mise en production lundi 09 août. Elle permettra d'allonger la validité d'un compte externe jusqu'à 3 ans. Pour plus de détails sur cette version consulter : https://doc-si.inria.fr/x/FCeS

Commit 78f12332 authored by Laurent Belcour's avatar Laurent Belcour
Browse files

Updating the python interface to load function plugins.

parent f319c875
...@@ -15,10 +15,14 @@ unix:!macx { ...@@ -15,10 +15,14 @@ unix:!macx {
macx { macx {
exists(/opt/local/bin/gcc-mp-4.9) { exists(/opt/local/bin/gcc-mp-4.9) {
CONFIG += openmp CONFIG += openmp
QMAKE_CXX = /opt/local/bin/gcc-mp-4.9
QMAKE_CXX = /opt/local/bin/gcc-mp-4.9
QMAKE_LINK = /opt/local/bin/gcc-mp-4.9
QMAKE_CXXFLAGS += -fopenmp QMAKE_CXXFLAGS += -fopenmp
LIBS += -L/opt/local/lib/libgcc QMAKE_CXXFLAGS -= -Xarch_x86_64
QMAKE_LFLAGS += -fopenmp QMAKE_LFLAGS += -fopenmp
QMAKE_LFLAGS -= -Xarch_x86_64
LIBS += -L/opt/local/lib/libgcc -lstdc++
} else { } else {
warning("No OpenMP compliant compiler found") warning("No OpenMP compliant compiler found")
} }
......
...@@ -103,12 +103,16 @@ struct Fitter : fitter, bp::wrapper<fitter> { ...@@ -103,12 +103,16 @@ struct Fitter : fitter, bp::wrapper<fitter> {
function* get_function(const std::string& filename) { function* get_function(const std::string& filename) {
return plugins_manager::get_function(filename); return plugins_manager::get_function(filename);
} }
function* get_function_from_args(const arguments& args) {
return plugins_manager::get_function(args);
}
// Exporting the ALTA module // Exporting the ALTA module
BOOST_PYTHON_MODULE(alta) BOOST_PYTHON_MODULE(alta)
{ {
bp::class_<arguments>("arguments") bp::class_<arguments>("arguments")
.def(bp::init<>()); .def(bp::init<>())
.def("update", &arguments::update);
bp::class_<my_vec>("vec") bp::class_<my_vec>("vec")
.def(bp::init<bp::list>()) .def(bp::init<bp::list>())
...@@ -119,9 +123,11 @@ BOOST_PYTHON_MODULE(alta) ...@@ -119,9 +123,11 @@ BOOST_PYTHON_MODULE(alta)
// Function interface // Function interface
bp::def("get_function", get_function, bp::return_value_policy<bp::manage_new_object>()); bp::def("get_function", get_function, bp::return_value_policy<bp::manage_new_object>());
bp::def("get_function", get_function_from_args, bp::return_value_policy<bp::manage_new_object>());
// Data interface // Data interface
bp::class_<Data, ptr<Data>, boost::noncopyable>("data") bp::class_<Data, ptr<Data>, boost::noncopyable>("data")
.def("load", bp::pure_virtual(static_cast< void(data::*)(const std::string&)>(&data::load)))
// .def("load", bp::pure_virtual(&data::load)); // .def("load", bp::pure_virtual(&data::load));
.def("size", bp::pure_virtual(&data::size)); .def("size", bp::pure_virtual(&data::size));
bp::def("get_data", plugins_manager::get_data); bp::def("get_data", plugins_manager::get_data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment