@stdlib/blas-base-ccopy 0.0.7 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/manifest.json CHANGED
@@ -1,118 +1,148 @@
1
1
  {
2
- "options": {
3
- "os": "linux",
4
- "blas": ""
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
- "os": "linux",
31
- "blas": "",
32
- "src": [
33
- "./src/ccopy.f",
34
- "./src/ccopy_f.c"
35
- ],
36
- "include": [
37
- "./include"
38
- ],
39
- "libraries": [],
40
- "libpath": [],
41
- "dependencies": []
42
- },
43
- {
44
- "os": "linux",
45
- "blas": "openblas",
46
- "src": [
47
- "./src/ccopy_cblas.c"
48
- ],
49
- "include": [
50
- "./include"
51
- ],
52
- "libraries": [
53
- "-lopenblas",
54
- "-lpthread"
55
- ],
56
- "libpath": [],
57
- "dependencies": []
58
- },
59
- {
60
- "os": "mac",
61
- "blas": "",
62
- "src": [
63
- "./src/ccopy.f",
64
- "./src/ccopy_f.c"
65
- ],
66
- "include": [
67
- "./include"
68
- ],
69
- "libraries": [],
70
- "libpath": [],
71
- "dependencies": []
72
- },
73
- {
74
- "os": "mac",
75
- "blas": "apple_accelerate_framework",
76
- "src": [
77
- "./src/ccopy_cblas.c"
78
- ],
79
- "include": [
80
- "./include"
81
- ],
82
- "libraries": [
83
- "-lblas"
84
- ],
85
- "libpath": [],
86
- "dependencies": []
87
- },
88
- {
89
- "os": "mac",
90
- "blas": "openblas",
91
- "src": [
92
- "./src/ccopy_cblas.c"
93
- ],
94
- "include": [
95
- "./include"
96
- ],
97
- "libraries": [
98
- "-lopenblas",
99
- "-lpthread"
100
- ],
101
- "libpath": [],
102
- "dependencies": []
103
- },
104
- {
105
- "os": "win",
106
- "blas": "",
107
- "src": [
108
- "./src/ccopy.c"
109
- ],
110
- "include": [
111
- "./include"
112
- ],
113
- "libraries": [],
114
- "libpath": [],
115
- "dependencies": []
116
- }
117
- ]
2
+ "options": {
3
+ "os": "linux",
4
+ "blas": ""
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
+ "os": "linux",
31
+ "blas": "",
32
+ "src": [
33
+ "./src/ccopy.f",
34
+ "./src/ccopy_f.c"
35
+ ],
36
+ "include": [
37
+ "./include"
38
+ ],
39
+ "libraries": [],
40
+ "libpath": [],
41
+ "dependencies": [
42
+ "@stdlib/napi-export",
43
+ "@stdlib/napi-argv",
44
+ "@stdlib/napi-argv-int64",
45
+ "@stdlib/napi-argv-strided-complex64array"
46
+ ]
47
+ },
48
+ {
49
+ "os": "linux",
50
+ "blas": "openblas",
51
+ "src": [
52
+ "./src/ccopy_cblas.c"
53
+ ],
54
+ "include": [
55
+ "./include"
56
+ ],
57
+ "libraries": [
58
+ "-lopenblas",
59
+ "-lpthread"
60
+ ],
61
+ "libpath": [],
62
+ "dependencies": [
63
+ "@stdlib/napi-export",
64
+ "@stdlib/napi-argv",
65
+ "@stdlib/napi-argv-int64",
66
+ "@stdlib/napi-argv-strided-complex64array"
67
+ ]
68
+ },
69
+ {
70
+ "os": "mac",
71
+ "blas": "",
72
+ "src": [
73
+ "./src/ccopy.f",
74
+ "./src/ccopy_f.c"
75
+ ],
76
+ "include": [
77
+ "./include"
78
+ ],
79
+ "libraries": [],
80
+ "libpath": [],
81
+ "dependencies": [
82
+ "@stdlib/napi-export",
83
+ "@stdlib/napi-argv",
84
+ "@stdlib/napi-argv-int64",
85
+ "@stdlib/napi-argv-strided-complex64array"
86
+ ]
87
+ },
88
+ {
89
+ "os": "mac",
90
+ "blas": "apple_accelerate_framework",
91
+ "src": [
92
+ "./src/ccopy_cblas.c"
93
+ ],
94
+ "include": [
95
+ "./include"
96
+ ],
97
+ "libraries": [
98
+ "-lblas"
99
+ ],
100
+ "libpath": [],
101
+ "dependencies": [
102
+ "@stdlib/napi-export",
103
+ "@stdlib/napi-argv",
104
+ "@stdlib/napi-argv-int64",
105
+ "@stdlib/napi-argv-strided-complex64array"
106
+ ]
107
+ },
108
+ {
109
+ "os": "mac",
110
+ "blas": "openblas",
111
+ "src": [
112
+ "./src/ccopy_cblas.c"
113
+ ],
114
+ "include": [
115
+ "./include"
116
+ ],
117
+ "libraries": [
118
+ "-lopenblas",
119
+ "-lpthread"
120
+ ],
121
+ "libpath": [],
122
+ "dependencies": [
123
+ "@stdlib/napi-export",
124
+ "@stdlib/napi-argv",
125
+ "@stdlib/napi-argv-int64",
126
+ "@stdlib/napi-argv-strided-complex64array"
127
+ ]
128
+ },
129
+ {
130
+ "os": "win",
131
+ "blas": "",
132
+ "src": [
133
+ "./src/ccopy.c"
134
+ ],
135
+ "include": [
136
+ "./include"
137
+ ],
138
+ "libraries": [],
139
+ "libpath": [],
140
+ "dependencies": [
141
+ "@stdlib/napi-export",
142
+ "@stdlib/napi-argv",
143
+ "@stdlib/napi-argv-int64",
144
+ "@stdlib/napi-argv-strided-complex64array"
145
+ ]
146
+ }
147
+ ]
118
148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/blas-base-ccopy",
3
- "version": "0.0.7",
3
+ "version": "0.1.0",
4
4
  "description": "Copy values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -41,26 +41,33 @@
41
41
  "url": "https://github.com/stdlib-js/stdlib/issues"
42
42
  },
43
43
  "dependencies": {
44
- "@stdlib/array-float32": "^0.0.x",
45
- "@stdlib/assert-is-error": "^0.0.x",
46
- "@stdlib/types": "^0.0.x",
47
- "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x",
48
- "@stdlib/utils-library-manifest": "^0.0.x",
49
- "@stdlib/utils-try-require": "^0.0.x"
44
+ "@stdlib/assert-is-error": "^0.1.0",
45
+ "@stdlib/napi-argv": "^0.1.0",
46
+ "@stdlib/napi-argv-int64": "^0.1.0",
47
+ "@stdlib/napi-argv-strided-complex64array": "^0.1.0",
48
+ "@stdlib/napi-export": "^0.1.0",
49
+ "@stdlib/strided-base-reinterpret-complex64": "^0.1.0",
50
+ "@stdlib/types": "^0.1.0",
51
+ "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0",
52
+ "@stdlib/utils-library-manifest": "^0.1.0",
53
+ "@stdlib/utils-try-require": "^0.1.0"
50
54
  },
51
55
  "devDependencies": {
52
- "@stdlib/array-complex64": "^0.0.x",
53
- "@stdlib/assert-is-browser": "^0.0.x",
54
- "@stdlib/bench": "^0.0.x",
55
- "@stdlib/math-base-assert-is-nan": "^0.0.x",
56
- "@stdlib/math-base-special-floor": "^0.0.x",
57
- "@stdlib/math-base-special-pow": "^0.0.x",
58
- "@stdlib/random-base-discrete-uniform": "^0.0.x",
59
- "@stdlib/random-base-randu": "^0.0.x",
56
+ "@stdlib/array-complex64": "^0.0.6",
57
+ "@stdlib/array-filled-by": "^0.0.2",
58
+ "@stdlib/array-float32": "^0.1.0",
59
+ "@stdlib/assert-is-browser": "^0.1.0",
60
+ "@stdlib/bench": "^0.1.0",
61
+ "@stdlib/complex-float32": "^0.0.7",
62
+ "@stdlib/math-base-assert-is-nan": "^0.1.0",
63
+ "@stdlib/math-base-special-pow": "^0.0.7",
64
+ "@stdlib/random-base-discrete-uniform": "^0.0.6",
65
+ "@stdlib/random-base-uniform": "^0.0.6",
66
+ "@stdlib/strided-base-min-view-buffer-index": "^0.1.0",
60
67
  "proxyquire": "^2.0.0",
61
68
  "tape": "git+https://github.com/kgryte/tape.git#fix/globby",
62
69
  "istanbul": "^0.4.1",
63
- "tap-spec": "5.x.x"
70
+ "tap-min": "git+https://github.com/Planeshifter/tap-min.git"
64
71
  },
65
72
  "engines": {
66
73
  "node": ">=0.10.0",
@@ -101,8 +108,11 @@
101
108
  "single",
102
109
  "float32array"
103
110
  ],
111
+ "__stdlib__": {
112
+ "wasm": false
113
+ },
104
114
  "funding": {
105
- "type": "patreon",
106
- "url": "https://www.patreon.com/athan"
115
+ "type": "opencollective",
116
+ "url": "https://opencollective.com/stdlib"
107
117
  }
108
118
  }
package/src/addon.c ADDED
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @license Apache-2.0
3
+ *
4
+ * Copyright (c) 2020 The Stdlib Authors.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ #include "stdlib/blas/base/ccopy.h"
20
+ #include "stdlib/napi/export.h"
21
+ #include "stdlib/napi/argv.h"
22
+ #include "stdlib/napi/argv_int64.h"
23
+ #include "stdlib/napi/argv_strided_complex64array.h"
24
+ #include <node_api.h>
25
+
26
+ /**
27
+ * Receives JavaScript callback invocation data.
28
+ *
29
+ * @private
30
+ * @param env environment under which the function is invoked
31
+ * @param info callback data
32
+ * @return Node-API value
33
+ */
34
+ static napi_value addon( napi_env env, napi_callback_info info ) {
35
+ STDLIB_NAPI_ARGV( env, info, argv, argc, 5 );
36
+ STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
37
+ STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
38
+ STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 4 );
39
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, X, N, strideX, argv, 1 );
40
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, Y, N, strideY, argv, 3 );
41
+ c_ccopy( N, (void *)X, strideX, (void *)Y, strideY );
42
+ return NULL;
43
+ }
44
+
45
+ STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
package/src/ccopy.c CHANGED
@@ -21,10 +21,10 @@
21
21
  /**
22
22
  * Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
23
23
  *
24
- * @param N number of elements to copy
24
+ * @param N number of indexed elements
25
25
  * @param X input array
26
26
  * @param strideX X stride length
27
- * @param Y destination array
27
+ * @param Y output array
28
28
  * @param strideY Y stride length
29
29
  */
30
30
  void c_ccopy( const int N, const void *X, const int strideX, void *Y, const int strideY ) {
package/src/ccopy.f CHANGED
@@ -47,10 +47,10 @@
47
47
  ! >
48
48
  ! > * We will gladly answer any questions regarding the software. If a modification is done, however, it is the responsibility of the person who modified the routine to provide support.
49
49
  !
50
- ! @param {integer} N - number of values to copy
50
+ ! @param {integer} N - number of indexed elements
51
51
  ! @param {Array<complex>} cx - input array
52
52
  ! @param {integer} strideX - `cx` stride length
53
- ! @param {Array<complex>} cy - destination array
53
+ ! @param {Array<complex>} cy - output array
54
54
  ! @param {integer} strideY - `cy` stride length
55
55
  !<
56
56
  subroutine ccopy( N, cx, strideX, cy, strideY )
package/src/ccopy_cblas.c CHANGED
@@ -22,10 +22,10 @@
22
22
  /**
23
23
  * Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
24
24
  *
25
- * @param N number of elements to copy
25
+ * @param N number of indexed elements
26
26
  * @param X input array
27
27
  * @param strideX X stride length
28
- * @param Y destination array
28
+ * @param Y output array
29
29
  * @param strideY Y stride length
30
30
  */
31
31
  void c_ccopy( const int N, const void *X, const int strideX, void *Y, const int strideY ) {
package/src/ccopy_f.c CHANGED
@@ -22,10 +22,10 @@
22
22
  /**
23
23
  * Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
24
24
  *
25
- * @param N number of elements to copy
25
+ * @param N number of indexed elements
26
26
  * @param X input array
27
27
  * @param strideX X stride length
28
- * @param Y destination array
28
+ * @param Y output array
29
29
  * @param strideY Y stride length
30
30
  */
31
31
  void c_ccopy( const int N, const void *X, const int strideX, void *Y, const int strideY ) {
package/docs/repl.txt DELETED
@@ -1,135 +0,0 @@
1
-
2
- {{alias}}( N, x, strideX, y, strideY )
3
- Copies values from one complex single-precision floating-point vector to
4
- another complex single-precision floating-point vector.
5
-
6
- The `N` and `stride` parameters determine how values from `x` are copied
7
- into `y`.
8
-
9
- Indexing is relative to the first index. To introduce an offset, use typed
10
- array views.
11
-
12
- If `N` is less than or equal to `0`, the function returns `y` unchanged.
13
-
14
- Parameters
15
- ----------
16
- N: integer
17
- Number of values to copy.
18
-
19
- x: Complex64Array
20
- Input array.
21
-
22
- strideX: integer
23
- Index increment for `x`.
24
-
25
- y: Complex64Array
26
- Destination array.
27
-
28
- strideY: integer
29
- Index increment for `y`.
30
-
31
- Returns
32
- -------
33
- y: Complex64Array
34
- Input array `y`.
35
-
36
- Examples
37
- --------
38
- // Standard usage:
39
- > var x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
40
- > var y = new {{alias:@stdlib/array/complex64}}( [ 6.0, 7.0, 8.0, 9.0 ] );
41
- > {{alias}}( x.length, x, 1, y, 1 );
42
- > var z = y.get( 0 );
43
- > var re = {{alias:@stdlib/complex/realf}}( z )
44
- 1.0
45
- > var im = {{alias:@stdlib/complex/imag}}( z )
46
- 2.0
47
-
48
- // Advanced indexing:
49
- > x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
50
- > y = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
51
- > var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 );
52
- > {{alias}}( N, x, -2, y, 1 );
53
- > z = y.get( 0 );
54
- > re = {{alias:@stdlib/complex/realf}}( z )
55
- 5.0
56
- > im = {{alias:@stdlib/complex/imag}}( z )
57
- 6.0
58
-
59
- // Using typed array views:
60
- > var x0 = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
61
- > var y0 = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
62
- > var x1 = new {{alias:@stdlib/array/complex64}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
63
- > var y1 = new {{alias:@stdlib/array/complex64}}( y0.buffer, y0.BYTES_PER_ELEMENT*2 );
64
- > N = {{alias:@stdlib/math/base/special/floor}}( x0.length / 2 );
65
- > {{alias}}( N, x1, -2, y1, 1 );
66
- > z = y0.get( 2 );
67
- > re = {{alias:@stdlib/complex/realf}}( z )
68
- 7.0
69
- > im = {{alias:@stdlib/complex/imag}}( z )
70
- 8.0
71
-
72
-
73
- {{alias}}.ndarray( N, x, strideX, offsetX, y, strideY, offsetY )
74
- Copies values from one complex single-precision floating-point vector to
75
- another complex single-precision floating-point vector using alternative
76
- indexing semantics.
77
-
78
- While typed array views mandate a view offset based on the underlying
79
- buffer, the `offset` parameters support indexing semantics based on starting
80
- indices.
81
-
82
- Parameters
83
- ----------
84
- N: integer
85
- Number of values to copy.
86
-
87
- x: Complex64Array
88
- Input array.
89
-
90
- strideX: integer
91
- Index increment for `x`.
92
-
93
- offsetX: integer
94
- Starting index for `x`.
95
-
96
- y: Complex64Array
97
- Destination array.
98
-
99
- strideY: integer
100
- Index increment for `y`.
101
-
102
- offsetY: integer
103
- Starting index for `y`.
104
-
105
- Returns
106
- -------
107
- y: Complex64Array
108
- Input array `y`.
109
-
110
- Examples
111
- --------
112
- // Standard usage:
113
- > var x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
114
- > var y = new {{alias:@stdlib/array/complex64}}( [ 6.0, 7.0, 8.0, 9.0 ] );
115
- > {{alias}}.ndarray( x.length, x, 1, 0, y, 1, 0 );
116
- > var z = y.get( 0 );
117
- > var re = {{alias:@stdlib/complex/realf}}( z )
118
- 1.0
119
- > var im = {{alias:@stdlib/complex/imag}}( z )
120
- 2.0
121
-
122
- // Advanced indexing:
123
- > x = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
124
- > y = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
125
- > var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 );
126
- > {{alias}}.ndarray( N, x, 2, 1, y, -1, y.length-1 );
127
- > z = y.get( y.length-1 );
128
- > re = {{alias:@stdlib/complex/realf}}( z )
129
- 3.0
130
- > im = {{alias:@stdlib/complex/imag}}( z )
131
- 4.0
132
-
133
- See Also
134
- --------
135
-