mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-07-11 19:31:50 +02:00
naive implementation of 3x3 and 5x5 reduction
This commit is contained in:
@ -104,4 +104,14 @@ void define_ClusterVector(py::module &m, const std::string &typestr) {
|
||||
});
|
||||
}
|
||||
|
||||
void define_reduction(py::module &m) {
|
||||
m.def("reduce_3x3_to_2x2", [](const ClusterVector<Cluster<int, 3, 3, uint16_t>> &cv) {
|
||||
return new ClusterVector<Cluster<int, 2, 2, uint16_t>>(reduce_3x3_to_2x2(cv));
|
||||
// return new ClusterVector<Cluster<int, 3, 3>>();
|
||||
})
|
||||
.def("reduce_5x5_to_3x3", [](const ClusterVector<Cluster<int, 5, 5, uint16_t>> &cv) {
|
||||
return new ClusterVector<Cluster<int, 3, 3, uint16_t>>(reduce_5x5_to_3x3(cv));
|
||||
});
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
@ -81,4 +81,8 @@ PYBIND11_MODULE(_aare, m) {
|
||||
DEFINE_CLUSTER_BINDINGS(int, 9, 9, uint16_t, i);
|
||||
DEFINE_CLUSTER_BINDINGS(double, 9, 9, uint16_t, d);
|
||||
DEFINE_CLUSTER_BINDINGS(float, 9, 9, uint16_t, f);
|
||||
|
||||
|
||||
define_reduction(m);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user