Skip to content

Commit

Permalink
Merge pull request #451 from oscardssmith/os/partially-revert-refacto…
Browse files Browse the repository at this point in the history
…r-StaticArrays-ext

revert #449
  • Loading branch information
ChrisRackauckas authored Jul 30, 2024
2 parents 61bfe08 + e520267 commit df0b598
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2"
GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527"
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"

[extensions]
Expand All @@ -27,7 +27,7 @@ ArrayInterfaceChainRulesExt = "ChainRules"
ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore"
ArrayInterfaceReverseDiffExt = "ReverseDiff"
ArrayInterfaceSparseArraysExt = "SparseArrays"
ArrayInterfaceStaticArraysExt = "StaticArrays"
ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore"
ArrayInterfaceTrackerExt = "Tracker"

[compat]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module ArrayInterfaceStaticArraysExt
module ArrayInterfaceStaticArraysCoreExt

import ArrayInterface
using LinearAlgebra
import StaticArrays: SArray, SMatrix, SVector, StaticMatrix, StaticArray, SizedArray, MArray, MMatrix, LU
import StaticArraysCore: SArray, SMatrix, SVector, StaticMatrix, StaticArray, SizedArray, MArray, MMatrix

function ArrayInterface.undefmatrix(::MArray{S, T, N, L}) where {S, T, N, L}
return MMatrix{L, L, T, L*L}(undef)
Expand All @@ -21,10 +21,6 @@ ArrayInterface.can_setindex(::Type{<:StaticArray}) = false
ArrayInterface.can_setindex(::Type{<:MArray}) = true
ArrayInterface.buffer(A::Union{SArray, MArray}) = getfield(A, :data)

function ArrayInterface.lu_instance(A::SMatrix{N,N}) where {N}
LU(LowerTriangular(A), UpperTriangular(A), SVector{N}(1:N))
end

function ArrayInterface.lu_instance(A::StaticMatrix{N,N}) where {N}
lu(one(A))
end
Expand Down

0 comments on commit df0b598

Please sign in to comment.