/ concept-collection / benchcompress
Sign in
concept-collection / benchcompress
benchcompress / benchcompress / src / benchcompress / algorithms / ans / lpc_reconstruct.cpp
27 lines · 1.2 KBBlameHistoryRaw
1#include "lpc_reconstruct.hpp"
3namespace py = pybind11;
5// Explicit instantiation for int16_t
6py::array_t<int16_t> lpc_reconstruct_int16(py::array_t<float> coeffs,
7 py::array_t<int16_t> initial,
8 py::array_t<int16_t> resid) {
9 return lpc_reconstruct_impl<int16_t>(coeffs, initial, resid);
12// Explicit instantiation for int32_t
13py::array_t<int32_t> lpc_reconstruct_int32(py::array_t<float> coeffs,
14 py::array_t<int32_t> initial,
15 py::array_t<int32_t> resid) {
16 return lpc_reconstruct_impl<int32_t>(coeffs, initial, resid);
19PYBIND11_MODULE(lpc_reconstruct_cpp_ext, m) {
20 m.doc() = "C++ implementation of lpc_reconstruct using pybind11";
21 m.def("lpc_reconstruct_int16", &lpc_reconstruct_int16,
22 "Reconstruct signal from Markov model parameters and residuals (int16)",
23 py::arg("coeffs"), py::arg("initial"), py::arg("resid"));
24 m.def("lpc_reconstruct_int32", &lpc_reconstruct_int32,
25 "Reconstruct signal from Markov model parameters and residuals (int32)",
26 py::arg("coeffs"), py::arg("initial"), py::arg("resid"));
moveopenescclose