Skip to content

Commit 7e0f583

Browse files
committed
refactor: update scaffold
1 parent 6bcd19c commit 7e0f583

File tree

10 files changed

+227
-152
lines changed

10 files changed

+227
-152
lines changed

lib/node_modules/@stdlib/_tools/scaffold/math-strided-real-typed-unary/data/benchmark/c/benchmark__length__c.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818

1919
/* THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. */
2020

21-
/**
22-
* Benchmark `{{ALIAS_SNAKECASE}}`.
23-
*/
2421
#include "{{PKG_INCLUDE}}.h"
2522
#include <stdlib.h>
2623
#include <stdio.h>

lib/node_modules/@stdlib/_tools/scaffold/math-strided-real-typed-unary/data/examples/c/example__c.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
/* THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. */
2020

2121
#include "{{PKG_INCLUDE}}.h"
22-
#include <stdint.h>
2322
#include <stdio.h>
2423

2524
int main( void ) {
@@ -29,12 +28,12 @@ int main( void ) {
2928
// Create an output strided array:
3029
{{C_TYPE}} y[] = { 0.0{{C_TYPE_SUFFIX}}, 0.0{{C_TYPE_SUFFIX}}, 0.0{{C_TYPE_SUFFIX}}, 0.0{{C_TYPE_SUFFIX}}, 0.0{{C_TYPE_SUFFIX}}, 0.0{{C_TYPE_SUFFIX}}, 0.0{{C_TYPE_SUFFIX}}, 0.0{{C_TYPE_SUFFIX}} };
3130

32-
// Specify the number of elements:
33-
const int64_t N = 4;
31+
// Specify the number of indexed elements:
32+
const int N = 4;
3433

35-
// Specify the stride lengths:
36-
const int64_t strideX = 2;
37-
const int64_t strideY = 2;
34+
// Specify stride lengths:
35+
const int strideX = 2;
36+
const int strideY = 2;
3837

3938
// Compute the results:
4039
stdlib_strided_{{ALIAS_SNAKECASE}}( N, x, strideX, y, strideY );

lib/node_modules/@stdlib/_tools/scaffold/math-strided-real-typed-unary/data/examples/index__js.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222

2323
var random = require( '@stdlib/random/array/uniform' );
2424
var zeros = require( '@stdlib/array/zeros' );
25-
var {{TYPED_ARRAY_CTOR}} = require( '@stdlib/array/{{TYPED_ARRAY_DTYPE}}' );
2625
var {{ALIAS}} = require( './../lib' );
2726

2827
var x = random( 10, {{C_RAND_MIN}}, {{C_RAND_MAX}}, {
2928
'dtype': '{{TYPED_ARRAY_DTYPE}}'
3029
});
31-
var y = zeros( 10, '{{TYPED_ARRAY_DTYPE}}' );
3230
console.log( x );
31+
32+
var y = zeros( 10, '{{TYPED_ARRAY_DTYPE}}' );
3333
console.log( y );
3434

3535
{{ALIAS}}.ndarray( x.length, x, 1, 0, y, -1, y.length-1 );

lib/node_modules/@stdlib/_tools/scaffold/math-strided-real-typed-unary/data/include/alias__h.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#ifndef {{C_HEADER_GUARD}}_H
2222
#define {{C_HEADER_GUARD}}_H
2323

24-
#include <stdint.h>
24+
#include "stdlib/blas/base/shared.h"
2525

2626
/*
2727
* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.
@@ -33,7 +33,12 @@ extern "C" {
3333
/**
3434
* {{C_MAIN_DESC}}
3535
*/
36-
void stdlib_strided_{{ALIAS_SNAKECASE}}( const int64_t N, const {{C_TYPE}} *X, const int64_t strideX, {{C_TYPE}} *Y, const int64_t strideY );
36+
void stdlib_strided_{{ALIAS_SNAKECASE}}( const CBLAS_INT N, const {{C_TYPE}} *X, const CBLAS_INT strideX, {{C_TYPE}} *Y, const CBLAS_INT strideY );
37+
38+
/**
39+
* {{C_NDARRAY_DESC}}
40+
*/
41+
void stdlib_strided_{{ALIAS_SNAKECASE}}_ndarray( const CBLAS_INT N, const {{C_TYPE}} *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, {{C_TYPE}} *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY );
3742

3843
#ifdef __cplusplus
3944
}
Lines changed: 101 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,103 @@
11
{
2-
"options": {
3-
"task": "build"
4-
},
5-
"fields": [
6-
{
7-
"field": "src",
8-
"resolve": true,
9-
"relative": true
10-
},
11-
{
12-
"field": "include",
13-
"resolve": true,
14-
"relative": true
15-
},
16-
{
17-
"field": "libraries",
18-
"resolve": false,
19-
"relative": false
20-
},
21-
{
22-
"field": "libpath",
23-
"resolve": true,
24-
"relative": false
25-
}
26-
],
27-
"confs": [
28-
{
29-
"task": "build",
30-
"src": [
31-
"./src/{{ALIAS_SNAKECASE}}.c"
32-
],
33-
"include": [
34-
"./include"
35-
],
36-
"libraries": [],
37-
"libpath": [],
38-
"dependencies": [
39-
"@{{UNARY_PKG}}",
40-
"@stdlib/strided/base/{{STRIDED_APPLY_ALIAS}}",
41-
"@stdlib/strided/napi/{{STRIDED_APPLY_ALIAS}}"
42-
]
43-
},
44-
{
45-
"task": "examples",
46-
"src": [
47-
"./src/{{ALIAS_SNAKECASE}}.c"
48-
],
49-
"include": [
50-
"./include"
51-
],
52-
"libraries": [],
53-
"libpath": [],
54-
"dependencies": [
55-
"@{{UNARY_PKG}}",
56-
"@stdlib/strided/base/{{STRIDED_APPLY_ALIAS}}"
57-
]
58-
},
59-
{
60-
"task": "benchmark",
61-
"src": [
62-
"./src/{{ALIAS_SNAKECASE}}.c"
63-
],
64-
"include": [
65-
"./include"
66-
],
67-
"libraries": [],
68-
"libpath": [],
69-
"dependencies": [
70-
"@{{UNARY_PKG}}",
71-
"@stdlib/strided/base/{{STRIDED_APPLY_ALIAS}}"
72-
]
73-
}
74-
]
2+
"options": {
3+
"task": "build",
4+
"wasm": false
5+
},
6+
"fields": [
7+
{
8+
"field": "src",
9+
"resolve": true,
10+
"relative": true
11+
},
12+
{
13+
"field": "include",
14+
"resolve": true,
15+
"relative": true
16+
},
17+
{
18+
"field": "libraries",
19+
"resolve": false,
20+
"relative": false
21+
},
22+
{
23+
"field": "libpath",
24+
"resolve": true,
25+
"relative": false
26+
}
27+
],
28+
"confs": [
29+
{
30+
"task": "build",
31+
"wasm": false,
32+
"src": [
33+
"./src/main.c"
34+
],
35+
"include": [
36+
"./include"
37+
],
38+
"libraries": [],
39+
"libpath": [],
40+
"dependencies": [
41+
"@{{UNARY_PKG}}",
42+
"@stdlib/strided/base/{{STRIDED_APPLY_ALIAS}}",
43+
"@stdlib/strided/base/stride2offset",
44+
"@stdlib/blas/base/shared",
45+
"@stdlib/strided/napi/{{STRIDED_APPLY_ALIAS}}"
46+
]
47+
},
48+
{
49+
"task": "examples",
50+
"wasm": false,
51+
"src": [
52+
"./src/main.c"
53+
],
54+
"include": [
55+
"./include"
56+
],
57+
"libraries": [],
58+
"libpath": [],
59+
"dependencies": [
60+
"@{{UNARY_PKG}}",
61+
"@stdlib/strided/base/{{STRIDED_APPLY_ALIAS}}",
62+
"@stdlib/strided/base/stride2offset",
63+
"@stdlib/blas/base/shared"
64+
]
65+
},
66+
{
67+
"task": "benchmark",
68+
"wasm": false,
69+
"src": [
70+
"./src/main.c"
71+
],
72+
"include": [
73+
"./include"
74+
],
75+
"libraries": [],
76+
"libpath": [],
77+
"dependencies": [
78+
"@{{UNARY_PKG}}",
79+
"@stdlib/strided/base/{{STRIDED_APPLY_ALIAS}}",
80+
"@stdlib/strided/base/stride2offset",
81+
"@stdlib/blas/base/shared"
82+
]
83+
},
84+
{
85+
"task": "build",
86+
"wasm": true,
87+
"src": [
88+
"./src/main.c"
89+
],
90+
"include": [
91+
"./include"
92+
],
93+
"libraries": [],
94+
"libpath": [],
95+
"dependencies": [
96+
"@{{UNARY_PKG}}",
97+
"@stdlib/strided/base/{{STRIDED_APPLY_ALIAS}}",
98+
"@stdlib/strided/base/stride2offset",
99+
"@stdlib/blas/base/shared"
100+
]
101+
}
102+
]
75103
}

lib/node_modules/@stdlib/_tools/scaffold/math-strided-real-typed-unary/data/src/addon__c.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@
2121
#include "stdlib/strided/napi/{{STRIDED_APPLY_ALIAS}}.h"
2222
#include "{{UNARY_PKG_INCLUDE}}.h"
2323

24-
STDLIB_STRIDED_NAPI_MODULE_{{C_STRIDED_APPLY_MACRO_ALIAS}}( stdlib_{{C_UNARY_ALIAS}} )
24+
STDLIB_STRIDED_NAPI_MODULE_{{C_STRIDED_APPLY_MACRO_ALIAS}}( stdlib_{{C_UNARY_ALIAS}} );
25+
STDLIB_STRIDED_NAPI_MODULE_{{C_STRIDED_APPLY_MACRO_ALIAS}}_NDARRAY( stdlib_{{C_UNARY_ALIAS}} );

lib/node_modules/@stdlib/_tools/scaffold/math-strided-real-typed-unary/data/src/alias__c.txt

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)