ppap4lmp  0.7.2
py_inv_omp.cpp
Go to the documentation of this file.
1 
8 #include "py_inv_omp.h"
9 
10 void pybind::py_inv_omp(py::module &m)
11 {
12  m.def(
13  "execute_omp",
14  py::overload_cast<const ShPtr<Processor> &>(&pybind::execute_omp)
15  );
16 
17  m.def(
18  "execute_omp",
19  py::overload_cast<const Vec<ShPtr<Processor>> &>(&pybind::execute_omp)
20  );
21 
22  py::class_<
24  .def(py::init<>());
25 }
26 
28 {
29  ShPtr<Invoker>(new InvOMP())->execute({proc});
30 }
31 
33 {
34  ShPtr<Invoker>(new InvOMP())->execute(procs);
35 }
void execute_omp(const ShPtr< Processor > &proc)
Create and use an InvOMP object to conduct analysis programmed in a Processor&#39;s subclass object...
Definition: py_inv_omp.cpp:27
InvOMP is an Invoker&#39;s subclass using OpenMP to execute a computationally expensive part of analysis...
Definition: inv_omp.h:32
This file is for binding InvOMP class to Python.
std::vector< T > Vec
Vec is an alias for vector (same as list in Python).
Definition: std.h:27
Invoker executes analysis programmed in one or more Processor objects.
Definition: invoker.h:18
Trampoline class to bind Invoker class and its subclasses to Python.
Definition: py_invoker.h:22
std::shared_ptr< T > ShPtr
ShPtr is an alias for shared pointer.
Definition: std.h:16
void py_inv_omp(py::module &m)
Bind InvOMP class to Python.
Definition: py_inv_omp.cpp:10