Repository navigation
Conversation
Implement the partial Bunch–Kaufman panel with JavaScript and C paths, checked output staging, reference-order helpers and regression coverage. AI-assisted implementation, tests, documentation and independent automated review by OpenAI Codex under benatsf’s authorization. The public API is proposed under 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.
Description
Add
lapack/base/dlasyfto compute a partial symmetric indefinite Bunch–Kaufman factorization panel. The routine updates the stored triangle and workspace, returns numericINFO, writes the produced column count toKB, and writes only the produced prefix or suffix of signed, one-based ordinary Bunch–Kaufman pivots. Adjacent negative pivot values remain equal; this is the ordinary pivot format rather than the distinct-pair rook format.This is one complete package with JavaScript and C implementations, a Node-API binding, explicit JavaScript fallback, contiguous and independently strided APIs, declarations, examples and bounded benchmarks. Pivot search and panel updates follow the pinned reference order. Package-local allocation-free first-maximum and ordered GEMV/triangular helpers preserve the required semantics; the existing copy/scale/swap dependencies remain unchanged. A bounded, rebased copy adapter keeps the implementation correct across the existing portable and Fortran dependency configurations.
Related Issues
DLASYFunit and does not close the full RFC.Questions
The package proposes a ten-argument main API and sixteen-argument ndarray API. Both return numeric
INFOand use mutableInt32Arrayoutputs forKBandIPIV. Please review the proposed signatures and retained signed, one-based pivot convention.The documented
N=0behavior is a package-local safe quick return: scalar arguments and the activeKBslot are validated, that slot becomes zero, and inactiveA/IPIV/Warguments are not accessed. This is explicitly new behavior; the pinned unchanged reference did not successfully return for the tested empty calls.Other
Reference implementation:
DLASYFat Reference-LAPACK commit2e5d9c1. The derived triangular-update helper retains theDGEMMTR/Martin Koehler attribution. Full BSD attribution and license are retained inNOTICEand the documentation.Active public buffers must be intrinsic ordinary
ArrayBuffer-backedFloat64Array/Int32Arrayviews with disjoint indexed-byte envelopes. Shared backing stores are rejected before writes. Foreign addons must not supply externally aliased ordinary buffers to the pure JavaScript path; the private bridge and C core independently check physical envelopes. Used geometry, configured LAPACK/BLAS integer arithmetic and helper loop endpoints are checked before writes or allocations. Native dispatch uses a conservative signed32 domain and explicitly falls back for valid wider JavaScript metadata. Incoming pivot values are not read, and unfactored pivot slots remain unchanged. Positive singularINFOstill finishes the panel and writesKB.Executed validation on Linux x64 with Node 24.19.0, GCC and GNU Fortran 14.2:
Finite supplied symmetric matrices are compared with the unchanged reference and reconstruction checks. This does not claim universal nonfinite or JavaScript NaN-payload parity, numerical stability for arbitrary extreme inputs, execution on other platforms, or upstream CI execution.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored primarily by OpenAI Codex under benatsf’s explicit authorization. The checked contributing acknowledgment describes the delegated agents’ workflow; no personal applicant reading is claimed. The implementation agent generated the JavaScript paths, native staging, build configuration and checked-in tests. A delegated Codex agent generated the C core and bounded standalone validation; another generated documentation, declarations, examples and benchmarks. A separate Codex agent performed independent reference-backed source and runtime review. All agents used the existing upstream rules and the explicitly proposed package API. No applicant manual authorship, personal understanding or human review is claimed. Generated code and validation require the same upstream scrutiny as other contributions.
@stdlib-js/reviewers
Runtime metadata correction
A follow-up commit changes only
package.json'sengines.nodefrom the copied>=0.10.0value to a conservative proposed>=8.0.0floor. Mandatory validation imports rely on intrinsic typed-array and ArrayBuffer getters plus Symbol; optional addon requirements alone were not used to raise other packages' JavaScript floors. Actual isolated metadata/format checks and independent import/empty-input checks passed on Node 24 with the addon physically absent. This does not establish an exact historical minimum or claim tested Node 8/native compatibility. The algorithm, tests and original frozen validation evidence remain unchanged. This correction and its independent review were performed by Codex; no applicant manual review is claimed.