Skip to content

Commit

Permalink
Unname unused arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangnrd committed Feb 13, 2025
1 parent 3ea8e1d commit 3eb48df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ BroadcastStyle(::MtlArrayStyle{N, S1},
MtlArrayStyle{N, SharedStorage}()

# allocation of output arrays
Base.similar(bc::Broadcasted{MtlArrayStyle{N,S}}, ::Type{T}, dims) where {T,N,S} =
Base.similar(::Broadcasted{MtlArrayStyle{N, S}}, ::Type{T}, dims) where {T, N, S} =
similar(MtlArray{T,length(dims),S}, dims)

# a static version of CartesianIndices that helps avoiding integer division
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ Adapt.adapt_structure(to::Adaptor, r::Base.RefValue) = MtlRefValue(adapt(to, r[]
# broadcast sometimes passes a ref(type), resulting in a GPU-incompatible DataType box.
# avoid that by using a special kind of ref that knows about the boxed type.
struct MtlRefType{T} <: Ref{DataType} end
Base.getindex(r::MtlRefType{T}) where T = T
Adapt.adapt_structure(to::Adaptor, r::Base.RefValue{<:Union{DataType,Type}}) =
Base.getindex(::MtlRefType{T}) where {T} = T
Adapt.adapt_structure(::Adaptor, r::Base.RefValue{<:Union{DataType, Type}}) =
MtlRefType{r[]}()

# case where type is the function being broadcasted
Expand Down

0 comments on commit 3eb48df

Please sign in to comment.