Repository navigation
Conversation
Add contiguous and strided native tridiagonal LU factorization with width-safe Node-API pivots, guarded JavaScript fallback and independent LAPACK regression coverage. Preserve all existing JavaScript implementations and zero-based pivot/status semantics. AI assistance: OpenAI Codex generated the implementation, tests, fixtures, benchmarks and documentation, ran validation and delegated an independent automated numerical review. No manual applicant review is claimed.
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.
Progresses #2464.
Description
lapack/base/dgttrfcurrently factors real tridiagonal matrices in JavaScript. This adds contiguous and independently strided C implementations, an optional Node-API addon, public headers, build manifests, C examples/benchmarks and native regression coverage.The port preserves the existing in-place mutation order, zero-based pivot indices and zero-based singular status, including the existing ambiguity when the first pivot is zero. All five existing JavaScript implementation/dispatch files remain byte-for-byte unchanged. Ordinary buffers, incompatible metadata, short views and numeric/pivot byte overlap use the existing JavaScript implementation. The addon uses a width-correct
LAPACK_INTworkspace instead of treating JavaScriptInt32Arraypivots as ILP64 integers; disjoint typed views retain native execution. Browser resolution uses the JavaScript entrypoint.The kernel is adapted from Reference LAPACK DGTTRF with its complete copyright and BSD redistribution notice retained. It is self-contained and does not introduce an external LAPACK runtime dependency or modify shared helpers.
Related Issues
Validation
Questions
No.
Other
This is one complete native routine under the accepted RFC. Existing JavaScript semantics, including its zero-based status convention, are deliberately preserved.
Checklist
AI Assistance
Yes
No
Code generation
Test/benchmark generation
Documentation (including examples)
Research and understanding
Disclosure
This contribution was authored primarily with OpenAI Codex. Codex generated the C implementation, width-safe Node-API bridge, package-local dispatch guards, build metadata, numerical fixtures, tests, benchmarks and documentation, and ran the recorded validation. A delegated Codex agent independently reviewed the source and exercised the compiled numerical implementation against LAPACK. Codex reviewed and applied the contributing guidelines under benatsf's explicit authorization to contribute; the checklist does not claim that benatsf personally read the guidelines or manually reviewed the generated code. No manual applicant review is claimed.
@stdlib-js/reviewers