RTC Toolkit  1.0.0
Namespaces | Macros | Functions
matrixBufferPy.cpp File Reference

Implementation of the MatrixBuffer template class used in APIs. More...

#include "rtctk/componentFramework/matrixBufferPy.hpp"
#include "rtctk/componentFramework/matrixBuffer.hpp"
#include <pybind11/embed.h>
#include <pybind11/numpy.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl_bind.h>

Namespaces

 rtctk
 
 rtctk::componentFramework
 

Macros

#define MB(TYPE, NAME)
 

Functions

 rtctk::componentFramework::PYBIND11_EMBEDDED_MODULE (Import_Matrix_Buffer, m)
 
py::module EXPORT_TYPE rtctk::componentFramework::LoadMatrixBufferPyBinds ()
 

Detailed Description

Implementation of the MatrixBuffer template class used in APIs.

Macro Definition Documentation

◆ MB

#define MB (   TYPE,
  NAME 
)
Value:
py::class_<MatrixBuffer<TYPE>>(m, NAME, py::buffer_protocol()) \
.def_buffer([](MatrixBuffer<TYPE> &m) -> py::buffer_info { \
return py::buffer_info(m.data(), \
sizeof(TYPE), \
py::format_descriptor<TYPE>::format(), \
2, \
{m.GetNrows(), m.GetNcols()}, \
{sizeof(TYPE) * m.GetNcols(), sizeof(TYPE)}); \
});
rtctk::componentFramework::MatrixBuffer
Definition: matrixBuffer.hpp:22