Skip to content

Commit fac481c

Browse files
committed
two important at-inline-s
1 parent c5db487 commit fac481c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rulesets/Base/mapreduce.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ function ∇cumprod_dim(vald::Val{dim}, x::AbstractArray, dy=fill!(zero(x),1), y
275275
return dx
276276
end
277277

278-
function ∇cumprod_dim!(dx::AbstractArray, ::Val{dim}, x::AbstractArray, dy, y) where {dim}
278+
@inline function ∇cumprod_dim!(dx::AbstractArray, ::Val{dim}, x::AbstractArray, dy, y) where {dim}
279279
iters = ntuple(k -> k==dim ? Ref(:) : axes(x,k), ndims(x))
280280
for ind in Iterators.product(iters...)
281281
@views ∇cumprod!(dx[ind...], x[ind...], dy[ind...], y[ind...])
@@ -290,7 +290,7 @@ function ∇cumprod(x::AbstractVector, dy=one(x), y=cumprod(x))
290290
return dx
291291
end
292292

293-
function ∇cumprod!(dx::AbstractVector, x::AbstractVector, dy, y)
293+
@inline function ∇cumprod!(dx::AbstractVector, x::AbstractVector, dy, y)
294294
lo, hi = firstindex(x), lastindex(x)
295295
z = something(findfirst(iszero, x), hi+1)
296296
@inbounds for i in lo:z-1

0 commit comments

Comments
 (0)