Skip to content

Commit

Permalink
Inline svd to enable constant propagation (#1240)
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub authored Jan 29, 2024
1 parent a8fd370 commit f06af93
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/svd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ function svdvals(A::StaticMatrix)
similar_type(A, T2, Size(diagsize(A)))(sv)
end

function svd(A::StaticMatrix; full=Val(false))
_svd(A, full)
end
# `@inline` annotation is required to propagate `full` as constant to `_svd`
@inline svd(A::StaticMatrix; full=Val(false)) = _svd(A, full)

# Allow plain Bool in addition to Val
# Required inline as of version 1.5 to ensure Bool usage like svd(A,
Expand Down

0 comments on commit f06af93

Please sign in to comment.