MilesCranmer commited on
Commit
fc6dd4d
1 Parent(s): eb3700d

Eval with recursive nested spawn

Browse files
Files changed (1) hide show
  1. julia/sr.jl +2 -1
julia/sr.jl CHANGED
@@ -247,7 +247,8 @@ function evalTreeArray(tree::Node)::Array{Float32, 1}
247
  elseif tree.degree == 1
248
  return unaops[tree.op].(evalTreeArray(tree.l))
249
  else
250
- return binops[tree.op].(evalTreeArray(tree.l), evalTreeArray(tree.r))
 
251
  end
252
  end
253
 
 
247
  elseif tree.degree == 1
248
  return unaops[tree.op].(evalTreeArray(tree.l))
249
  else
250
+ right = @spawn evalTreeArray(tree.r)
251
+ return binops[tree.op].(evalTreeArray(tree.l), fetch(right))
252
  end
253
  end
254