Skip to content

Commit d862a1a

Browse files
committed
don't use broadcast to convert to correct array type (Bool.(x) --> BitArray)
1 parent fe0a2fd commit d862a1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/construction.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ function convert(AT::Type{<: GPUArray{T, N}}, A::DenseArray{T, N}) where {T, N}
4545
copy!(AT(Base.size(A)), A)
4646
end
4747

48-
function convert(AT::Type{<: GPUArray{T1}}, A::DenseArray{T2}) where {T1, T2}
49-
copy!(similar(AT, T1, size(A)), T1.(A))
48+
function convert(AT::Type{<: GPUArray{T1}}, A::DenseArray{T2, N}) where {T1, T2, N}
49+
copy!(similar(AT, T1, size(A)), convert(Array{T1, N}, A))
5050
end
5151
function convert(AT::Type{<: GPUArray}, A::DenseArray{T2, N}) where {T2, N}
5252
copy!(similar(AT, T2, size(A)), A)

0 commit comments

Comments
 (0)