From cec6e064a9a5af8d0aa5d137b759c0f4dbbf74a5 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Wed, 16 Oct 2024 11:54:29 +0200 Subject: [PATCH 1/7] Changed parameter name from "bool" to "wait_for_kernel_finish" in the "set_wait_for_kernel_finish" function. --- pyclesperanto/_interroperability.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyclesperanto/_interroperability.py b/pyclesperanto/_interroperability.py index 56b63cef..52076a21 100644 --- a/pyclesperanto/_interroperability.py +++ b/pyclesperanto/_interroperability.py @@ -78,12 +78,12 @@ def affine_transform( ) -def set_wait_for_kernel_finish(bool=True): +def set_wait_for_kernel_finish(wait_for_kernel_finish=True): warnings.warn( "set_wait_for_kernel_finish : This method is deprecated. Consider using wait_for_kernel_to_finish() instead.", DeprecationWarning, ) - wait_for_kernel_to_finish(bool) + wait_for_kernel_to_finish(wait_for_kernel_finish) def clip(a, a_min, a_max, out=None): From c74e798037e0be8aede8aabd5b90180d42ce1d41 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Wed, 16 Oct 2024 13:56:21 +0200 Subject: [PATCH 2/7] Update pyclesperanto/_interroperability.py Co-authored-by: Stephane Rigaud --- pyclesperanto/_interroperability.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyclesperanto/_interroperability.py b/pyclesperanto/_interroperability.py index 52076a21..5b818d18 100644 --- a/pyclesperanto/_interroperability.py +++ b/pyclesperanto/_interroperability.py @@ -78,7 +78,7 @@ def affine_transform( ) -def set_wait_for_kernel_finish(wait_for_kernel_finish=True): +def set_wait_for_kernel_finish(wait: bool =True): warnings.warn( "set_wait_for_kernel_finish : This method is deprecated. Consider using wait_for_kernel_to_finish() instead.", DeprecationWarning, From f7fef1339be7d3618aac817b3fd13c3b07dcd9a9 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Wed, 16 Oct 2024 13:57:10 +0200 Subject: [PATCH 3/7] Update pyclesperanto/_interroperability.py Co-authored-by: Stephane Rigaud --- pyclesperanto/_interroperability.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyclesperanto/_interroperability.py b/pyclesperanto/_interroperability.py index 5b818d18..5b45a446 100644 --- a/pyclesperanto/_interroperability.py +++ b/pyclesperanto/_interroperability.py @@ -83,7 +83,7 @@ def set_wait_for_kernel_finish(wait: bool =True): "set_wait_for_kernel_finish : This method is deprecated. Consider using wait_for_kernel_to_finish() instead.", DeprecationWarning, ) - wait_for_kernel_to_finish(wait_for_kernel_finish) + wait_for_kernel_to_finish(wait) def clip(a, a_min, a_max, out=None): From 478413a58298caa0da134fbf14b311092cc3f91a Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Wed, 16 Oct 2024 13:58:45 +0200 Subject: [PATCH 4/7] I renamed the parameter `bool` to `wait_for_kernel_finish` in the `set_wait_for_kernel_finish` function. --- pyclesperanto/_interroperability.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyclesperanto/_interroperability.py b/pyclesperanto/_interroperability.py index 5b45a446..37d36ebc 100644 --- a/pyclesperanto/_interroperability.py +++ b/pyclesperanto/_interroperability.py @@ -78,12 +78,12 @@ def affine_transform( ) -def set_wait_for_kernel_finish(wait: bool =True): +def set_wait_for_kernel_finish(wait_for_kernel_finish: bool =True): warnings.warn( "set_wait_for_kernel_finish : This method is deprecated. Consider using wait_for_kernel_to_finish() instead.", DeprecationWarning, ) - wait_for_kernel_to_finish(wait) + wait_for_kernel_to_finish(wait_for_kernel_finish) def clip(a, a_min, a_max, out=None): From e8031abbc0c1f46722e88f2627180234b50c8645 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Wed, 16 Oct 2024 13:59:01 +0200 Subject: [PATCH 5/7] Renamed the parameter "flag" to "wait" in the "wait_for_kernel_to_finish" function. --- pyclesperanto/_core.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyclesperanto/_core.py b/pyclesperanto/_core.py index 9af31c85..40f204d5 100644 --- a/pyclesperanto/_core.py +++ b/pyclesperanto/_core.py @@ -126,7 +126,7 @@ def select_backend(backend: str = "opencl") -> str: return f"{BackendManager.get_backend()} selected." -def wait_for_kernel_to_finish(flag: bool = True, device: Device = None): +def wait_for_kernel_to_finish(wait: bool = True, device: Device = None): """Wait for kernel to finish Enforce the system to wait for the kernel to finish before continuing. Introducing a @@ -135,15 +135,15 @@ def wait_for_kernel_to_finish(flag: bool = True, device: Device = None): Parameters ---------- - flag : bool, default = True + wait : bool, default = True if True, wait for kernel to finish device : Device, default = None the device to set the flag. If None, set it to the current device """ if device is None: - get_device().set_wait_to_finish(flag) + get_device().set_wait_to_finish(wait) else: - device.set_wait_to_finish(flag) + device.set_wait_to_finish(wait) def default_initialisation(): From 4df74f1fa58879a56ab87538cd57c474aa7bc641 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Wed, 16 Oct 2024 14:03:11 +0200 Subject: [PATCH 6/7] Renamed the parameter "bool" to "wait" in the `set_wait_for_kernel_finish` function. --- pyclesperanto/_interroperability.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyclesperanto/_interroperability.py b/pyclesperanto/_interroperability.py index 37d36ebc..570c1ab0 100644 --- a/pyclesperanto/_interroperability.py +++ b/pyclesperanto/_interroperability.py @@ -78,12 +78,12 @@ def affine_transform( ) -def set_wait_for_kernel_finish(wait_for_kernel_finish: bool =True): +def set_wait_for_kernel_finish(wait: bool = True): warnings.warn( "set_wait_for_kernel_finish : This method is deprecated. Consider using wait_for_kernel_to_finish() instead.", DeprecationWarning, ) - wait_for_kernel_to_finish(wait_for_kernel_finish) + wait_for_kernel_to_finish(wait) def clip(a, a_min, a_max, out=None): From a5a6a27010c151fcb71bf5a0954b207a4b1b11ee Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Wed, 16 Oct 2024 14:03:27 +0200 Subject: [PATCH 7/7] Renamed the parameter "flag" to "wait" in the `wait_for_kernel_to_finish` function.