Skip to content

Commit

Permalink
remove __init_ones
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith authored and avik-pal committed Sep 27, 2024
1 parent c466c24 commit f4219af
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ end
@inline _restructure(y, x) = restructure(y, x)
@inline _restructure(y::Number, x::Number) = x

@inline function __init_ones(x)
w = similar(x)
recursivefill!(w, true)
return w
end
@inline __init_ones(x::StaticArray) = ones(typeof(x))

@inline __maybe_unaliased(x::Union{Number, SArray}, ::Bool) = x
@inline function __maybe_unaliased(x::AbstractArray, alias::Bool)
# Spend time coping iff we will mutate the array
Expand Down

0 comments on commit f4219af

Please sign in to comment.