Skip to content

Commit 0706df5

Browse files
committed
chore: test w different fixtures???
--- 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 ---
1 parent ec7f59a commit 0706df5

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

lib/node_modules/@stdlib/lapack/base/dorm2r/lib/base.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,28 +109,25 @@ function dorm2r( side, trans, M, N, K, A, strideA1, strideA2, offsetA, tau, stri
109109
// Initialize dimensions
110110
if ( left ) {
111111
ni = N;
112-
jc = 0; // 0-based indexing
112+
jc = 1;
113113
} else {
114114
mi = M;
115-
ic = 0; // 0-based indexing
115+
ic = 1;
116116
}
117117

118-
// Main loop
119-
for ( i = i1; ( i3 > 0 ) ? ( i <= i2 ) : ( i >= i2 ); i += i3 ) {
118+
for ( i = i1; ( i3 > 0 ) ? ( i <= i2 ) : ( i >= i2 ); i += i3 ) { // loop going from 1..K or K..1
120119
if ( left ) {
121-
// H(i) is applied to C(i:m,1:n)
122120
mi = M - i + 1;
123-
ic = i - 1; // Convert to 0-based indexing
121+
ic = i;
124122
} else {
125-
// H(i) is applied to C(1:m,i:n)
126123
ni = N - i + 1;
127-
jc = i - 1; // Convert to 0-based indexing
124+
jc = i;
128125
}
129126

130-
// Apply H(i) using `dlarf1f`
131127
tauVal = tau[ offsetTau + ( ( i - 1 ) * strideTau ) ];
132128
aOffset = offsetA + ( ( i - 1 ) * strideA1 ) + ( ( i - 1 ) * strideA2 );
133-
cOffset = offsetC + ( ic * strideC1 ) + ( jc * strideC2 );
129+
cOffset = offsetC + ( (ic-1) * strideC1 ) + ( (jc-1) * strideC2 );
130+
134131
dlarf1f( side, mi, ni, A, strideA1, aOffset, tauVal, C, strideC1, strideC2, cOffset, work, strideWork, offsetWork ); // eslint-disable-line max-len
135132
}
136133

lib/node_modules/@stdlib/lapack/base/dorm2r/test/fixtures/left_trans_row_major.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
"K": 3,
88

99
"A_mat": [
10-
[ 10.0, 0.0, 0.0 ],
11-
[ 20.0, 30.0, 0.0 ],
10+
[ 10.0, 200.0, 123.0 ],
11+
[ 20.0, 30.0, 200.0 ],
1212
[ 40.0, 50.0, 60.0 ]
1313
],
1414
"LDA": 3,
1515
"strideA1": 3,
1616
"strideA2": 1,
1717
"offsetA": 0,
18-
"A": [ 10.0, 0.0, 0.0, 20.0, 30.0, 0.0, 40.0, 50.0, 60.0 ],
18+
"A": [ 10.0, 200.0, 123.0, 20.0, 30.0, 200.0, 40.0, 50.0, 60.0 ],
1919

2020
"tau": [ 2.0, 3.0, 4.0 ],
2121
"strideTau": 1,

lib/node_modules/@stdlib/lapack/base/dorm2r/test/test.dorm2r.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ tape( 'the function applies Q from the left without transpose (column-major)', f
314314
t.end();
315315
});
316316

317-
tape( 'the function applies Q from the left with transpose (row-major)', function test( t ) {
317+
tape.only( 'the function applies Q from the left with transpose (row-major)', function test( t ) {
318318
var expected;
319319
var work;
320320
var data;

0 commit comments

Comments
 (0)