Closed Wajihulhassan closed 8 years ago
In general, we do not support convert
call when compiling to C. Its semantics is complex, and Julia 0.4 also has difficulty inferring its return type.
We can write the same thing as 1 .* (array1 .== var_tmp)
, or (array1 .== var_tmp) .* 1
. Both works in Julia 0.5 rc. However, the latter was failing in Julia 0.4 due to some inference issue, and is now fixed by CompilerTools commit e294daef.
In my julia code, I have
convert(Vector{Int64},(array1 .== var_tmp))
. For expression(array1 .== var_tmp)
, it generates the following mmapand for conversion part it generates
This
Base.convert
call is not handled in CGen as compiler throws following error while typecasting.While
GenSym17
is a bool j2c_array andGenSym19
is int64 j2c_array.Thanks