Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown_pkg_readmes
status: passed
- task: lint_markdown_docs
status: na
- task: lint_markdown
status: na
- task: lint_package_json
status: passed
- task: lint_repl_help
status: passed
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: passed
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: passed
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: passed
- task: lint_license_headers
status: passed
---
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves a part of #14631.
Description
This pull request:
@stdlib/lapack/base/dsptrs, which solves a system of linear equationsA * X = Bwith a real symmetric matrixAstored in packed format, using the factorizationA = U * D * U^TorA = L * D * L^Tcomputed bydsptrf(feat: addlapack/base/dsptrf#13288).The implementation is a port of reference LAPACK
DSPTRS: forU * D * U^T, it solvesU * D * X = B(backward over the pivot blocks, usingdswap,dger, anddscal) followed byU^T * X = B(forward, usingdgemv); theL * D * L^Tcase is the mirror image. 1-by-1 and 2-by-2 diagonal blocks are handled as in the reference implementation.Conventions follow
lapack/base/dlaswpand #13288:dsptrs( order, uplo, N, nrhs, AP, IPIV, B, LDB )anddsptrs.ndarray( order, uplo, N, nrhs, AP, sap, oap, IPIV, si, oi, B, sb1, sb2, ob ). As indsptrf.ndarray,orderis kept in the ndarray API because the packed layout ofAPcan't be described by strides alone; the layout ofBis given bysb1andsb2.LDB >= max(1,N)for column-major andLDB >= max(1,nrhs)for row-major.uplois resolved to the equivalent column-major factorization in the same way as feat: addlapack/base/dsptrf#13288 (row-major + upper is solved asL * D * L^T, and row-major + lower asU * D * U^T), sodsptrsconsumes exactly theAPandIPIVthatdsptrfreturns for the sameorderanduplo.uplois validated in both APIs. The function returnsB(overwritten byX);APandIPIVare not modified. ReferenceDSPTRSonly usesINFOto report invalid arguments, which are thrown as errors here.Related Issues
This pull request has the following related issues:
lapack/base/dsptrf#13288 (dsptrf)Reference Packages
This pull request followed these packages:
lapack/base/dsptrf(feat: addlapack/base/dsptrf#13288)lapack/base/dlaswpbase.js+dsptrs.js+ndarray.js), argument validation, the row-majoruploresolution, docs, and test structure from feat: addlapack/base/dsptrf#13288Band theLDBchecks fromlapack/base/dlaswpDSPTRS; loop counters stay one-based as in the reference, with zero-based indices in the code commentsX, setsB = A * X, and factorsAwith reference LAPACKdsptrf(Apple Accelerate). Tests compare againstXwithin 8 ULP. The fixtures cover upper/lower, both layouts, factorizations with only 2-by-2 blocks, 1-by-1 blocks with row interchanges,N = 1, multiple right-hand sides,LDBlarger than required, offsets, and positive, negative, and mixed strides. Matrices are shown row by row in*_matfieldsdsptrsto within 5.3e-15 relative error in column-major, row-major, and strided/offset layouts. Running the feat: addlapack/base/dsptrf#13288dsptrfimplementation on the same matrices givesIPIVidentical to reference LAPACK, so the two packages are compatiblelib/base.js(eachdger/dgemv/dscal/dswapstep) makes the tests failQuestions
Yes: the
IPIVconvention for 2-by-2 pivots (also asked in #14631). Other LAPACK packages here use zero-basedIPIV(e.g.,dgttrf,dlaswp), but #13288 currently stores the one-based reference LAPACK values, with negative values marking 2-by-2 blocks, and a zero-based row0can't be negated. This PR follows #13288 as it stands. All pivot decoding is in one helper (pivotRowinlib/base.js), so ifdsptrfmoves to a zero-based encoding (for example~kp), only that helper and the fixtures need to change.Other
Ran locally: package tests (110 assertions), benchmarks, the example, and the commit-hook linters (file names, EditorConfig, Markdown,
package.json,repl.txt, JavaScript, TypeScript declarations and tests, license headers), all passing.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
@stdlib-js/reviewers