Skip to content

Commit

Permalink
Fix typos and some minor things
Browse files Browse the repository at this point in the history
  • Loading branch information
danielwe committed Oct 31, 2024
1 parent 72bda99 commit b3f7426
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ext/EnzymeStaticArraysExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion lib/EnzymeCore/src/EnzymeCore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/recursive_map.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/recursive_map.jl
Original file line number Diff line number Diff line change
Expand Up @@ -687,4 +687,4 @@ end
@testset "make_zero" test_make_zero()
@testset "make_zero!" test_make_zero!()

end # module RecurisveMapTests
end # module RecursiveMapTests

0 comments on commit b3f7426

Please sign in to comment.