Hello.
I'm trying to execute the below, but I'm getting the following message
julia> include("simple_ips.jl")
OptFramework failed to optimize function ##process#658 in optimization pass ParallelAccelerator.Driver.toDomainIR with error AssertionError("")
It's basically a wrapper on the gaussian-blur example.
What am I doing wrong since ParallelAccelerator is not able to optimize the function?
using Images
using ImageView
using ImageMagick
using TestImages
using FileIO
using ParallelAccelerator
using DocOpt
using Images
end
function blur(img, iterations)
buf = copy(img)
runStencil(buf, img, iterations, :oob_src_zero) do b, a
b[0,0] =
(a[-2,-2] * 0.003 + a[-1,-2] * 0.0133 + a[0,-2] * 0.0219 + a[1,-2] * 0.0133 + a[2,-2] * 0.0030 +
a[-2,-1] * 0.0133 + a[-1,-1] * 0.0596 + a[0,-1] * 0.0983 + a[1,-1] * 0.0596 + a[2,-1] * 0.0133 +
a[-2, 0] * 0.0219 + a[-1, 0] * 0.0983 + a[0, 0] * 0.1621 + a[1, 0] * 0.0983 + a[2, 0] * 0.0219 +
a[-2, 1] * 0.0133 + a[-1, 1] * 0.0596 + a[0, 1] * 0.0983 + a[1, 1] * 0.0596 + a[2, 1] * 0.0133 +
a[-2, 2] * 0.003 + a[-1, 2] * 0.0133 + a[0, 2] * 0.0219 + a[1, 2] * 0.0133 + a[2, 2] * 0.0030)
return a, b
end
return img
end
##session_id doesnt do anything in the code yet
@acc function process(session_id,kernel,input, iterations)
img = load(input)
img2 = kernel(img,iterations)
save("portinari-blur.png",img2)
process(1,blur,"portinari.png")