From 7ffd7977623c3d0d108e4f4ed8beb0fae1a3dcf5 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Aug 2022 10:27:33 -0500 Subject: [PATCH] ListOfListBuilder: tolerate None arguments --- pyopencl/algorithm.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyopencl/algorithm.py b/pyopencl/algorithm.py index a11653400..2dadf0ae5 100644 --- a/pyopencl/algorithm.py +++ b/pyopencl/algorithm.py @@ -1143,6 +1143,12 @@ def __call__(self, queue, n_objects, *args, **kwargs): from pyopencl.tools import VectorArg if isinstance(arg_descr, VectorArg): from pyopencl import MemoryObject + if arg_val is None: + data_args.append(arg_val) + if arg_descr.with_offset: + data_args.append(0) + continue + if isinstance(arg_val, MemoryObject): data_args.append(arg_val) if arg_descr.with_offset: