镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

feat: add C implementation for blas/ext/base/ndarray/dsome - #16037

Open
ujjwalv01 wants to merge 1 commit into
stdlib-js:developfrom
ujjwalv01:feat-dsome-c-addon
Open

ujjwalv01 wants to merge 1 commit into
stdlib-js:developfrom
ujjwalv01:feat-dsome-c-addon

Conversation

@ujjwalv01

Copy link
Copy Markdown
Member

Resolves a part of #14819

Description

What is the purpose of this pull request?

This pull request:

  • adds a native C implementation for testing whether a one-dimensional double-precision floating-point ndarray contains at least k truthy elements (dsome).
  • updates the test suite (test.js, test.main.js, test.native.js) and benchmarks to cover and utilize the new native C addon.
  • updates the k zero-dimensional ndarray to use an int32 data type rather than generic throughout the package, as a generic ndarray is not backed by an ArrayBuffer and thus cannot be passed to stdlib_ndarray_napi_addon_arguments.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

I used AI assistance for test/benchmark generation and documentation.


@stdlib-js/reviewers

@ujjwalv01
ujjwalv01 requested a review from a team October 10, 2026 15:48
@stdlib-bot stdlib-bot added BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). Needs Review A pull request which needs code review. and removed Needs Review A pull request which needs code review. labels Oct 10, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/ndarray/dsome $\\color{green}198/198$
$\\color{green}+100.00\\%$
$\\color{green}7/7$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}198/198$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

@ujjwalv01 ujjwalv01 added Feature Issue or pull request for adding a new feature. C Issue involves or relates to C. labels Oct 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). C Issue involves or relates to C. Feature Issue or pull request for adding a new feature. Needs Review A pull request which needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants