Skip to content

Commit f06af93

Browse files
authored
Inline svd to enable constant propagation (#1240)
1 parent a8fd370 commit f06af93

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/svd.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ function svdvals(A::StaticMatrix)
3232
similar_type(A, T2, Size(diagsize(A)))(sv)
3333
end
3434

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

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

0 commit comments

Comments
 (0)