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

Specify post-condition on scan usage example.

parent c3cedf2c
No related branches found
No related tags found
No related merge requests found
...@@ -688,6 +688,11 @@ greater than 300:: ...@@ -688,6 +688,11 @@ greater than 300::
out = a.copy() out = a.copy()
knl(a, out) knl(a, out)
a_host = a.get()
out_host = a[a > 300]
assert (out_host == out.get()[:len(out_host)]).all()
The value being scanned over is a number of flags indicating whether each array The value being scanned over is a number of flags indicating whether each array
element is greater than 300. These flags are computed by *input_expr*. The element is greater than 300. These flags are computed by *input_expr*. The
prefix sum over this array gives a running count of array items greater than prefix sum over this array gives a running count of array items greater than
......
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