Skip to content

feat: add fft/rfftf - #16089

Open
gunjjoshi wants to merge 5 commits into
stdlib-js:developfrom
gunjjoshi:fft-rfftf
Open

gunjjoshi wants to merge 5 commits into
stdlib-js:developfrom
gunjjoshi:fft-rfftf

Conversation

@gunjjoshi

Copy link
Copy Markdown
Member

type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:

  • task: lint_filenames status: passed
  • task: lint_editorconfig status: passed
  • task: lint_markdown_pkg_readmes status: passed
  • task: lint_markdown_docs status: na
  • task: lint_markdown status: na
  • task: lint_package_json status: passed
  • task: lint_repl_help status: passed
  • task: lint_javascript_src status: passed
  • task: lint_javascript_cli status: na
  • task: lint_javascript_examples status: passed
  • task: lint_javascript_tests status: passed
  • task: lint_javascript_benchmarks status: passed
  • task: lint_python status: na
  • task: lint_r status: na
  • task: lint_c_src status: na
  • task: lint_c_examples status: na
  • task: lint_c_benchmarks status: na
  • task: lint_c_tests_fixtures status: na
  • task: lint_shell status: na
  • task: lint_typescript_declarations status: passed
  • task: lint_typescript_tests status: passed
  • task: lint_license_headers status: passed ---

Resolves stdlib-js/metr-issue-tracker#1385.

Description

What is the purpose of this pull request?

This pull request:

  • adds fft/rfftf.

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.".

Used Claude Code to help with the implementation, tests, and docs. Also used it to understand multiple things and do the necessary research work.


@stdlib-js/reviewers

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown_pkg_readmes
    status: passed
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: passed
  - task: lint_repl_help
    status: passed
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: passed
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: passed
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: passed
  - task: lint_license_headers
    status: passed
---
@gunjjoshi
gunjjoshi requested a review from a team October 12, 2026 18:31
@gunjjoshi gunjjoshi added the METR Pull request associated with the METR project. label Oct 12, 2026
Comment thread lib/node_modules/@stdlib/fft/rfftf/lib/base.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rfftf/lib/base.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rfftf/lib/base.js Outdated
@stdlib-bot

stdlib-bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
fft/rfftf $\\color{red}628/645$
$\\color{green}+97.36\\%$
$\\color{red}46/53$
$\\color{green}+86.79\\%$
$\\color{red}5/6$
$\\color{green}+83.33\\%$
$\\color{red}628/645$
$\\color{green}+97.36\\%$

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

@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Oct 12, 2026
@kgryte kgryte added the Feature Issue or pull request for adding a new feature. label Oct 13, 2026
Comment thread lib/node_modules/@stdlib/fft/rfftf/lib/base.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rfftf/lib/base.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rfftf/lib/main.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rfftf/lib/main.js Outdated

@kgryte kgryte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left initial comments.

@kgryte kgryte added Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Oct 13, 2026
@gunjjoshi gunjjoshi mentioned this pull request Oct 28, 2026
6 of 7 tasks
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown_pkg_readmes
    status: na
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
Comment thread lib/node_modules/@stdlib/fft/rfftf/lib/base.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rfftf/lib/defaults.js

// Broadcast the workspace with batch dimensions so it is reused across fibers:
if ( ndim > 1 ) {
ws = broadcastArray( ws, arrayWith( sh, d, ( 2*n ) + 34 ) );

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


// Create a working buffer and copy the input into it:
rsh = arrayWith( sh, d, n );
r = baseZeros( rdt, rsh, ord );

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to avoid creating this real-valued temp array and just reinterpret the complex-valued output array with a "base" view?

gunjjoshi and others added 2 commits October 30, 2026 01:10
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Gunj Joshi <gunjjoshi8372@gmail.com>

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

Feature Issue or pull request for adding a new feature. METR Pull request associated with the METR project. Needs Changes Pull request which needs changes before being merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: add fft/rfftf

3 participants