Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Sep 29, 2024
1 parent 3a30721 commit f52605d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 30 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

<details>

- [`0f8ee58`](https://github.com/stdlib-js/stdlib/commit/0f8ee58b842adebc77aeb2e6aebb41054ad6f3cd) - **docs:** fix overwriting of variables _(by Athan Reines)_
- [`929a224`](https://github.com/stdlib-js/stdlib/commit/929a2241acc3b3714fb01fcb4a9e295810df5bf5) - **feat:** add `blas/base/saxpy-wasm` [(#2956)](https://github.com/stdlib-js/stdlib/pull/2956) _(by Aman Bhansali, Athan Reines)_

</details>
Expand Down
60 changes: 30 additions & 30 deletions docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ interface ModuleConstructor {
* });
*
* // Create a BLAS routine:
* var saxpy = new saxpy.Module( mem );
* var mod = new saxpy.Module( mem );
* // returns <Module>
*
* // Initialize the routine:
* saxpy.initializeSync();
* mod.initializeSync();
*
* // Define a vector data type:
* var dtype = 'float32';
Expand All @@ -63,19 +63,19 @@ interface ModuleConstructor {
* var yptr = N * bytesPerElement( dtype );
*
* // Write vector values to module memory:
* saxpy.write( xptr, oneTo( N, dtype ) );
* saxpy.write( yptr, ones( N, dtype ) );
* mod.write( xptr, oneTo( N, dtype ) );
* mod.write( yptr, ones( N, dtype ) );
*
* // Perform computation:
* var ptr = saxpy.main( N, 5.0, xptr, 1, yptr, 1 );
* var ptr = mod.main( N, 5.0, xptr, 1, yptr, 1 );
* // returns <number>
*
* var bool = ( ptr === yptr );
* // returns true
*
* // Read out the results:
* var view = zeros( N, dtype );
* saxpy.read( yptr, view );
* mod.read( yptr, view );
* // view => <Float32Array>[ 6.0, 11.0, 16.0, 21.0, 26.0 ]
*/
new( mem: Memory ): Module; // newable
Expand All @@ -100,11 +100,11 @@ interface ModuleConstructor {
* });
*
* // Create a BLAS routine:
* var saxpy = saxpy.Module( mem );
* var mod = saxpy.Module( mem );
* // returns <Module>
*
* // Initialize the routine:
* saxpy.initializeSync();
* mod.initializeSync();
*
* // Define a vector data type:
* var dtype = 'float32';
Expand All @@ -117,19 +117,19 @@ interface ModuleConstructor {
* var yptr = N * bytesPerElement( dtype );
*
* // Write vector values to module memory:
* saxpy.write( xptr, oneTo( N, dtype ) );
* saxpy.write( yptr, ones( N, dtype ) );
* mod.write( xptr, oneTo( N, dtype ) );
* mod.write( yptr, ones( N, dtype ) );
*
* // Perform computation:
* var ptr = saxpy.main( N, 5.0, xptr, 1, yptr, 1 );
* var ptr = mod.main( N, 5.0, xptr, 1, yptr, 1 );
* // returns <number>
*
* var bool = ( ptr === yptr );
* // returns true
*
* // Read out the results:
* var view = zeros( N, dtype );
* saxpy.read( yptr, view );
* mod.read( yptr, view );
* // view => <Float32Array>[ 6.0, 11.0, 16.0, 21.0, 26.0 ]
*/
( mem: Memory ): Module; // callable
Expand Down Expand Up @@ -164,11 +164,11 @@ interface Module extends ModuleWrapper {
* });
*
* // Create a BLAS routine:
* var saxpy = new Module( mem );
* var mod = new saxpy.Module( mem );
* // returns <Module>
*
* // Initialize the routine:
* saxpy.initializeSync();
* mod.initializeSync();
*
* // Define a vector data type:
* var dtype = 'float32';
Expand All @@ -181,19 +181,19 @@ interface Module extends ModuleWrapper {
* var yptr = N * bytesPerElement( dtype );
*
* // Write vector values to module memory:
* saxpy.write( xptr, oneTo( N, dtype ) );
* saxpy.write( yptr, ones( N, dtype ) );
* mod.write( xptr, oneTo( N, dtype ) );
* mod.write( yptr, ones( N, dtype ) );
*
* // Perform computation:
* var ptr = saxpy.main( N, 5.0, xptr, 1, yptr, 1 );
* var ptr = mod.main( N, 5.0, xptr, 1, yptr, 1 );
* // returns <number>
*
* var bool = ( ptr === yptr );
* // returns true
*
* // Read out the results:
* var view = zeros( N, dtype );
* saxpy.read( yptr, view );
* mod.read( yptr, view );
* // view => <Float32Array>[ 6.0, 11.0, 16.0, 21.0, 26.0 ]
*/
main( N: number, alpha: number, xptr: number, strideX: number, yptr: number, strideY: number ): number;
Expand Down Expand Up @@ -225,11 +225,11 @@ interface Module extends ModuleWrapper {
* });
*
* // Create a BLAS routine:
* var saxpy = new Module( mem );
* var mod = new saxpy.Module( mem );
* // returns <Module>
*
* // Initialize the routine:
* saxpy.initializeSync();
* mod.initializeSync();
*
* // Define a vector data type:
* var dtype = 'float32';
Expand All @@ -242,19 +242,19 @@ interface Module extends ModuleWrapper {
* var yptr = N * bytesPerElement( dtype );
*
* // Write vector values to module memory:
* saxpy.write( xptr, oneTo( N, dtype ) );
* saxpy.write( yptr, ones( N, dtype ) );
* mod.write( xptr, oneTo( N, dtype ) );
* mod.write( yptr, ones( N, dtype ) );
*
* // Perform computation:
* var ptr = saxpy.ndarray( N, 5.0, xptr, 1, 0, yptr, 1, 0 );
* var ptr = mod.ndarray( N, 5.0, xptr, 1, 0, yptr, 1, 0 );
* // returns <number>
*
* var bool = ( ptr === yptr );
* // returns true
*
* // Read out the results:
* var view = zeros( N, dtype );
* saxpy.read( yptr, view );
* mod.read( yptr, view );
* // view => <Float32Array>[ 6.0, 11.0, 16.0, 21.0, 26.0 ]
*/
ndarray( N: number, alpha: number, xptr: number, strideX: number, offsetX: number, yptr: number, strideY: number, offsetY: number ): number;
Expand Down Expand Up @@ -330,11 +330,11 @@ interface Routine extends ModuleWrapper {
* });
*
* // Create a BLAS routine:
* var saxpy = new saxpy.Module( mem );
* var mod = new saxpy.Module( mem );
* // returns <Module>
*
* // Initialize the routine:
* saxpy.initializeSync();
* mod.initializeSync();
*
* // Define a vector data type:
* var dtype = 'float32';
Expand All @@ -347,19 +347,19 @@ interface Routine extends ModuleWrapper {
* var yptr = N * bytesPerElement( dtype );
*
* // Write vector values to module memory:
* saxpy.write( xptr, oneTo( N, dtype ) );
* saxpy.write( yptr, ones( N, dtype ) );
* mod.write( xptr, oneTo( N, dtype ) );
* mod.write( yptr, ones( N, dtype ) );
*
* // Perform computation:
* var ptr = saxpy.main( N, 5.0, xptr, 1, yptr, 1 );
* var ptr = mod.main( N, 5.0, xptr, 1, yptr, 1 );
* // returns <number>
*
* var bool = ( ptr === yptr );
* // returns true
*
* // Read out the results:
* var view = zeros( N, dtype );
* saxpy.read( yptr, view );
* mod.read( yptr, view );
* // view => <Float32Array>[ 6.0, 11.0, 16.0, 21.0, 26.0 ]
*/
Module: ModuleConstructor;
Expand Down

0 comments on commit f52605d

Please sign in to comment.