Open
Changes from 1 commit
Show all changes
43 commits
Select commit Hold shift + click to select a range
191fc91
feat: add base implementation
aayush0325May 12, 2025
08cc97d
feat: add main export
aayush0325May 12, 2025
3a12298
test: add initial tests
aayush0325May 12, 2025
080ed50
test: add P job test
aayush0325May 12, 2025
02f5d2d
test: add test for S job
aayush0325May 12, 2025
0b4af09
test: add test for job = B
aayush0325May 12, 2025
aeaff94
test: add ndarray tests
aayush0325May 12, 2025
03a6986
chore: cleanup
aayush0325May 12, 2025
5f956b0
test: add tests for empty submatrix
aayush0325May 13, 2025
4ab0380
test: add more tests
aayush0325May 13, 2025
8192ae8
test: add test for norm = 0
aayush0325May 13, 2025
f70eec0
test: add test for small values
aayush0325May 13, 2025
c9ded98
refactor: update job names
aayush0325May 13, 2025
2c45388
test: add tests with weird values
aayush0325May 13, 2025
6d755ca
test: add ndarray tests
aayush0325May 13, 2025
91366cd
test: add some tests
aayush0325May 14, 2025
ecf4a87
test: more negative stride tests
aayush0325May 14, 2025
91d0ec8
test: add tests for negative strides
aayush0325May 14, 2025
7631cba
chore: clean up
aayush0325May 14, 2025
7030f4d
test: add offset tests
aayush0325May 15, 2025
f6fcf1d
test: add tests for mixed strides
aayush0325May 15, 2025
f6054c2
test: add tests for large strides
aayush0325May 15, 2025
099194a
docs: add examples
aayush0325May 15, 2025
2ca9245
bench: add benchmarks and cleanup
aayush0325May 16, 2025
a69fa0b
fix: out should be an int32array because it contains indices
aayush0325May 16, 2025
2ac5b9c
chore: remove decimals from int32arrays
aayush0325May 16, 2025
ee1d3a1
chore: cleanupp
aayush0325May 16, 2025
eb38b48
docs: update docs
aayush0325May 16, 2025
b516efd
docs: add ts declaration file
aayush0325May 16, 2025
3f05266
test: add ts test file
aayush0325May 16, 2025
c86cd76
docs: add repl.txt
aayush0325May 16, 2025
51b8662
docs: add readme
aayush0325May 17, 2025
115d185
chore: linting error
aayush0325May 17, 2025
944cc60
chore: linting error
aayush0325May 17, 2025
bd0084f
chore: move variables to a separate section
aayush0325May 18, 2025
09f01ca
chore: update error message
aayush0325May 21, 2025
50a4de1
chore: update error mesages
aayush0325May 21, 2025
0c607b9
chore: resolve conflicts
aayush0325May 22, 2025
021712f
refactor: pointer arithmetics
aayush0325May 22, 2025
89c3b1c
refactor: pointer arithmetic
aayush0325May 22, 2025
5f0fdaa
refactor: pointer arithmetic
aayush0325May 22, 2025
d50308b
refactor: pointer arithmetic
aayush0325May 22, 2025
ff55902
refactor: pointer arithmetic
aayush0325May 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Failed to load files.
Previous commit
Next commit
test: add test for norm = 0
---
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
---
  • Loading branch information
@aayush0325
aayush0325 committedMay 13, 2025
commit 8192ae8180b0590f2b8e8e6bafa4806e6dce4ead
Original file line numberDiff line numberDiff line change
Expand Up@@ -543,3 +543,69 @@ tape( 'the function returns expected values for job = B with complex input (colu
t.deepEqual( scale, expectedScale, 'returns expected value' );
t.end();
});

tape( 'the function returns expected values for job = S with zero norm (row-major)', function test( t ) {
var expectedScale;
var expectedOut;
var expectedA;
var scale;
var info;
var out;
var A;

A = new Float64Array([
1.0, 0.0, 4.0,
2.0, 0.0, 5.0,
3.0, 0.0, 6.0
]);
out = new Float64Array( 2 );
scale = new Float64Array( 3 );

expectedOut = new Float64Array( [ 0.0, 2.0 ] );
expectedScale = new Float64Array( [ 1.0, 1.0, 1.0 ] );
expectedA = new Float64Array([
1.0, 0.0, 4.0,
2.0, 0.0, 5.0,
3.0, 0.0, 6.0
]);

info = dgebal( 'row-major', 'S', 3, A, 3, out, scale );
t.strictEqual( info, 0, 'returns expected value' );
t.deepEqual( out, expectedOut, 'returns expected value' );
t.deepEqual( A, expectedA, 'returns expected value' );
t.deepEqual( scale, expectedScale, 'returns expected value' );
t.end();
});

tape( 'the function returns expected values for job = S with zero norm (column-major)', function test( t ) {
var expectedScale;
var expectedOut;
var expectedA;
var scale;
var info;
var out;
var A;

A = new Float64Array([
1.0, 2.0, 3.0,
0.0, 0.0, 0.0,
4.0, 5.0, 6.0
]);
out = new Float64Array( 2 );
scale = new Float64Array( 3 );

expectedOut = new Float64Array( [ 0.0, 2.0 ] );
expectedScale = new Float64Array( [ 1.0, 1.0, 1.0 ] );
expectedA = new Float64Array([
1.0, 2.0, 3.0,
0.0, 0.0, 0.0,
4.0, 5.0, 6.0
]);

info = dgebal( 'column-major', 'S', 3, A, 3, out, scale );
t.strictEqual( info, 0, 'returns expected value' );
t.deepEqual( out, expectedOut, 'returns expected value' );
t.deepEqual( A, expectedA, 'returns expected value' );
t.deepEqual( scale, expectedScale, 'returns expected value' );
t.end();
});