-
-
Notifications
You must be signed in to change notification settings - Fork 813
feat: add javascript implementation of blas/base/cdotc
#4752
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
base: develop
Are you sure you want to change the base?
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: passed - 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 --- --- 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: na ---
Coverage Report
The above coverage report was generated for the changes in this PR. |
--- 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: 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 ---
--- 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: 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: failed ---
--- 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_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: passed - 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: 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: na - task: lint_javascript_src status: na - 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: passed ---
/stdlib update-copyright-years |
/stdlib --help |
@MeastroZI, slash command not recognized. Please use |
/stdlib help |
@MeastroZI, available slash commands include:
|
|
||
module.exports = cdotc; | ||
|
||
// exports: { "ndarray": "sdot.ndarray" } |
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.
// exports: { "ndarray": "sdot.ndarray" } | |
// exports: { "ndarray": "cdotc.ndarray" } |
> var re = {{alias:@stdlib/complex/float32/real}}( out ) | ||
54 | ||
> var im = {{alias:@stdlib/complex/float32/imag}}( out ) | ||
-80 |
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.
> var re = {{alias:@stdlib/complex/float32/real}}( out ) | |
54 | |
> var im = {{alias:@stdlib/complex/float32/imag}}( out ) | |
-80 | |
<Complex64>[ 54, -80 ] |
* var realf = require( '@stdlib/complex/float32/real' ); | ||
* var imagf = require( '@stdlib/complex/float32/imag' ); | ||
* | ||
* var x = new Complex64Array( [ 7.0, -8.0, -1.0, -9.0 ] ); | ||
* var y = new Complex64Array( [ 6.0, -6.0, -9.0, 5.0 ] ); | ||
* | ||
* var out = cdotc( x.length, x, 1, 0, y, 1, 0 ); | ||
* // returns <Complex64> | ||
* | ||
* var re = realf( out ); | ||
* // returns 54 | ||
* | ||
* var im = imagf( out ); | ||
* // returns -80 |
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.
* var realf = require( '@stdlib/complex/float32/real' ); | |
* var imagf = require( '@stdlib/complex/float32/imag' ); | |
* | |
* var x = new Complex64Array( [ 7.0, -8.0, -1.0, -9.0 ] ); | |
* var y = new Complex64Array( [ 6.0, -6.0, -9.0, 5.0 ] ); | |
* | |
* var out = cdotc( x.length, x, 1, 0, y, 1, 0 ); | |
* // returns <Complex64> | |
* | |
* var re = realf( out ); | |
* // returns 54 | |
* | |
* var im = imagf( out ); | |
* // returns -80 | |
* | |
* var x = new Complex64Array( [ 7.0, -8.0, -1.0, -9.0 ] ); | |
* var y = new Complex64Array( [ 6.0, -6.0, -9.0, 5.0 ] ); | |
* | |
* var out = cdotc( x.length, x, 1, 0, y, 1, 0 ); | |
* // returns <Complex64>[ 54, -80 ] |
return new Complex64( discreteUniform( 0, 10 ), discreteUniform( 1, 5 ) ); | ||
} | ||
|
||
var cx = filledarrayBy( 10, 'complex64', rand ); |
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.
Could you please change cx
to x
as well as cy
to y
here and elsewhere?
b.tic(); | ||
for ( i = 0; i < b.iterations; i++ ) { | ||
out = cdotc( cx.length, cx, 1, cy, 1 ); | ||
if ( isnanf( realf( out ) ) || isnanf( imagf( out ) )) { |
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.
if ( isnanf( realf( out ) ) || isnanf( imagf( out ) )) { | |
if ( isnanf( realf( out ) ) ) { |
You only need to check one component for the purposes of this benchmark.
} | ||
} | ||
b.toc(); | ||
if ( isnanf( realf( out ) ) || isnanf( imagf( out ) )) { |
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.
if ( isnanf( realf( out ) ) || isnanf( imagf( out ) )) { | |
if ( isnanf( realf( out ) ) || isnanf( imagf( out ) ) ) { |
Progress #2039
Description
This pull request:
blas/base/cdotc
Related Issues
This pull request:
Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers