1#[cfg(feature = "python")]
2use pyo3::prelude::*;
3#[cfg(feature = "python")]
4use pyo3::wrap_pyfunction;
5#[cfg(feature = "python")]
6pub mod monomorphs;
7
8pub mod ragged_buffer;
9
10#[cfg(feature = "python")]
11pub mod ragged_buffer_view;
12
13#[cfg(feature = "python")]
14#[pymodule]
15fn ragged_buffer(_py: Python, m: &PyModule) -> PyResult<()> {
16 m.add_class::<monomorphs::RaggedBufferF32>()?;
18 m.add_class::<monomorphs::RaggedBufferI64>()?;
19 m.add_class::<monomorphs::RaggedBufferBool>()?;
20 m.add_function(wrap_pyfunction!(translate_rotate, m)?)?;
21 Ok(())
22}
23
24#[cfg(feature = "python")]
25#[pyfunction]
26fn translate_rotate(
27 source: &monomorphs::RaggedBufferF32,
28 translation: monomorphs::RaggedBufferF32,
29 rotation: monomorphs::RaggedBufferF32,
30) -> PyResult<()> {
31 ragged_buffer_view::translate_rotate(&source.0, &translation.0, &rotation.0)
32}