Skip to content

Commit

Permalink
chore: apply review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-095 committed Oct 18, 2024
1 parent b08c064 commit 5966fa0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
9 changes: 4 additions & 5 deletions lib/node_modules/@stdlib/blas/base/dscal-wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The function has the following parameters:
- **x**: input [`Float64Array`][@stdlib/array/float64].
- **strideX**: index increment for `x`.

The `N` and stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to multiply every other value in `x` by `alpha` in reverse order,
The `N` and stride parameters determine which elements in the input strided array are accessed at runtime. For example, to multiply every other value in `x` by `alpha` in reverse order,

```javascript
var Float64Array = require( '@stdlib/array/float64' );
Expand All @@ -68,10 +68,10 @@ Note that indexing is relative to the first index. To introduce an offset, use [
```javascript
var Float64Array = require( '@stdlib/array/float64' );

// Initial arrays...
// Initial array:
var x0 = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );

// Create offset view...
// Create a typed array view:
var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element

dscal.main( 3, 5.0, x1, -2 );
Expand All @@ -96,7 +96,7 @@ The function has the following additional parameters:
- **offsetX**: starting index for `x`.
- **offsetY**: starting index for `y`.

While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example, to multiply every other value in `x` by a constant `alpha` starting from the second element,
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to multiply every other value in `x` by a constant `alpha` starting from the second element,

```javascript
var Float64Array = require( '@stdlib/array/float64' );
Expand Down Expand Up @@ -242,7 +242,6 @@ console.log( view );
The function has the following additional parameters:

- **ox**: starting index for `x`.
- **oy**: starting index for `y`.

</section>

Expand Down
6 changes: 3 additions & 3 deletions lib/node_modules/@stdlib/blas/base/dscal-wasm/docs/repl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@
Reallocates the underlying WebAssembly memory instance to a specified number
of bytes.

WebAssembly memory can only **grow**, not shrink. Hence, if provided a
number of bytes which is less than or equal to the size of the current
memory, the function does nothing.
WebAssembly memory can only *grow*, not shrink. Hence, if provided a number
of bytes which is less than or equal to the size of the current memory, the
function does nothing.

When non-shared memory is resized, the underlying the `ArrayBuffer` is
detached, consequently invalidating any associated typed array views. Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,6 @@ interface Routine extends ModuleWrapper {
* @param alpha - constant
* @param x - input array
* @param strideX - `x` stride length
* @param y - output array
* @param strideY - `y` stride length
* @returns input array
*
* @example
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/base/dscal-wasm/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* var Float64Array = require( '@stdlib/array/float64' );
* var dscal = require( '@stdlib/blas/base/dscal-wasm' );
*
* // Define z strided array:
* // Define a strided array:
* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
*
* // Perform operation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ setReadOnly( Module.prototype, 'main', function dscal( N, alpha, xptr, strideX )
* @param {NonNegativeInteger} xptr - input array pointer (i.e., byte offset)
* @param {integer} strideX - `x` stride length
* @param {NonNegativeInteger} offsetX - starting `x` index
* @returns {NonNegativeInteger} output array pointer (i.e., byte offset)
* @returns {NonNegativeInteger} input array pointer (i.e., byte offset)
*
* @example
* var Memory = require( '@stdlib/wasm/memory' );
Expand Down

0 comments on commit 5966fa0

Please sign in to comment.