Conversation
Adapt complex64 ndarray views to the existing compensated C kernel. Add the public header, optional Node-API addon, native dispatch, build metadata and numerical/view-layout regression coverage while preserving the JavaScript fallback. Assisted-by: OpenAI Codex
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
|
👋 Hi there! 👋 And thank you for opening your first pull request! We will review it shortly. 🏃 💨 Getting Started
Next Steps
Running Tests LocallyYou can use # Run tests for all packages in the math namespace:
make test TESTS_FILTER=".*/@stdlib/math/.*"
# Run benchmarks for a specific package:
make benchmark BENCHMARKS_FILTER=".*/@stdlib/math/base/special/sin/.*"If you haven't heard back from us within two weeks, please ping us by tagging the "reviewers" team in a comment on this PR. If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members. We appreciate your contribution! Documentation Links |
Refs #14819.
Description
This pull request adds a C API and optional Node.js native addon for
@stdlib/blas/ext/base/ndarray/csumkbn, allowing compensated complex64 sums to run through the existing strided C kernel. The adapter converts ndarray byte strides and offsets into complex element indices and returns aComplex64value. Browser and unavailable-addon environments retain the existing JavaScript implementation.The complete package port includes its public header, N-API bridge, build manifests, C documentation/example/benchmark, and separate public, JavaScript, and native behavior tests.
Related Issues
blas/ext/base/ndarraypackages #14819Questions
No.
Other
Validated locally with Node 24.19.0 and GCC: the addon builds and the public export selects it; 75/75 assertions pass with native tests running. Independent fixtures verify cancellation at 2^24 and 2^100, real/imaginary isolation, signed zero and NaN components, empty and singleton views, positive/negative/zero strides, buffer and ndarray offsets, and unchanged input/guard elements. Unavailable-addon dispatch selects the unchanged JS implementation. The C example returns 1+2i for a cancellation fixture; all 18 C benchmark runs complete. JavaScript, Markdown, package metadata, and both upstream EditorConfig configuration checks pass. Applicable C lint is recorded in the validation evidence.
Checklist
AI Assistance
Yes
No
Code generation
Test/benchmark generation
Documentation (including examples)
Research and understanding
Disclosure
The C adapter, Node.js addon, tests, build metadata, documentation, and research were prepared primarily by OpenAI Codex, following the project's existing
ndarray/csumnative implementation. The existing numerical C kernel and JavaScript implementation are reused. The contributing-guidelines acknowledgment records Codex's review and application of the guidelines under benatsf's explicit authorization to contribute. It does not claim that benatsf personally read the guide or manually reviewed the code. No manual applicant review is claimed.