Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert #449 #451

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this removed?

Copy link
Contributor Author

@oscardssmith oscardssmith Jul 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because StaticArrays.LU (which is not the same as LinearAlgebra.LU) is defined in StaticArrays not StaticArraysCore

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't we need this for performance? What about having a StaticArraysExt for just this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that locally and it causes invalidations during precompile which is illegal. I'll just hack my way around it...

end

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