Skip to content
Snippets Groups Projects
Commit a80f833a authored by Russel Arbore's avatar Russel Arbore
Browse files

fix simple3 sample

parent ed716a96
No related branches found
No related tags found
No related merge requests found
fn simple3<1>(a: array(f32, #0), b: array(f32, #0)) -> f32
zero = constant(f32, 0.0)
fork = fork(start, #0)
id = thread_id(fork)
id = thread_id(fork, 0)
join = join(fork)
r = return(join, dot_red)
aval = read(a, position(id))
bval = read(b, position(id))
mul = mul(aval, bval)
dot = add(mul, dot_red)
dot_red = reduce(join, zero, dot)
\ No newline at end of file
dot_red = reduce(join, zero, dot)
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