Skip to content

Commit 46c4345

Browse files
committed
chore: run formatter
1 parent 58142d5 commit 46c4345

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/TracedRArray.jl

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ and require expensive copies and synchronization each time and therefore should
5656
return TracedRArray{T,0}((), res2, ())
5757
end
5858

59-
function Base.getindex(
60-
a::TracedRArray{T,N}, indices::Vararg{Any,N}
61-
) where {T,N}
59+
function Base.getindex(a::TracedRArray{T,N}, indices::Vararg{Any,N}) where {T,N}
6260
indices = [i isa Colon ? (1:size(a, idx)) : i for (idx, i) in enumerate(indices)]
6361
res = MLIR.IR.result(
6462
MLIR.Dialects.stablehlo.slice(
@@ -73,20 +71,16 @@ function Base.getindex(
7371
)
7472
x = TracedRArray{T,N}((), res, Tuple(length.(indices)))
7573
ddims = findall(x -> x isa Integer, indices)
76-
!isempty(ddims) && return dropdims(x, dims=Tuple(ddims))
74+
!isempty(ddims) && return dropdims(x; dims=Tuple(ddims))
7775
return x
7876
end
7977

8078
# Prevents ambiguity
81-
function Base.getindex(
82-
a::SubArray{T,N,<:AnyTracedRArray{T,N}}, indices::Int...
83-
) where {T,N}
79+
function Base.getindex(a::SubArray{T,N,<:AnyTracedRArray{T,N}}, indices::Int...) where {T,N}
8480
return getindex(parent(a), Base.reindex(a.indices, indices)...)
8581
end
8682

87-
function Base.getindex(
88-
a::SubArray{T,N,<:AnyTracedRArray{T,N}}, indices...
89-
) where {T,N}
83+
function Base.getindex(a::SubArray{T,N,<:AnyTracedRArray{T,N}}, indices...) where {T,N}
9084
return getindex(parent(a), Base.reindex(a.indices, indices)...)
9185
end
9286

0 commit comments

Comments
 (0)