mirror of
https://github.com/davrot/pytutorial.git
synced 2025-06-08 01:00:03 +02:00
Add files via upload
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
parent
98f3657934
commit
0f74e9bb19
5 changed files with 522 additions and 0 deletions
14
PyBind11/basics/PyMyModuleCPU.cpp
Normal file
14
PyBind11/basics/PyMyModuleCPU.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include <pybind11/pybind11.h>
|
||||
#include "MyModuleCPU.h"
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
PYBIND11_MODULE(PyMyModuleCPU, m)
|
||||
{
|
||||
m.doc() = "Example Module";
|
||||
py::class_<MyModule>(m, "MyModule")
|
||||
.def(py::init<>())
|
||||
.def("PutStuffIn", &MyModule::PutStuffIn)
|
||||
.def("DoStuff", &MyModule::DoStuff)
|
||||
.def("GetStuffOut", &MyModule::GetStuffOut);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue