Skip to content

Commit 9edb8f3

Browse files
authored
Apply suggestions from code review
Signed-off-by: Athan <[email protected]>
1 parent d871fbd commit 9edb8f3

File tree

1 file changed

+7
-6
lines changed
  • lib/node_modules/@stdlib/blas/base/dsyr

1 file changed

+7
-6
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ Note that indexing is relative to the first index. To introduce an offset, use [
7575
var Float64Array = require( '@stdlib/array/float64' );
7676

7777
// Initial arrays...
78-
var x0 = new Float64Array( [ 1.0, 1.0, 1.0, 1.0 ] );
78+
var x0 = new Float64Array( [ 0.0, 3.0, 2.0, 1.0 ] );
7979
var A = new Float64Array( [ 1.0, 2.0, 3.0, 2.0, 1.0, 2.0, 3.0, 2.0, 1.0 ] );
8080

8181
// Create offset views...
8282
var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
8383

8484
dsyr( 'row-major', 'upper', 3, 1.0, x1, -1, A, 3 );
85-
// A => <Float64Array>[ 2.0, 3.0, 4.0, 2.0, 2.0, 3.0, 3.0, 2.0, 2.0 ]
85+
// A => <Float64Array>[ 2.0, 4.0, 6.0, 2.0, 5.0, 8.0, 3.0, 2.0, 10.0 ]
8686
```
8787

8888
#### dsyr.ndarray( uplo, N, α, x, sx, ox, A, sa1, sa2, oa )
@@ -149,10 +149,11 @@ var opts = {
149149

150150
var N = 3;
151151

152-
// Define 3x3 symmetric matrices:
152+
// Create N-by-N symmetric matrices:
153153
var A1 = ones( N*N, opts.dtype );
154154
var A2 = ones( N*N, opts.dtype );
155155

156+
// Create a random vector:
156157
var x = discreteUniform( N, -10.0, 10.0, opts );
157158

158159
dsyr( 'row-major', 'upper', 3, 1.0, x, 1, A1, 3 );
@@ -217,7 +218,7 @@ The function accepts the following arguments:
217218
- **LDA**: `[in] CBLAS_INT` stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`).
218219
219220
```c
220-
void c_dsyr( const CBLAS_LAYOUT layout, const CBLAS_UPLO uplo, const CBLAS_INT N, const double alpha, const double *x, const CBLAS_INT strideX, double *A, const CBLAS_INT LDA )
221+
void c_dsyr( const CBLAS_LAYOUT layout, const CBLAS_UPLO uplo, const CBLAS_INT N, const double alpha, const double *X, const CBLAS_INT strideX, double *A, const CBLAS_INT LDA )
221222
```
222223

223224
#### c_dsyr_ndarray( uplo, N, alpha, \*X, sx, ox, \*A, sa1, sa2, oa )
@@ -247,7 +248,7 @@ The function accepts the following arguments:
247248
- **oa**: `[in] CBLAS_INT` starting index for `A`.
248249
249250
```c
250-
void c_dsyr_ndarray( const CBLAS_UPLO uplo, const CBLAS_INT N, const double alpha, const double *x, const CBLAS_INT strideX, const CBLAS_INT offsetX, double *A, const CBLAS_INT strideA1, const CBLAS_INT strideA2, const CBLAS_INT offsetA )
251+
void c_dsyr_ndarray( const CBLAS_UPLO uplo, const CBLAS_INT N, const double alpha, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, double *A, const CBLAS_INT strideA1, const CBLAS_INT strideA2, const CBLAS_INT offsetA )
251252
```
252253

253254
</section>
@@ -301,7 +302,7 @@ int main( void ) {
301302
printf( "A1[ %i ] = %f\n", i, A1[ i ] );
302303
}
303304

304-
// Perform the symmetric rank 1 operation `A = α*x*x^T + A` using alternative semantics indexing:
305+
// Perform the symmetric rank 1 operation `A = α*x*x^T + A` using alternative indexing semantics:
305306
c_dsyr_ndarray( CblasUpper, N, 1.0, x, 1, 0, A2, N, 1, 0 );
306307

307308
// Print the result:

0 commit comments

Comments
 (0)