Skip to content

Commit a2ee0c5

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: passed - 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: 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 bc7227e commit a2ee0c5

File tree

1 file changed

+12
-6
lines changed
  • lib/node_modules/@stdlib/blas/base/dgemv

1 file changed

+12
-6
lines changed

lib/node_modules/@stdlib/blas/base/dgemv/README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,24 +294,30 @@ void c_dgemv_ndarray( const CBLAS_TRANSPOSE trans, const CBLAS_INT M, const CBLA
294294
#include <stdio.h>
295295

296296
int main( void ) {
297-
// Create a strided array:
298-
const double A[] = { 1.0, 0.0, 0.0, 2.0, 1.0, 0.0, 3.0, 2.0, 1.0 };
299-
const double x[] = { 1.0, 2.0, 3.0 };
300-
double y[] = { 1.0, 2.0, 3.0 };
297+
// Define a 3x3 matrix stored in row-major order:
298+
double A[ 3*3 ] = {
299+
0.0, 0.0, 0.0,
300+
0.0, 0.0, 0.0,
301+
0.0, 0.0, 0.0
302+
};
303+
304+
// Define `x` and `y` vectors:
305+
const double x[ 3 ] = { 1.0, 2.0, 3.0 };
306+
double y[ 3 ] = { 1.0, 2.0, 3.0 };
301307

302308
// Specify the number of elements along each dimension of `A`:
303309
const int M = 3;
304310
const int N = 3;
305311

306-
// Perform the matrix-vector operations `y = α*A*x + β*y`:
312+
// Perform the matrix-vector operation `y = α*A*x + β*y`:
307313
c_dgemv( CblasRowMajor, CblasNoTrans, M, N, 1.0, A, M, x, 1, 1.0, y, 1 );
308314

309315
// Print the result:
310316
for ( int i = 0; i < N; i++ ) {
311317
printf( "y[ %i ] = %lf\n", i, y[ i ] );
312318
}
313319

314-
// Perform the symmetric rank 2 operation `A = α*x*y^T + α*y*x^T + A`:
320+
// Perform the matrix-vector operation `y = α*A*x + β*y`:
315321
c_dgemv_ndarray( CblasNoTrans, 3, 3, 1.0, A, 3, 1, 0, x, 1, 0, 1.0, y, 1, 0 );
316322

317323
// Print the result:

0 commit comments

Comments
 (0)