RTC Toolkit  2.0.0
Namespaces | Macros | Functions
vectorPy.cpp File Reference

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

#include "rtctk/componentFramework/vectorPy.hpp"
#include <pybind11/embed.h>
#include <pybind11/numpy.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl_bind.h>
#include <vector>

Namespaces

 rtctk
 
 rtctk::componentFramework
 

Macros

#define VB(TYPE, NAME)
 

Functions

 rtctk::componentFramework::PYBIND11_EMBEDDED_MODULE (Import_Vector_Buffer, m)
 
py::module EXPORT_TYPE rtctk::componentFramework::LoadVectorBufferPyBinds ()
 

Detailed Description

Implementation of the MatrixBuffer template class used in APIs.

Macro Definition Documentation

◆ VB

#define VB (   TYPE,
  NAME 
)
Value:
py::class_<std::vector<TYPE>>(m, NAME, py::buffer_protocol()) \
.def_buffer([](std::vector<TYPE> &m) -> py::buffer_info { \
return py::buffer_info(m.data(), \
sizeof(TYPE), \
py::format_descriptor<TYPE>::format(), \
1, \
{m.size()}, \
{sizeof(TYPE)}); \
});