You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var floor =require( '@stdlib/math/base/special/floor' );
65
67
66
68
// Initial array...
@@ -96,6 +98,8 @@ The function accepts the following additional parameters:
96
98
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 sum the last three elements,
var x =newFloat64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
87
93
88
94
var sum =dasum.ndarray( x.length, x, 1, 0 );
@@ -96,6 +102,8 @@ The function accepts the following additional parameters:
96
102
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 sum the last three elements,
@@ -189,6 +202,8 @@ var bytes = wasm.malloc( 64 );
189
202
Returns a value at a specific memory address (represented by a byte index). By default, the function returns a `double`. Possible types include: `'i8'`, `'i16'`, `'i32'`, `'i64'`, `'float'`, and `'double'`.
While this method may be convenient when interacting with the bytes view directly, using a [`typed array`][mdn-typed-array] view is likely to be more performant.
Sets a value at a specific memory address (represented by a byte index). By default, the function sets a `double`. Possible types include: `'i8'`, `'i16'`, `'i32'`, `'i64'`, `'float'`, and `'double'`.
While this method may be convenient when interacting with the bytes view directly, using a [`typed array`][mdn-typed-array] view is likely to be more performant.
var x =newFloat64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
19
21
var y =newFloat64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );
20
22
var alpha =5.0;
@@ -35,6 +37,7 @@ The function accepts the following parameters:
35
37
The `N` and `stride` parameters determine which elements in `x` and `y` are accessed at runtime. For example, to multiply every other value in `x` by `alpha` and add the result to the first `N` elements of `y` in reverse order,
var x =newFloat64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
75
81
var y =newFloat64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );
76
82
var alpha =5.0;
@@ -87,6 +93,7 @@ The function accepts the following additional parameters:
87
93
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the `offsetX` and `offsetY` 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 value and add to the last `N` elements in `y` where `x[i] -> y[n]`, `x[i+2] -> y[n-1]`,...,
@@ -206,6 +218,8 @@ var bytes = wasm.malloc( 64 );
206
218
Returns a value at a specific memory address (represented by a byte index). By default, the function returns a `double`. Possible types include: `'i8'`, `'i16'`, `'i32'`, `'i64'`, `'float'`, and `'double'`.
While this method may be convenient when interacting with the bytes view directly, using a [`typed array`][mdn-typed-array] view is likely to be more performant.
Sets a value at a specific memory address (represented by a byte index). By default, the function sets a `double`. Possible types include: `'i8'`, `'i16'`, `'i32'`, `'i64'`, `'float'`, and `'double'`.
While this method may be convenient when interacting with the bytes view directly, using a [`typed array`][mdn-typed-array] view is likely to be more performant.
var x =newFloat64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
19
21
var y =newFloat64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );
20
22
@@ -33,6 +35,7 @@ The function accepts the following parameters:
33
35
The `N` and `stride` parameters determine how values from `x` are copied into `y`. For example, to copy in reverse order every other value in `x` into the first `N` elements of `y`,
var x =newFloat64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
73
79
var y =newFloat64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );
74
80
@@ -84,6 +90,7 @@ The function accepts the following additional parameters:
84
90
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the `offsetX` and `offsetY` parameters support indexing semantics based on starting indices. For example, to copy every other value in `x` starting from the second value into the last `N` elements in `y` where `x[i] = y[n]`, `x[i+2] = y[n-1]`,...,
var x =newFloat32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );
87
93
88
94
var sum =sasum.ndarray( x.length, x, 1, 0 );
@@ -96,6 +102,8 @@ The function accepts the following additional parameters:
96
102
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 sum the last three elements,
0 commit comments