Skip to content

Commit bbb0d2a

Browse files
committed
Document vec_io further
1 parent b52954e commit bbb0d2a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

opencl/interactive/vec_io.c

+15
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,21 @@ Or you can use the default kernel and stdin input:
1616
1717
echo '1 2 3' | tr ' ' '\n' | ./prog
1818
19+
Multi vector operations can be done by reusing parts of the vector as in `+=`, e.g.:
20+
21+
echo '1 2 3 4' | tr ' ' '\n' | ./vec_io.out vec_io_sum.cl
22+
23+
gives:
24+
25+
4.000000e+00
26+
6.000000e+00
27+
3.000000e+00
28+
4.000000e+00
29+
30+
which represents:
31+
32+
(1, 2) += (3, 4) == (4, 6)
33+
1934
Set global work size and work group size different than defaults (n and 1):
2035
2136
./prog -g 10 -l 5 vec_io.cl vec_io.vec

0 commit comments

Comments
 (0)