Skip to content

Commit 35b9284

Browse files
committed
docs: update comment and add comment
--- 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 ad1bad0 commit 35b9284

File tree

1 file changed

+3
-2
lines changed
  • lib/node_modules/@stdlib/blas/base/dger/lib

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ var isRowMajor = require( '@stdlib/ndarray/base/assert/is-row-major' );
7575
*
7676
* As may be observed, `A` stored in column-major order is equivalent to storing the transpose of `A` in row-major order, and storing `A` in row-major order is equivalent to storing the transpose of `A` in column-major order, and vice versa.
7777
*
78-
* Hence, we can interpret an `M` by `N` row-major matrix `B` as the matrix `A^T` stored in column-major. In which case, we can derive an update equation for `B` as follows:
78+
* Hence, we can interpret an `M` by `N` row-major matrix `B` as the matrix `A^T` stored in column-major order. In which case, we can derive an update equation for `B` as follows:
7979
*
8080
* ```tex
8181
* \begin{align*}
@@ -88,7 +88,7 @@ var isRowMajor = require( '@stdlib/ndarray/base/assert/is-row-major' );
8888
* \end{align*}
8989
* ```
9090
*
91-
* Accordingly, we can reuse the same loop logic for column-major and row-major `A` by simply swapping `x` and `y` and `M` and `N` when `A` is row-major. That is the essence of loop interchange.
91+
* Accordingly, we can reuse the same loop logic for column-major and row-major `A` by simply swapping `x` and `y` and `M` and `N` when `A` is row-major order. That is the essence of loop interchange.
9292
*
9393
* @private
9494
* @param {NonNegativeInteger} M - number of rows in the matrix `A`
@@ -164,6 +164,7 @@ function dger( M, N, alpha, x, strideX, offsetX, y, strideY, offsetY, A, strideA
164164
iy = offsetY;
165165
ia = offsetA;
166166
for ( i1 = 0; i1 < S1; i1++ ) {
167+
// Check whether we can avoid the inner loop entirely...
167168
if ( y[ iy ] === 0.0 ) {
168169
ia += da0 * S0;
169170
} else {

0 commit comments

Comments
 (0)