Skip to content

Commit 91a2bad

Browse files
committed
refactor: update implementation according to current project conventions
Ref: #788
1 parent 993c218 commit 91a2bad

File tree

8 files changed

+36
-15
lines changed

8 files changed

+36
-15
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The function has the following parameters:
5151
- **alpha**: `numeric` constant.
5252
- **x**: input [`Float32Array`][mdn-float32array].
5353
- **strideX**: index increment for `x`.
54-
- **y**: input [`Float32Array`][mdn-float32array].
54+
- **y**: output [`Float32Array`][mdn-float32array].
5555
- **strideY**: index increment for `y`.
5656

5757
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` and add the result to the first `N` elements of `y` in reverse order,

lib/node_modules/@stdlib/blas/base/saxpy/examples/c/example.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
int main( void ) {
2323
// Create strided arrays:
24-
const float x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
25-
float y[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
24+
const float x[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
25+
float y[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f };
2626

2727
// Specify the number of indexed elements:
2828
const int N = 4;

lib/node_modules/@stdlib/blas/base/saxpy/manifest.json

+23-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"options": {
33
"os": "linux",
4-
"blas": ""
4+
"blas": "",
5+
"wasm": false
56
},
67
"fields": [
78
{
@@ -29,6 +30,7 @@
2930
{
3031
"os": "linux",
3132
"blas": "",
33+
"wasm": false,
3234
"src": [
3335
"./src/saxpy.f",
3436
"./src/saxpy_f.c"
@@ -49,6 +51,7 @@
4951
{
5052
"os": "linux",
5153
"blas": "openblas",
54+
"wasm": false,
5255
"src": [
5356
"./src/saxpy_cblas.c"
5457
],
@@ -71,6 +74,7 @@
7174
{
7275
"os": "mac",
7376
"blas": "",
77+
"wasm": false,
7478
"src": [
7579
"./src/saxpy.f",
7680
"./src/saxpy_f.c"
@@ -91,6 +95,7 @@
9195
{
9296
"os": "mac",
9397
"blas": "apple_accelerate_framework",
98+
"wasm": false,
9499
"src": [
95100
"./src/saxpy_cblas.c"
96101
],
@@ -112,6 +117,7 @@
112117
{
113118
"os": "mac",
114119
"blas": "openblas",
120+
"wasm": false,
115121
"src": [
116122
"./src/saxpy_cblas.c"
117123
],
@@ -134,6 +140,7 @@
134140
{
135141
"os": "win",
136142
"blas": "",
143+
"wasm": false,
137144
"src": [
138145
"./src/saxpy.c"
139146
],
@@ -146,8 +153,22 @@
146153
"@stdlib/napi/export",
147154
"@stdlib/napi/argv",
148155
"@stdlib/napi/argv-int64",
149-
"@stdlib/napi/argv-strided-complex64array"
156+
"@stdlib/napi/argv-strided-float32array"
150157
]
158+
},
159+
{
160+
"os": "",
161+
"blas": "",
162+
"wasm": true,
163+
"src": [
164+
"./src/saxpy.c"
165+
],
166+
"include": [
167+
"./include"
168+
],
169+
"libraries": [],
170+
"libpath": [],
171+
"dependencies": []
151172
}
152173
]
153174
}

lib/node_modules/@stdlib/blas/base/saxpy/test/test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ tape( 'if a native implementation is available, the main export is the native im
5151
'@stdlib/utils/try-require': tryRequire
5252
});
5353

54-
t.strictEqual( saxpy, mock, 'returns native implementation' );
54+
t.strictEqual( saxpy, mock, 'returns expected value' );
5555
t.end();
5656

5757
function tryRequire() {
@@ -73,7 +73,7 @@ tape( 'if a native implementation is not available, the main export is a JavaScr
7373
'@stdlib/utils/try-require': tryRequire
7474
});
7575

76-
t.strictEqual( saxpy, main, 'returns JavaScript implementation' );
76+
t.strictEqual( saxpy, main, 'returns expected value' );
7777
t.end();
7878

7979
function tryRequire() {

lib/node_modules/@stdlib/blas/base/saxpy/test/test.ndarray.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ tape( 'main export is a function', function test( t ) {
3434
});
3535

3636
tape( 'the function has an arity of 8', function test( t ) {
37-
t.strictEqual( saxpy.length, 8, 'arity of 8' );
37+
t.strictEqual( saxpy.length, 8, 'returns expected value' );
3838
t.end();
3939
});
4040

@@ -215,7 +215,7 @@ tape( 'the function returns a reference to the output array', function test( t )
215215

216216
out = saxpy( x.length, 3.0, x, 1, 0, y, 1, 0 );
217217

218-
t.strictEqual( out, y, 'same reference' );
218+
t.strictEqual( out, y, 'returns expected value' );
219219
t.end();
220220
});
221221

lib/node_modules/@stdlib/blas/base/saxpy/test/test.ndarray.native.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ tape( 'main export is a function', opts, function test( t ) {
4343
});
4444

4545
tape( 'the function has an arity of 8', opts, function test( t ) {
46-
t.strictEqual( saxpy.length, 8, 'arity of 8' );
46+
t.strictEqual( saxpy.length, 8, 'returns expected value' );
4747
t.end();
4848
});
4949

@@ -224,7 +224,7 @@ tape( 'the function returns a reference to the output array', opts, function tes
224224

225225
out = saxpy( x.length, 3.0, x, 1, 0, y, 1, 0 );
226226

227-
t.strictEqual( out, y, 'same reference' );
227+
t.strictEqual( out, y, 'returns expected value' );
228228
t.end();
229229
});
230230

lib/node_modules/@stdlib/blas/base/saxpy/test/test.saxpy.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ tape( 'main export is a function', function test( t ) {
3434
});
3535

3636
tape( 'the function has an arity of 6', function test( t ) {
37-
t.strictEqual( saxpy.length, 6, 'arity of 6' );
37+
t.strictEqual( saxpy.length, 6, 'returns expected value' );
3838
t.end();
3939
});
4040

@@ -155,7 +155,7 @@ tape( 'the function returns a reference to the output array', function test( t )
155155

156156
out = saxpy( x.length, 3.0, x, 1, y, 1 );
157157

158-
t.strictEqual( out, y, 'same reference' );
158+
t.strictEqual( out, y, 'returns expected value' );
159159
t.end();
160160
});
161161

lib/node_modules/@stdlib/blas/base/saxpy/test/test.saxpy.native.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ tape( 'main export is a function', opts, function test( t ) {
4343
});
4444

4545
tape( 'the function has an arity of 6', opts, function test( t ) {
46-
t.strictEqual( saxpy.length, 6, 'arity of 6' );
46+
t.strictEqual( saxpy.length, 6, 'returns expected value' );
4747
t.end();
4848
});
4949

@@ -164,7 +164,7 @@ tape( 'the function returns a reference to the output array', opts, function tes
164164

165165
out = saxpy( x.length, 3.0, x, 1, y, 1 );
166166

167-
t.strictEqual( out, y, 'same reference' );
167+
t.strictEqual( out, y, 'returns expected value' );
168168
t.end();
169169
});
170170

0 commit comments

Comments
 (0)