importall ParallelAccelerator
@acc function opt_update_e(k,n,U,E1)
_s = 0
for j = 1:k
U[:,j] = tanh(U[:,j])
v = n - sum([U[i,j]*U[i,j] for i in 1:n])
_s += v
E1[j] = _s / n
end
end
function main(m::Int, k::Int, n::Int)
U = Array(Float64, n, k)
E1 = Array(Float64, k)
fill!(U, 3)
opt_update_e(k,n,U,E1)
println("done")
end
main(100, 100, 200)
Error:
ERROR: LoadError: MethodError: `convert` has no method matching convert(::Type{Symbol}, ::GenSym)
This may have arisen from a call to the constructor Symbol(...),
since type constructors fall back to convert methods.
Closest candidates are:
call{T}(::Type{T}, ::Any)
convert(::Type{Symbol}, !Matched::AbstractString)
convert{T}(::Type{T}, !Matched::T)
Test source code:
Error: