Skip to content

Commit 0ea7c6c

Browse files
committed
fix: implement changes from review
update manifest.json, docs/repl.txt
1 parent 68a73fb commit 0ea7c6c

File tree

2 files changed

+38
-11
lines changed

2 files changed

+38
-11
lines changed

lib/node_modules/@stdlib/blas/ext/base/sapx/docs/repl.txt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11

22
{{alias}}( N, alpha, x, stride )
3-
Adds a constant to each element in a single-precision floating-point strided
4-
array.
3+
Adds a constant to each element in a single-precision floating-point
4+
strided array.
55

6-
The `N` and `stride` parameters determine which elements in `x` are accessed
7-
at runtime.
6+
The `N` and stride parameter determine which elements in the strided array
7+
are accessed at runtime.
88

99
Indexing is relative to the first index. To introduce an offset, use typed
1010
array views.
1111

12-
If `N <= 0`, the function returns `x` unchanged.
12+
If `N <= 0`, the function returns the strided array unchanged.
1313

1414
Parameters
1515
----------
@@ -40,23 +40,22 @@
4040

4141
// Using `N` and `stride` parameters:
4242
> x = new {{alias:@stdlib/array/float32}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, -1.0, -3.0 ] );
43-
> var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 );
4443
> alpha = 5.0;
4544
> var stride = 2;
46-
> {{alias}}( N, alpha, x, stride )
45+
> {{alias}}( 3, alpha, x, stride )
4746
<Float32Array>[ 3.0, 1.0, 8.0, -5.0, 9.0, -1.0, -3.0 ]
4847

4948
// Using view offsets:
5049
> var x0 = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
5150
> var x1 = new {{alias:@stdlib/array/float32}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
52-
> N = {{alias:@stdlib/math/base/special/floor}}( x0.length / 2 );
5351
> alpha = 5.0;
5452
> stride = 2;
55-
> {{alias}}( N, alpha, x1, stride )
53+
> {{alias}}( 3, alpha, x1, stride )
5654
<Float32Array>[ 3.0, 3.0, 1.0, 5.0, -1.0 ]
5755
> x0
5856
<Float32Array>[ 1.0, 3.0, 3.0, 1.0, 5.0, -1.0 ]
5957

58+
6059
{{alias}}.ndarray( N, alpha, x, stride, offset )
6160
Adds a constant to each element in a single-precision floating-point strided
6261
array using alternative indexing semantics.
@@ -97,10 +96,9 @@
9796

9897
// Using an index offset:
9998
> x = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
100-
> var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 );
10199
> alpha = 5.0;
102100
> var stride = 2;
103-
> {{alias}}.ndarray( N, alpha, x, stride, 1 )
101+
> {{alias}}.ndarray( 3, alpha, x, stride, 1 )
104102
<Float32Array>[ 1.0, 3.0, 3.0, 1.0, 5.0, -1.0 ]
105103

106104
See Also

lib/node_modules/@stdlib/blas/ext/base/sapx/manifest.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
],
2525
"confs": [
2626
{
27+
"task": "build",
2728
"src": [
2829
"./src/sapx.c"
2930
],
@@ -41,6 +42,34 @@
4142
"@stdlib/napi/argv-float",
4243
"@stdlib/napi/argv-strided-float32array"
4344
]
45+
},
46+
{
47+
"task": "benchmark",
48+
"src": [
49+
"./src/sapx.c"
50+
],
51+
"include": [
52+
"./include"
53+
],
54+
"libraries": [
55+
"-lm"
56+
],
57+
"libpath": [],
58+
"dependencies": []
59+
},
60+
{
61+
"task": "examples",
62+
"src": [
63+
"./src/sapx.c"
64+
],
65+
"include": [
66+
"./include"
67+
],
68+
"libraries": [
69+
"-lm"
70+
],
71+
"libpath": [],
72+
"dependencies": []
4473
}
4574
]
4675
}

0 commit comments

Comments
 (0)