diff --git a/loopy/kernel/creation.py b/loopy/kernel/creation.py index 9a05408bb3c945f9ba9a5b11d28b02363b39b610..885ecb576944c802c407f1fa368b6eb0f8b6ef2e 100644 --- a/loopy/kernel/creation.py +++ b/loopy/kernel/creation.py @@ -394,7 +394,7 @@ ELSE_RE = re.compile("^\s*else\s*$") INSN_RE = re.compile( "^" "\s*" - "(?P.+?)" + "(?P[^{]+?)" "\s*(?.+?)" "\s*?" diff --git a/test/test_loopy.py b/test/test_loopy.py index ba20b5866786cfb579567dc23d61d734868c8f14..dd29ea24f92a085c474c037d4afc15978280f226 100644 --- a/test/test_loopy.py +++ b/test/test_loopy.py @@ -1494,6 +1494,26 @@ def test_call_with_no_returned_value(ctx_factory): # }}} +# {{{ call with no return values and options + +def test_call_with_options(ctx_factory): + import pymbolic.primitives as p + + ctx = ctx_factory() + queue = cl.CommandQueue(ctx) + + knl = lp.make_kernel( + "{:}", + "f() {id=init}" + ) + + from library_for_test import no_ret_f_mangler, no_ret_f_preamble_gen + knl = lp.register_function_manglers(knl, [no_ret_f_mangler]) + + evt, _ = knl(queue) + +# }}} + def test_unschedulable_kernel_detection(): knl = lp.make_kernel(["{[i,j]:0<=i,j