Skip to content

Commit ad1bad0

Browse files
committed
docs: update extended 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 fb6a928 commit ad1bad0

File tree

1 file changed

+46
-1
lines changed
  • lib/node_modules/@stdlib/blas/base/dger/lib

1 file changed

+46
-1
lines changed

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

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,52 @@ var isRowMajor = require( '@stdlib/ndarray/base/assert/is-row-major' );
3030
*
3131
* ## Notes
3232
*
33-
* - To help motivate the use of loop interchange below, we first recognize that a matrix stored in row-major order is equivalent to storing the matrix's transpose in column-major order. 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:
33+
* - To help motivate the use of loop interchange below, we first recognize that a matrix stored in row-major order is equivalent to storing the matrix's transpose in column-major order. For example, consider the following 2-by-3 matrix `A`
34+
*
35+
* ```tex
36+
* A = \begin{bmatrix}
37+
* 1 & 2 & 3 \\
38+
* 4 & 5 & 6
39+
* \end{bmatrix}
40+
* ```
41+
*
42+
* When stored in a linear buffer in column-major order, `A` becomes
43+
*
44+
* ```text
45+
* [ 1 4 2 5 3 6]
46+
* ```
47+
*
48+
* When stored in a linear buffer in row-major order, `A` becomes
49+
*
50+
* ```text
51+
* [ 1 2 3 4 5 6]
52+
* ```
53+
*
54+
* Now consider the transpose of `A`
55+
*
56+
* ```tex
57+
* A^T = \begin{bmatrix}
58+
* 1 & 4 \\
59+
* 2 & 5 \\
60+
* 3 & 6
61+
* \end{bmatrix}
62+
* ```
63+
*
64+
* When the transpose is stored in a linear buffer in column-major order, the transpose becomes
65+
*
66+
* ```text
67+
* [ 1 2 3 4 5 6 ]
68+
* ```
69+
*
70+
* Similarly, when stored in row-major order, the transpose becomes
71+
*
72+
* ```text
73+
* [ 1 4 2 5 3 6 ]
74+
* ```
75+
*
76+
* 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.
77+
*
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:
3479
*
3580
* ```tex
3681
* \begin{align*}

0 commit comments

Comments
 (0)