Conversation
Implement reciprocal Cholesky pivot growth with JavaScript and C kernels, optional Node-API execution, strided scratch views and independent finite Reference LAPACK regression coverage. Add the complete package surface for accepted RFC stdlib-js#2464. Assisted-by: OpenAI Codex
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
Add
@stdlib/lapack/base/dla-porpvgrw, implementing reciprocal Cholesky pivot growth from a supplied original matrix and Cholesky factor. This is one complete routine from the accepted LAPACK RFC: JavaScript, contiguous and independently strided C kernels, optional Node-API execution, headers, build manifests, browser fallback, TypeScript declarations, documentation, examples, benchmarks and numerical regression tests.Only the selected stored triangle of the leading
NCOLSsquare prefix is read. Inputs remain unchanged and may alias each other. The caller supplies disjoint scratch storage for2*NCOLSmaxima: factor maxima first, original-matrix maxima second. Columns with zero factor maxima are ignored, the result is capped at one, and an empty validated prefix returns one without accessing matrices or scratch. Independent input strides/offsets and nonzero scratch strides support negative and zero read strides and byte-offset typed views.The eight-argument main API and thirteen-argument
.ndarrayAPI follow neighboring adopted routines and are proposed for review; the tracking RFC approves the routine, not these exact signatures. Reference comparisons cover finite supplied matrices/factors. JavaScript and C use explicit ordered comparisons for their own NaN/infinity behavior, which is documented and tested separately from reference parity. This routine performs neither Cholesky factorization nor symmetric completion.The C kernel retains the Reference LAPACK provenance and full BSD redistribution notice. The addon currently builds with ILP64 indices. Package-local dispatch and the raw addon conservatively restrict active metadata/index arithmetic to signed32 eligibility for alternate LP64 builds; wider valid JavaScript metadata falls back. C callers must supply valid views and index/product ranges for their configured
LAPACK_INT; overflowing scratch counts are rejected before access. No shared helper changes or external LAPACK runtime dependency are introduced.Related Issues
Validation
Questions
No.
Other
This is one natural numerical routine with its complete package surface. The exact package API remains a proposal for maintainer review.
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 under benatsf's explicit authorization to contribute. Codex generated the JavaScript/C kernels, width-safe Node-API bridge, package-local fallback guards, build metadata, numerical fixtures, tests, benchmarks, types and documentation, and ran the recorded validation. A delegated Codex agent independently reviewed the proposed API, generated reference fixtures and exercised the compiled implementation against pinned LAPACK. Codex reviewed and applied the contributing guidelines; the checked guideline statement refers to that recorded agent work and does not claim personal applicant review.
@stdlib-js/reviewers