CLArrays.jl
CLArrays.jl copied to clipboard
CLArray{Float32,2}(10,10) throws ambiguity error
julia> CLArray{Float32,2}(10,10)
ERROR: MethodError: CLArrays.CLArray{Float32,2}(::Int64, ::Int64) is ambiguous. Candidates:
(::Type{CLArrays.CLArray{T,N}})(size, ptr) where {T, N} in CLArrays at /Users/solver/.julia/v0.6/CLArrays/src/array.jl:12
(T::Type{#s9} where #s9<:GPUArrays.GPUArray)(dims::Integer...) in GPUArrays at /Users/solver/.julia/v0.6/GPUArrays/src/construction.jl:37
Possible fix, define
(::Type{CLArrays.CLArray{T,N}})(::Integer, ::Integer)
What are you trying to do?
The following works fine
CLArray{Float32,2}(rand(5,4))
As well as
CLArray{Float32,2}((10,10))
I agree though, for "consitency" if both of the following ways generate a new array
Array{Float32,2}((10,10))
Array{Float32,2}(10,10)
We would expect the same to happen with a CLArray
The above should be a synonym for those (as is the case for Matrix
)