Skip to content

Commit 60ec836

Browse files
committed
chore: clean-up
--- 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: 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 ---
1 parent ac3bbe0 commit 60ec836

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

lib/node_modules/@stdlib/blas/base/strmm/lib/base.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -256,16 +256,15 @@ function strmm( side, uplo, transa, diag, M, N, alpha, A, strideA1, strideA2, of
256256
for ( j = N - 1; j >= 0; j-- ) {
257257
if ( nonunit ) {
258258
oa2 = offsetA + ( j * sa1 ) + ( j * sa0 );
259-
tmp = f32( alpha * A[ oa2 ] );
259+
tmp = f32( A[ oa2 ] );
260260
for ( i = 0; i < M; i++ ) {
261261
ob2 = offsetB + ( i * sb1 ) + ( j * sb0 );
262262
B[ ob2 ] = f32( B[ ob2 ] * tmp );
263263
}
264-
} else if ( alpha !== 1.0 ) {
265-
for ( i = 0; i < M; i++ ) {
266-
ob2 = offsetB + ( i * sb1 ) + ( j * sb0 );
267-
B[ ob2 ] = f32( B[ ob2 ] * alpha );
268-
}
264+
}
265+
for ( i = 0; i < M; i++ ) {
266+
ob2 = offsetB + ( i * sb1 ) + ( j * sb0 );
267+
B[ ob2 ] = f32( B[ ob2 ] * alpha );
269268
}
270269
for ( k = 0; k < j; k++ ) {
271270
oa2 = offsetA + ( k * sa1 ) + ( j * sa0 );
@@ -287,16 +286,15 @@ function strmm( side, uplo, transa, diag, M, N, alpha, A, strideA1, strideA2, of
287286
for ( j = 0; j < N; j++ ) {
288287
if ( nonunit ) {
289288
oa2 = offsetA + ( j * sa1 ) + ( j * sa0 );
290-
tmp = f32( alpha * A[ oa2 ] );
289+
tmp = f32( A[ oa2 ] );
291290
for ( i = 0; i < M; i++ ) {
292291
ob2 = offsetB + ( i * sb1 ) + ( j * sb0 );
293292
B[ ob2 ] = f32( B[ ob2 ] * tmp );
294293
}
295-
} else if ( alpha !== 1.0 ) {
296-
for ( i = 0; i < M; i++ ) {
297-
ob2 = offsetB + ( i * sb1 ) + ( j * sb0 );
298-
B[ ob2 ] = f32( B[ ob2 ] * alpha );
299-
}
294+
}
295+
for ( i = 0; i < M; i++ ) {
296+
ob2 = offsetB + ( i * sb1 ) + ( j * sb0 );
297+
B[ ob2 ] = f32( B[ ob2 ] * alpha );
300298
}
301299
for ( k = j + 1; k < N; k++ ) {
302300
oa2 = offsetA + ( k * sa1 ) + ( j * sa0 );

lib/node_modules/@stdlib/blas/base/strmm/test/fixtures/row_major_r_l_nta_nu.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"diag": "non-unit",
77
"M": 3,
88
"N": 3,
9-
"alpha": 1.0,
9+
"alpha": 2.0,
1010
"A": [ 1.0, 0.0, 0.0, 4.0, 5.0, 0.0, 7.0, 8.0, 9.0 ],
1111
"A_mat": [
1212
[ 1.0, 0.0, 0.0 ],
@@ -21,5 +21,5 @@
2121
[ 7.0, 8.0, 9.0 ]
2222
],
2323
"ldb": 3,
24-
"B_out": [ 30.0, 34.0, 27.0, 66.0, 73.0, 54.0, 102.0, 112.0, 81.0 ]
24+
"B_out": [ 60.0, 68.0, 54.0, 132.0, 146.0, 108.0, 204.0, 224.0, 162.0 ]
2525
}

lib/node_modules/@stdlib/blas/base/strmm/test/fixtures/row_major_r_u_nta_nu.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"diag": "non-unit",
77
"M": 3,
88
"N": 3,
9-
"alpha": 1.0,
9+
"alpha": 2.0,
1010
"A": [ 1.0, 2.0, 3.0, 0.0, 5.0, 6.0, 0.0, 0.0, 9.0 ],
1111
"A_mat": [
1212
[ 1.0, 2.0, 3.0 ],
@@ -21,5 +21,5 @@
2121
[ 7.0, 8.0, 9.0 ]
2222
],
2323
"ldb": 3,
24-
"B_out": [ 1.0, 12.0, 42.0, 4.0, 33.0, 96.0, 7.0, 54.0, 150.0 ]
24+
"B_out": [ 2.0, 24.0, 84.0, 8.0, 66.0, 192.0, 14.0, 108.0, 300.0 ]
2525
}

0 commit comments

Comments
 (0)