Float64 reduction of Float32 computation idiom using @distributed?

You should be able to pass arbitrary binary functions as the reducer, as long as they are defined on the workers. So if I’m understand what you want correctly, you could just do

@everywhere myplus(x,y) = Float64.(x) + Float64.(y)

accum = Array{Float64}(undef, 3, 2)

accum .= @distributed (myplus) for i = 1:10
       foo = rand(Float32, 3,2)
       end
1 Like