-
-
Notifications
You must be signed in to change notification settings - Fork 596
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
feat: add C ndarray interface and refactor implementation for stats/base/dnanmeanpw
#4763
Conversation
--- 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 status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - 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: passed - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
Coverage Report
The above coverage report was generated for the changes in this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pointer should be CBLAS_INT
type here.
EDIT: Looks like the JavaScript also needs to refactored.
yes, i'm aware of that. i forgot to mark this as a draft 😅 |
--- 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 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: passed - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: failed ---
lib/node_modules/@stdlib/stats/base/dnanmeanpw/test/test.ndarray.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dnanmeanpw/test/test.ndarray.native.js
Outdated
Show resolved
Hide resolved
--- 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 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: passed - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
--- 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 status: na - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - 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: passed - task: lint_c_benchmarks status: passed - 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 ---
--- 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 status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
--- 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 status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aayush0325 A few documentation related suggestions.
1 - Use consistent terminology across similar packages and within the files of a single package. Notice that some files in this package use "stride length" and "starting index" instead of "stride length for x" and "starting index for x"
2 - For cases with multiple input arrays, we can then use specific terms like "stride length for x" and "stride length for y" to maintain clarity.
cc @kgryte
That makes a lot of sense. We'd have to update the documentation for the existing packages as well. Dropping a patch soon! |
Co-authored-by: Muhammad Haris <[email protected]> Signed-off-by: Aayush Khanna <[email protected]>
Co-authored-by: Muhammad Haris <[email protected]> Signed-off-by: Aayush Khanna <[email protected]>
Co-authored-by: Muhammad Haris <[email protected]> Signed-off-by: Aayush Khanna <[email protected]>
Co-authored-by: Muhammad Haris <[email protected]> Signed-off-by: Aayush Khanna <[email protected]>
Co-authored-by: Muhammad Haris <[email protected]> Signed-off-by: Aayush Khanna <[email protected]>
Co-authored-by: Muhammad Haris <[email protected]> Signed-off-by: Aayush Khanna <[email protected]>
Co-authored-by: Muhammad Haris <[email protected]> Signed-off-by: Aayush Khanna <[email protected]>
Co-authored-by: Muhammad Haris <[email protected]> Signed-off-by: Aayush Khanna <[email protected]>
--- 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 status: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
kindly take a look at the examples here, we'd have to update this in existing packages as well, dropping a patch for that soon! |
@aayush0325 README examples LGTM |
few other places where we had to make similar changes as well, see this commit, i will then make similar changes across existing packages |
Those look fine to me, as well. |
Signed-off-by: Athan <[email protected]>
Signed-off-by: Athan <[email protected]>
dnansumpw( N, WORKSPACE, x, stride, offset ); | ||
return WORKSPACE[ 0 ] / WORKSPACE[ 1 ]; | ||
function dnanmeanpw( N, x, strideX, offsetX ) { | ||
var out = new Float64Array( 2 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aayush0325 The WORKSPACE
idea is still valid here. Namely, we can avoid allocating a new out
array for each call to dnanmeanpw
and just reuse the same workspace each time. While not thread safe in C, this is perfectly fine in JS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll keep this in mind!
Signed-off-by: Athan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…base/dnanmeanpw` PR-URL: stdlib-js#4763 Co-authored-by: Athan Reines <[email protected]> Co-authored-by: Muhammad Haris <[email protected]> Reviewed-by: Athan Reines <[email protected]> Reviewed-by: Muhammad Haris <[email protected]>
Description
This pull request:
stats/base/dnanmeanpw
Related Issues
No.
Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers