diff --git a/ext/EnzymeStaticArraysExt.jl b/ext/EnzymeStaticArraysExt.jl index a2d65a4653..3ab82c392e 100644 --- a/ext/EnzymeStaticArraysExt.jl +++ b/ext/EnzymeStaticArraysExt.jl @@ -40,7 +40,7 @@ end @inline function Enzyme.EnzymeCore.isvectortype( ::Type{<:Union{SArray{S,T},MArray{S,T}}} ) where {S,T} - return isbitstype(T) && Enzyme.Compiler.RecursiveMap.isscalartype(T) + return isbitstype(T) && Enzyme.EnzymeCore.isscalartype(T) end end diff --git a/lib/EnzymeCore/src/EnzymeCore.jl b/lib/EnzymeCore/src/EnzymeCore.jl index 298a45d5f0..dc2668e60c 100644 --- a/lib/EnzymeCore/src/EnzymeCore.jl +++ b/lib/EnzymeCore/src/EnzymeCore.jl @@ -538,7 +538,7 @@ By default, `isvectortype(T) == true` for `T` such that `isscalartype(T) == true A new plain array type, for example a GPU array, may extend this as follows: ```julia -@inline EnzymeCore.isvectortype(::Type{<:GPUArray{U}}) where {U} = isscalartype(U) +@inline EnzymeCore.isvectortype(::Type{<:NewArray{U}}) where {U} = EnzymeCore.isscalartype(U) ``` Such a type should implement `Base.zero` and, if mutable, `Base.fill!`. (If this is not diff --git a/src/recursive_map.jl b/src/recursive_map.jl index aa6ad2ce50..2f7fba3cec 100644 --- a/src/recursive_map.jl +++ b/src/recursive_map.jl @@ -309,8 +309,8 @@ end # generic handling of mutable structs, arrays, and memory @inline _similar(::T) where {T} = ccall(:jl_new_struct_uninit, Any, (Any,), T)::T @inline _similar(x::T) where {T<:Arraylike} = similar(x)::T -@inline _eachindex(xs::T...) where {T} = 1:fieldcount(T) -@inline _eachindex(xs::Arraylike...) = eachindex(xs...) +@inline _eachindex(::Vararg{T,M}) where {T,M} = 1:fieldcount(T) +@inline _eachindex(xs::Vararg{Arraylike,M}) where {M} = eachindex(xs...) @inline isinitialized(x, i) = isdefined(x, i) Base.@propagate_inbounds isinitialized(x::Arraylike, i) = isassigned(x, i) @inline getvalue(x, i) = getfield(x, i) diff --git a/test/recursive_map.jl b/test/recursive_map.jl index 3111263bd0..278499201a 100644 --- a/test/recursive_map.jl +++ b/test/recursive_map.jl @@ -687,4 +687,4 @@ end @testset "make_zero" test_make_zero() @testset "make_zero!" test_make_zero!() -end # module RecurisveMapTests +end # module RecursiveMapTests