IntelLabs / ParallelAccelerator.jl

The ParallelAccelerator package, part of the High Performance Scripting project at Intel Labs
BSD 2-Clause "Simplified" License
294 stars 32 forks source link

Handle implicit type conversions. #117

Closed DrTodd13 closed 7 years ago

DrTodd13 commented 7 years ago
ksp = zeros(Complex{Float64}, size(im[:,:,j]))
ksp[:,1] = ksp[:,end] = ksp[1,:] = ksp[end,:] = 0

This will generate 4 parfors and each will have an arrayset where the element type is Complex{Float64} and the value is Int64. At a minimum we need to detect this situation when we generate an arrayset (or arrayref?) and do a conversion at that point or possibly hoist the conversion into the pre-statements if the value being written is not computed in the parfor body.

DrTodd13 commented 7 years ago

Looks like a couple of these places have been fixed so will close this for now.