Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC]: Add C implementation for @stdlib/stats/base/dists/triangular/cdf #4668

Open
3 tasks done
0PrashantYadav0 opened this issue Jan 9, 2025 · 1 comment · May be fixed by #4669
Open
3 tasks done

[RFC]: Add C implementation for @stdlib/stats/base/dists/triangular/cdf #4668

0PrashantYadav0 opened this issue Jan 9, 2025 · 1 comment · May be fixed by #4669

Comments

@0PrashantYadav0
Copy link
Contributor

0PrashantYadav0 commented Jan 9, 2025

Description

This RFC proposes adding a C implementation, including a Node.js native addon, C benchmarks, and C examples, for the @stdlib/stats/base/dists/triangular/cdf package.

When adding support, the following tasks should be completed:

  1. A C source implementation should be added to a src folder within the package's directory.
  2. A native add-on interface should be added in order to call the C implementation from JavaScript.
  3. A JavaScript file should be added to the lib folder to allow benchmarking and unit testing the native implementation from JavaScript.
  4. A new test file should be created which includes unit tests testing against expected behavior.
  5. C benchmarks should be added which measure performance for the C source implementation.
  6. A file containing C examples should be added to demonstrate example usage.
  7. JavaScript benchmarks should be added which measure performance for the native add-on.
  8. Build and configuration files should be added to allow compiling and running the C source implementation using project make commands (as documented below).
  9. The README should be updated to include documentation for the added C API.

Prerequisites

  1. Review JavaScript implementation in lib/main.js and its required modules to identify all stdlib functions used.
  2. Verify C implementations exist for each required function.

Questions

No.

Other

Once the implementation is ready, including C examples and benchmarks, we should be able to run the following make commands.

Related Issues

Related issues #3355

Build native add-on

NODE_ADDONS_PATTERN="@stdlib/stats/base/dists/triangular/cdf" make install-node-addons

Run C examples

make examples-c-files FILES="$(pwd)/lib/node_modules/@stdlib/stats/base/dists/triangular/cdf/examples/c/example.c"

Run C benchmarks

make benchmark-c-files FILES="$(pwd)/lib/node_modules/@stdlib/stats/base/dists/triangular/cdf/benchmark/c/benchmark.c"

Run JavaScript benchmarks

make benchmark-javascript-files FILES="$(pwd)/lib/node_modules/@stdlib/stats/base/dists/triangular/cdf/benchmark/benchmark.native.js"

Run all tests

make TESTS_FILTER=".*/@stdlib/stats/base/dists/triangular/cdf/.*" test

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.
@stdlib-bot
Copy link
Contributor

👋 Hi there! 👋

And thank you for opening your first issue! We will get back to you shortly. 🏃 💨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants