removed sync fill
Build on RHEL9 / build (push) Successful in 2m30s
Build on RHEL8 / build (push) Successful in 3m5s
Run tests using data on local RHEL8 / build (push) Successful in 3m55s

This commit is contained in:
Lars Erik Fröjd
2026-06-01 14:59:57 +02:00
parent 1f78c9f7d1
commit c10bcb8075
8 changed files with 103 additions and 216 deletions
+3 -17
View File
@@ -32,20 +32,6 @@ void define_pixel_histogram_bindings(py::module &m) {
py::arg("xmin"), py::arg("xmax"), py::arg("n_threads") = 1,
py::arg("max_pending") = std::size_t{16})
.def("fill",
[](PixelHistogram &self,
py::array_t<PixelHistogram::AxisType, 0> image) {
auto view = make_view_2d(image);
self.fill(view);
},
R"(
Fill the histogram with image data (blocking).
Args:
image: A 2D numpy array of pixel values (dtype: float32)
)",
py::arg("image").noconvert())
.def("fill_async",
[](PixelHistogram &self,
py::array_t<PixelHistogram::AxisType, 0> image) {
@@ -89,15 +75,15 @@ void define_pixel_histogram_bindings(py::module &m) {
for monitoring/diagnostics.
)")
.def("hdata",
.def("values",
[](const PixelHistogram &self) {
// hdata() implicitly flushes - release the GIL while it
// values() implicitly flushes - release the GIL while it
// does so. Allocation/copy into the NDArray runs without
// the GIL too; only the numpy wrapping needs it.
NDArray<PixelHistogram::StorageType, 3>* ptr = nullptr;
{
py::gil_scoped_release release;
ptr = new NDArray<PixelHistogram::StorageType, 3>(self.hdata());
ptr = new NDArray<PixelHistogram::StorageType, 3>(self.values());
}
return return_image_data(ptr);
},