Loading...
Searching...
No Matches
Macros
python_macro.h File Reference

Shorthand definitions for a python modules. More...

#include "util/macro_util.h"
#include "python/py_core.h"
#include "python/py_bsdf.h"

Go to the source code of this file.

Macros

#define BBM_PYTHON_MODULE_NAME   BBM_CALL(_BBM_UCAT, BBM_NAME, BBM_CONFIG)
 concat the BBM_NAME and BBM_CONFIG
 
#define BBM_PYTHON_MODULE   BBM_CALL(PYBIND11_MODULE, BBM_PYTHON_MODULE_NAME, m)
 Create a python module (dynamic library) named BBM_PYTHON_MODULE_NAME.
 
#define BBM_PYTHON_EMBED_MODULE   BBM_CALL(PYBIND11_EMBEDDED_MODULE, BBM_PYTHON_MODULE_NAME, m)
 Create a python module (embedded in the object file) named BBN_PYTHON_MODULE_NAME.
 
#define BBM_PYTHON_CORE   bbm::python::core<bbm::BBM_CONFIG>(m);
 Import the core bbm python functionality.
 

Detailed Description

Shorthand definitions for a python modules.

Expects BBM_NAME and BBM_CONFIG are set. Usage:

#include "bbm.h"
BBM_PYTHON_<EMBED_>MODULE
{
#include "bbm.h"
}
Include all modules and the backbone.
Python support for BBM.
Clears and defines the export macros.
#define BBM_PYTHON_CORE
Import the core bbm python functionality.
Definition: python_macro.h:52

The generated module is named <BBM_NAME>_<BBM_CONFIG>. The difference between BBM_PYTHON_MODULE and BBM_PYTHON_EMBED_MODULE is that the former generates a dynamic library (that can be imported in python) while the latter one embeds the module in the resulting executable.

Macro Definition Documentation

◆ BBM_PYTHON_CORE

#define BBM_PYTHON_CORE   bbm::python::core<bbm::BBM_CONFIG>(m);

Import the core bbm python functionality.

◆ BBM_PYTHON_EMBED_MODULE

#define BBM_PYTHON_EMBED_MODULE   BBM_CALL(PYBIND11_EMBEDDED_MODULE, BBM_PYTHON_MODULE_NAME, m)

Create a python module (embedded in the object file) named BBN_PYTHON_MODULE_NAME.

◆ BBM_PYTHON_MODULE

#define BBM_PYTHON_MODULE   BBM_CALL(PYBIND11_MODULE, BBM_PYTHON_MODULE_NAME, m)

Create a python module (dynamic library) named BBM_PYTHON_MODULE_NAME.

◆ BBM_PYTHON_MODULE_NAME

#define BBM_PYTHON_MODULE_NAME   BBM_CALL(_BBM_UCAT, BBM_NAME, BBM_CONFIG)

concat the BBM_NAME and BBM_CONFIG