Skip to content

SPQR: build factors with typed constructors, for type-stability - #756

Open
topolarity wants to merge 1 commit into
JuliaSparse:mainfrom
topolarity:ct/trim-spqr
Open

SPQR: build factors with typed constructors, for type-stability#756
topolarity wants to merge 1 commit into
JuliaSparse:mainfrom
topolarity:ct/trim-spqr

Conversation

@topolarity

@topolarity topolarity commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Last PR of the --trim set!

Having the types spelled out explicitly here allows these constructors to be fully inferred w.r.t. dispatch. This does not affect the return type of any call, so no @inferred test is included.

This commit was written with the assistance of generative AI (Claude) 🤖

`qr` wrapped SPQR's result pointers with the untyped `Sparse(ptr)` and
`Dense(ptr)` constructors, which read the element type from the C struct and
so dispatch dynamically. SPQR computes in double precision whatever the input
type, so the result type is known: map it from the input element type and use
the typed constructors.

This commit was written with the assistance of generative AI (Claude).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.81%. Comparing base (88fa040) to head (1eeb4b4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #756      +/-   ##
==========================================
- Coverage   83.85%   83.81%   -0.04%     
==========================================
  Files          13       13              
  Lines        9387     9390       +3     
==========================================
- Hits         7871     7870       -1     
- Misses       1516     1520       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@araujoms

araujoms commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Wait, why does the function accept Tv<:CHOLMOD.VTypes if it doesn't actually support them? It should be restricted to Float64 and ComplexF64, with Float32 and ComplexF32 handled by an explicit conversion like Float16 and ComplexF16 below.

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.

2 participants