Skip to content

Conversation

@lkdvos
Copy link
Member

@lkdvos lkdvos commented Sep 2, 2025

Here I've added specialized implementations for working with Diagonals, through a dedicated backend.

@codecov
Copy link

codecov bot commented Sep 2, 2025

Codecov Report

❌ Patch coverage is 93.72549% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/implementations/svd.jl 79.10% 14 Missing ⚠️
src/implementations/qr.jl 96.22% 2 Missing ⚠️
Files with missing lines Coverage Δ
src/MatrixAlgebraKit.jl 100.00% <ø> (ø)
src/implementations/eig.jl 84.46% <100.00%> (-14.13%) ⬇️
src/implementations/eigh.jl 94.48% <100.00%> (+2.18%) ⬆️
src/implementations/lq.jl 98.92% <100.00%> (+0.30%) ⬆️
src/interface/eig.jl 85.71% <100.00%> (+2.38%) ⬆️
src/interface/eigh.jl 63.15% <100.00%> (+4.33%) ⬆️
src/interface/lq.jl 50.00% <100.00%> (+8.33%) ⬆️
src/interface/qr.jl 66.66% <100.00%> (+9.52%) ⬆️
src/interface/svd.jl 63.15% <100.00%> (+4.33%) ⬆️
src/implementations/qr.jl 96.60% <96.22%> (+0.28%) ⬆️
... and 1 more

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lkdvos lkdvos force-pushed the diagonal branch 2 times, most recently from 6e119a5 to 0a8df6b Compare September 3, 2025 14:52
@lkdvos lkdvos enabled auto-merge (squash) September 3, 2025 21:34
@lkdvos lkdvos requested a review from Jutho September 4, 2025 13:59
end

p .+= (0:(n - 1)) .* n
U[p] .= Ref(one(eltype(U)))
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this Ref is necessary due to the broadcasting behaviour of scalars, but I assume it also has no cost. Other than this, I have no comments and think this looks great.

Copy link
Member

Choose a reason for hiding this comment

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

Semi related, why not use @. broadcast syntax to minimize the number of array iterations?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I was thinking when implementing this that since the Diagonal implementation really requires very little from the scalars, it might be that someone at some point uses this for some exotic type that actually has some unwanted broadcasting behavior, so better to be explicit about it. Realistically though, this totally doesn't matter 🙃

@lkdvos lkdvos merged commit 7531d17 into main Sep 5, 2025
10 checks passed
@lkdvos lkdvos deleted the diagonal branch September 5, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants