#include <memory>
#include <pybind11/numpy.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/stl_bind.h>
Go to the source code of this file.
|
struct | CppCommandLine |
| Helper structure to construct C++ command line argc and argv variables from a Python list. More...
|
|
◆ NEKPY_WRAP_ENUM
#define NEKPY_WRAP_ENUM |
( |
|
MOD, |
|
|
|
ENUMNAME, |
|
|
|
MAPNAME |
|
) |
| |
Value: { \
py::enum_<ENUMNAME> tmp(MOD, #ENUMNAME); \
for (
int a = 0; a < (int)
SIZENAME(ENUMNAME); ++a) \
{ \
tmp.value(MAPNAME[a], (ENUMNAME)a); \
} \
tmp.export_values(); \
}
Definition at line 53 of file NekPyConfig.hpp.
◆ NEKPY_WRAP_ENUM_STRING
#define NEKPY_WRAP_ENUM_STRING |
( |
|
MOD, |
|
|
|
ENUMNAME, |
|
|
|
MAPNAME |
|
) |
| |
Value: { \
py::enum_<ENUMNAME> tmp(MOD, #ENUMNAME); \
for (
int a = 0; a < (int)
SIZENAME(ENUMNAME); ++a) \
{ \
tmp.value(MAPNAME[a].c_str(), (ENUMNAME)a); \
} \
tmp.export_values(); \
}
Definition at line 62 of file NekPyConfig.hpp.
◆ NEKPY_WRAP_ENUM_STRING_DOCS
#define NEKPY_WRAP_ENUM_STRING_DOCS |
( |
|
MOD, |
|
|
|
ENUMNAME, |
|
|
|
MAPNAME, |
|
|
|
DOCSTRING |
|
) |
| |
Value: { \
py::enum_<ENUMNAME> tmp(MOD, #ENUMNAME); \
for (
int a = 0; a < (int)
SIZENAME(ENUMNAME); ++a) \
{ \
tmp.value(MAPNAME[a].c_str(), (ENUMNAME)a); \
} \
tmp.export_values(); \
PyTypeObject *pto = reinterpret_cast<PyTypeObject *>(tmp.ptr()); \
PyDict_SetItemString(pto->tp_dict, "__doc__", \
PyUnicode_FromString(DOCSTRING)); \
}
Definition at line 71 of file NekPyConfig.hpp.
◆ PYBIND11_DETAILED_ERROR_MESSAGES
#define PYBIND11_DETAILED_ERROR_MESSAGES |
◆ SIZENAME
#define SIZENAME |
( |
|
s | ) |
SIZE_##s |