Skip to content

Commit c775b09

Browse files
committed
chore: apply review changes
--- 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: missing_dependencies - task: lint_c_examples status: missing_dependencies - task: lint_c_benchmarks status: missing_dependencies - 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 492dade commit c775b09

File tree

5 files changed

+35
-32
lines changed

5 files changed

+35
-32
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
@license Apache-2.0
44
5-
Copyright (c) 2024 The Stdlib Authors.
5+
Copyright (c) 2025 The Stdlib Authors.
66
77
Licensed under the Apache License, Version 2.0 (the "License");
88
you may not use this file except in compliance with the License.
@@ -184,14 +184,15 @@ console.log( A );
184184

185185
```c
186186
#include "stdlib/blas/base/ssyr.h"
187-
#include "stdlib/blas/base/shared.h"
188187
```
189188

190189
#### c_ssyr( order, uplo, N, alpha, \*X, strideX, \*A, LDA )
191190

192191
Performs the symmetric rank 1 operation `A = α*x*x^T + A`.
193192

194193
```c
194+
#include "stdlib/blas/base/shared.h"
195+
195196
float A[] = { 1.0f, 0.0f, 0.0f, 2.0f, 1.0f, 0.0f, 3.0f, 2.0f, 1.0f };
196197
const float x[] = { 1.0f, 2.0f, 3.0f };
197198

@@ -218,6 +219,8 @@ void c_ssyr( const CBLAS_LAYOUT order, const CBLAS_UPLO uplo, const CBLAS_INT N,
218219
Performs the symmetric rank 1 operation `A = α*x*x^T + A` using alternative indexing semantics.
219220

220221
```c
222+
#include "stdlib/blas/base/shared.h"
223+
221224
float A[] = { 1.0f, 2.0f, 3.0f, 0.0f, 1.0f, 2.0f, 0.0f, 0.0f, 1.0f };
222225
const float x[] = { 1.0f, 2.0f, 3.0f };
223226

@@ -269,7 +272,7 @@ int main( void ) {
269272
float A[] = { 1.0f, 0.0f, 0.0f, 2.0f, 1.0f, 0.0f, 3.0f, 2.0f, 1.0f };
270273
const float x[] = { 1.0f, 2.0f, 3.0f };
271274

272-
// Specify the number of elements:
275+
// Specify the number of elements along each dimension of `A`:
273276
const int N = 3;
274277

275278
// Perform the symmetric rank 1 operation `A = α*x*x^T + A`:

lib/node_modules/@stdlib/blas/base/ssyr/benchmark/c/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ LIBRARIES ?=
8282
LIBPATH ?=
8383

8484
# List of C targets:
85-
c_targets := benchmark.length.out
85+
c_targets := benchmark.out
8686

8787

8888
# RULES #

lib/node_modules/@stdlib/blas/base/ssyr/benchmark/c/benchmark.length.c renamed to lib/node_modules/@stdlib/blas/base/ssyr/benchmark/c/benchmark.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,21 @@ static float rand_float( void ) {
9494
* Runs a benchmark.
9595
*
9696
* @param iterations number of iterations
97-
* @param len array length
98-
* @return elapsed time in seconds
97+
* @param N number of elements along each dimension
98+
* @return elapsed time in seconds
9999
*/
100-
static double benchmark1( int iterations, int len ) {
100+
static double benchmark1( int iterations, int N ) {
101101
double elapsed;
102-
float A[ len*len ];
103-
float x[ len ];
102+
float A[ N*N ];
103+
float x[ N ];
104104
double t;
105105
int i;
106106

107-
stdlib_strided_sfill( len, 0.5f, x, 1 );
108-
stdlib_strided_sfill( len*len, 1.0f, A, 1 );
107+
stdlib_strided_sfill( N, 0.5f, x, 1 );
108+
stdlib_strided_sfill( N*N, 1.0f, A, 1 );
109109
t = tic();
110110
for ( i = 0; i < iterations; i++ ) {
111-
c_ssyr( CblasRowMajor, CblasUpper, len, 1.0, x, 1, A, len );
111+
c_ssyr( CblasRowMajor, CblasUpper, N, 1.0, x, 1, A, N );
112112
if ( A[ 0 ] != A[ 0 ] ) {
113113
printf( "should not return NaN\n" );
114114
break;
@@ -125,21 +125,21 @@ static double benchmark1( int iterations, int len ) {
125125
* Runs a benchmark.
126126
*
127127
* @param iterations number of iterations
128-
* @param len array length
129-
* @return elapsed time in seconds
128+
* @param N number of elements along each dimension
129+
* @return elapsed time in seconds
130130
*/
131-
static double benchmark2( int iterations, int len ) {
131+
static double benchmark2( int iterations, int N ) {
132132
double elapsed;
133-
float A[ len*len ];
134-
float x[ len ];
133+
float A[ N*N ];
134+
float x[ N ];
135135
double t;
136136
int i;
137137

138-
stdlib_strided_sfill( len, 0.5f, x, 1 );
139-
stdlib_strided_sfill( len*len, 1.0f, A, 1 );
138+
stdlib_strided_sfill( N, 0.5f, x, 1 );
139+
stdlib_strided_sfill( N*N, 1.0f, A, 1 );
140140
t = tic();
141141
for ( i = 0; i < iterations; i++ ) {
142-
c_ssyr_ndarray( CblasUpper, len, 1.0, x, 1, 0, A, len, 1, 0 );
142+
c_ssyr_ndarray( CblasUpper, N, 1.0, x, 1, 0, A, N, 1, 0 );
143143
if ( A[ 0 ] != A[ 0 ] ) {
144144
printf( "should not return NaN\n" );
145145
break;
@@ -159,29 +159,29 @@ int main( void ) {
159159
double elapsed;
160160
int count;
161161
int iter;
162-
int len;
163162
int i;
164163
int j;
164+
int N;
165165

166166
// Use the current time to seed the random number generator:
167167
srand( time( NULL ) );
168168

169169
print_version();
170170
count = 0;
171171
for ( i = MIN; i <= MAX; i++ ) {
172-
len = stdlib_base_floorf( pow( pow( 10, i ), 1.0/2.0 ) );
172+
N = stdlib_base_floorf( pow( pow( 10, i ), 1.0/2.0 ) );
173173
iter = ITERATIONS / pow( 10, i-1 );
174174
for ( j = 0; j < REPEATS; j++ ) {
175175
count += 1;
176-
printf( "# c::%s:len=%d\n", NAME, len );
177-
elapsed = benchmark1( iter, len );
176+
printf( "# c::%s:size=%d\n", NAME, N*N );
177+
elapsed = benchmark1( iter, N );
178178
print_results( iter, elapsed );
179179
printf( "ok %d benchmark finished\n", count );
180180
}
181181
for ( j = 0; j < REPEATS; j++ ) {
182182
count += 1;
183-
printf( "# c::%s:ndarray:len=%d\n", NAME, len );
184-
elapsed = benchmark2( iter, len );
183+
printf( "# c::%s:ndarray:size=%d\n", NAME, N*N );
184+
elapsed = benchmark2( iter, N );
185185
print_results( iter, elapsed );
186186
printf( "ok %d benchmark finished\n", count );
187187
}

lib/node_modules/@stdlib/blas/base/ssyr/examples/c/example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ int main( void ) {
2525
float A[] = { 1.0f, 0.0f, 0.0f, 2.0f, 1.0f, 0.0f, 3.0f, 2.0f, 1.0f };
2626
const float x[] = { 1.0f, 2.0f, 3.0f };
2727

28-
// Specify the number of elements:
28+
// Specify the number of elements along each dimension of `A`:
2929
const int N = 3;
3030

3131
// Perform the symmetric rank 1 operation `A = α*x*x^T + A`:

lib/node_modules/@stdlib/blas/base/ssyr/src/ssyr.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
* @param uplo specifies whether the upper or lower triangular part of the symmetric matrix `A` should be referenced
2929
* @param N number of elements along each dimension of `A`
3030
* @param alpha scalar
31-
* @param x input vector
32-
* @param strideX `x` stride length
31+
* @param X input vector
32+
* @param strideX `X` stride length
3333
* @param A input matrix
3434
* @param LDA stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
3535
*/
@@ -59,9 +59,9 @@ void API_SUFFIX(c_ssyr)( const CBLAS_LAYOUT order, const CBLAS_UPLO uplo, const
5959
* @param uplo specifies whether the upper or lower triangular part of the symmetric matrix `A` should be referenced
6060
* @param N number of elements along each dimension of `A`
6161
* @param alpha scalar
62-
* @param x input vector
63-
* @param strideX `x` stride length
64-
* @param offsetX starting index of `x`
62+
* @param X input vector
63+
* @param strideX `X` stride length
64+
* @param offsetX starting index of `X`
6565
* @param A input matrix
6666
* @param strideA1 stride of the first dimension of `A`
6767
* @param strideA2 stride of the second dimension of `A`

0 commit comments

Comments
 (0)