Skip to content
Snippets Groups Projects
Commit cf1e6335 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Adjust doctest for changes to temp var scope finding

parent 2c77b30a
No related branches found
No related tags found
No related merge requests found
......@@ -923,6 +923,7 @@ Consider the following example:
... out[16*i_outer + i_inner] = sum(k, a_temp[k])
... """)
>>> knl = lp.tag_inames(knl, dict(i_outer="g.0", i_inner="l.0"))
>>> knl = lp.set_temporary_scope(knl, "a_temp", "local")
>>> knl = lp.set_options(knl, "write_cl")
>>> evt, (out,) = knl(queue, a=x_vec_dev)
#define lid(N) ((int) get_local_id(N))
......@@ -1479,7 +1480,7 @@ Now to make things more interesting, we'll create a kernel with barriers:
... "..."
... ])
>>> knl = lp.add_and_infer_dtypes(knl, dict(a=np.int32))
>>> knl = lp.split_iname(knl, "k", 128, outer_tag="g.0", inner_tag="l.0")
>>> knl = lp.split_iname(knl, "k", 128, inner_tag="l.0")
>>> code, _ = lp.generate_code(lp.preprocess_kernel(knl))
>>> print(code)
#define lid(N) ((int) get_local_id(N))
......@@ -1488,6 +1489,8 @@ Now to make things more interesting, we'll create a kernel with barriers:
__kernel void __attribute__ ((reqd_work_group_size(97, 1, 1))) loopy_kernel(__global int const *__restrict__ a, __global int *__restrict__ e)
{
__local int c[50 * 10 * 99];
<BLANKLINE>
int const k_outer = 0;
<BLANKLINE>
for (int j = 0; j <= 9; ++j)
for (int i = 0; i <= 49; ++i)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment