Skip to content

Commit

Permalink
Don't fill zero-sized arrays.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Sep 17, 2024
1 parent 725fd85 commit d677ee2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ end
fill(x, dims...) = fill(x, (dims...,))

function Base.fill!(A::CLArray{T}, x::T) where {T}
cl.enqueue_svm_fill(pointer(A), x, length(A))
isempty(A) || cl.enqueue_svm_fill(pointer(A), x, length(A))
A
end

Expand Down

0 comments on commit d677ee2

Please sign in to comment.