diff --git a/pyopencl/scan.py b/pyopencl/scan.py index 6291de9bb287ff2830336c36b4da6b2b2f6381c3..6218d5716b409557341f4e8ce12105ad0dcf1a30 100644 --- a/pyopencl/scan.py +++ b/pyopencl/scan.py @@ -1480,6 +1480,9 @@ class GenericScanKernel(_GenericScanKernelBase): # We're done here. (But pretend to return an event.) return cl.enqueue_marker(queue, wait_for=wait_for) + from pyopencl.tools import expand_runtime_arg_list + data_args = list(expand_runtime_arg_list(self.parsed_args, args)) + # }}} l1_info = self.first_level_scan_info @@ -1510,9 +1513,6 @@ class GenericScanKernel(_GenericScanKernelBase): # }}} - from pyopencl.tools import expand_runtime_arg_list - data_args = list(expand_runtime_arg_list(self.parsed_args, args)) - # {{{ first level scan of interval (one interval per block) scan1_args = data_args + [