From aa031221fac0e107c446319a44b6ec28625cfd3f Mon Sep 17 00:00:00 2001 From: Chris Barnes Date: Wed, 10 Jan 2024 19:05:00 +0000 Subject: [PATCH] rename intersections_many_threaded2 --- python/ncollpyde/_ncollpyde.pyi | 2 +- python/ncollpyde/main.py | 2 +- src/interface.rs | 2 +- tests/test_bench.py | 4 ++-- tests/test_ncollpyde.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python/ncollpyde/_ncollpyde.pyi b/python/ncollpyde/_ncollpyde.pyi index 8c03f41..3fe119f 100644 --- a/python/ncollpyde/_ncollpyde.pyi +++ b/python/ncollpyde/_ncollpyde.pyi @@ -29,7 +29,7 @@ class TriMeshWrapper: def intersections_many( self, src_points: Points, tgt_points: Points ) -> tuple[npt.NDArray[np.uint64], Points, npt.NDArray[np.bool_]]: ... - def intersections_many_threaded2( + def intersections_many_threaded( self, src_points: Points, tgt_points: Points ) -> tuple[npt.NDArray[np.uint64], Points, npt.NDArray[np.bool_]]: ... def sdf_intersections( diff --git a/python/ncollpyde/main.py b/python/ncollpyde/main.py index 74662a3..54efe1e 100644 --- a/python/ncollpyde/main.py +++ b/python/ncollpyde/main.py @@ -350,7 +350,7 @@ def intersections( src, tgt = self._validate_points(src_points, tgt_points) if self._interpret_threads(threads): - return self._impl.intersections_many_threaded2(src, tgt) + return self._impl.intersections_many_threaded(src, tgt) else: return self._impl.intersections_many(src, tgt) diff --git a/src/interface.rs b/src/interface.rs index addc5b2..81d39f8 100644 --- a/src/interface.rs +++ b/src/interface.rs @@ -265,7 +265,7 @@ impl TriMeshWrapper { ) } - pub fn intersections_many_threaded2<'py>( + pub fn intersections_many_threaded<'py>( &self, py: Python<'py>, src_points: PyReadonlyArray2, diff --git a/tests/test_bench.py b/tests/test_bench.py index 3b7deda..2171c34 100644 --- a/tests/test_bench.py +++ b/tests/test_bench.py @@ -266,8 +266,8 @@ def test_ncollpyde_intersection(mesh, benchmark, threads): @pytest.mark.parametrize( ("method_name",), [ - # ("intersections_many_threaded",), - ("intersections_many_threaded2",), + ("intersections_many_threaded",), + # ("intersections_many_threaded2",), ], ) def test_ncollpyde_intersection_impls(mesh, benchmark, method_name): diff --git a/tests/test_ncollpyde.py b/tests/test_ncollpyde.py index c030506..d4b9f3a 100644 --- a/tests/test_ncollpyde.py +++ b/tests/test_ncollpyde.py @@ -344,5 +344,5 @@ def test_intersections_impls(volume: Volume): serial = volume.intersections(starts, stops, threads=False) par = volume.intersections(starts, stops, threads=True) assert_intersection_results(serial, par) - par2 = volume._impl.intersections_many_threaded2(starts, stops) + par2 = volume._impl.intersections_many_threaded(starts, stops) assert_intersection_results(serial, par2)