@stdlib/blas-base-ccopy 0.0.8 → 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/CITATION.cff +30 -0
- package/NOTICE +1 -1
- package/README.md +28 -23
- package/dist/index.d.ts +3 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +7 -0
- package/docs/types/index.d.ts +10 -10
- package/include.gypi +1 -1
- package/lib/ccopy.js +6 -6
- package/lib/ccopy.native.js +6 -6
- package/lib/ndarray.js +6 -6
- package/lib/ndarray.native.js +12 -12
- package/manifest.json +146 -116
- package/package.json +28 -18
- package/src/addon.c +45 -0
- package/src/ccopy.c +2 -2
- package/src/ccopy.f +2 -2
- package/src/ccopy_cblas.c +2 -2
- package/src/ccopy_f.c +2 -2
- package/docs/repl.txt +0 -135
- package/docs/types/test.ts +0 -249
- package/src/addon.cpp +0 -151
package/CITATION.cff
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
title: stdlib
|
|
3
|
+
message: >-
|
|
4
|
+
If you use this software, please cite it using the
|
|
5
|
+
metadata from this file.
|
|
6
|
+
|
|
7
|
+
type: software
|
|
8
|
+
|
|
9
|
+
authors:
|
|
10
|
+
- name: The Stdlib Authors
|
|
11
|
+
url: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
12
|
+
|
|
13
|
+
repository-code: https://github.com/stdlib-js/stdlib
|
|
14
|
+
url: https://stdlib.io
|
|
15
|
+
|
|
16
|
+
abstract: |
|
|
17
|
+
Standard library for JavaScript and Node.js.
|
|
18
|
+
|
|
19
|
+
keywords:
|
|
20
|
+
- JavaScript
|
|
21
|
+
- Node.js
|
|
22
|
+
- TypeScript
|
|
23
|
+
- standard library
|
|
24
|
+
- scientific computing
|
|
25
|
+
- numerical computing
|
|
26
|
+
- statistical computing
|
|
27
|
+
|
|
28
|
+
license: Apache-2.0 AND BSL-1.0
|
|
29
|
+
|
|
30
|
+
date-released: 2016
|
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2023 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -18,6 +18,17 @@ limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
-->
|
|
20
20
|
|
|
21
|
+
|
|
22
|
+
<details>
|
|
23
|
+
<summary>
|
|
24
|
+
About stdlib...
|
|
25
|
+
</summary>
|
|
26
|
+
<p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
|
|
27
|
+
<p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
|
|
28
|
+
<p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
|
|
29
|
+
<p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
|
|
30
|
+
</details>
|
|
31
|
+
|
|
21
32
|
# ccopy
|
|
22
33
|
|
|
23
34
|
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
|
|
@@ -68,26 +79,23 @@ var im = imagf( z );
|
|
|
68
79
|
|
|
69
80
|
The function has the following parameters:
|
|
70
81
|
|
|
71
|
-
- **N**: number of
|
|
82
|
+
- **N**: number of indexed elements.
|
|
72
83
|
- **x**: input [`Complex64Array`][@stdlib/array/complex64].
|
|
73
84
|
- **strideX**: index increment for `x`.
|
|
74
85
|
- **y**: destination [`Complex64Array`][@stdlib/array/complex64].
|
|
75
86
|
- **strideY**: index increment for `y`.
|
|
76
87
|
|
|
77
|
-
The `N` and
|
|
88
|
+
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`,
|
|
78
89
|
|
|
79
90
|
```javascript
|
|
80
91
|
var Complex64Array = require( '@stdlib/array-complex64' );
|
|
81
|
-
var floor = require( '@stdlib/math-base-special-floor' );
|
|
82
92
|
var realf = require( '@stdlib/complex-realf' );
|
|
83
93
|
var imagf = require( '@stdlib/complex-imagf' );
|
|
84
94
|
|
|
85
95
|
var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
|
|
86
96
|
var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
|
|
87
97
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
ccopy( N, x, -2, y, 1 );
|
|
98
|
+
ccopy( 2, x, -2, y, 1 );
|
|
91
99
|
|
|
92
100
|
var z = y.get( 0 );
|
|
93
101
|
// returns <Complex64>
|
|
@@ -158,7 +166,7 @@ The function has the following additional parameters:
|
|
|
158
166
|
- **offsetX**: starting index for `x`.
|
|
159
167
|
- **offsetY**: starting index for `y`.
|
|
160
168
|
|
|
161
|
-
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the
|
|
169
|
+
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the offset 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]`,...,
|
|
162
170
|
|
|
163
171
|
```javascript
|
|
164
172
|
var Complex64Array = require( '@stdlib/array-complex64' );
|
|
@@ -203,21 +211,18 @@ var im = imagf( z );
|
|
|
203
211
|
|
|
204
212
|
```javascript
|
|
205
213
|
var discreteUniform = require( '@stdlib/random-base-discrete-uniform' );
|
|
206
|
-
var
|
|
214
|
+
var filledarrayBy = require( '@stdlib/array-filled-by' );
|
|
215
|
+
var Complex64 = require( '@stdlib/complex-float32' );
|
|
207
216
|
var ccopy = require( '@stdlib/blas-base-ccopy' );
|
|
208
217
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
var x = new Complex64Array( 10 );
|
|
213
|
-
var y = new Complex64Array( 10 );
|
|
214
|
-
|
|
215
|
-
var i;
|
|
216
|
-
for ( i = 0; i < x.length; i++ ) {
|
|
217
|
-
x.set( [ re(), im() ], i );
|
|
218
|
-
y.set( [ re(), im() ], i );
|
|
218
|
+
function rand() {
|
|
219
|
+
return new Complex64( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
|
|
219
220
|
}
|
|
221
|
+
|
|
222
|
+
var x = filledarrayBy( 10, 'complex64', rand );
|
|
220
223
|
console.log( x.get( 0 ).toString() );
|
|
224
|
+
|
|
225
|
+
var y = filledarrayBy( 10, 'complex64', rand );
|
|
221
226
|
console.log( y.get( 0 ).toString() );
|
|
222
227
|
|
|
223
228
|
// Copy elements from `x` into `y` starting from the end of `y`:
|
|
@@ -237,7 +242,7 @@ console.log( y.get( y.length-1 ).toString() );
|
|
|
237
242
|
|
|
238
243
|
## See Also
|
|
239
244
|
|
|
240
|
-
- <span class="package-name">[`@stdlib/blas
|
|
245
|
+
- <span class="package-name">[`@stdlib/blas-base/cswap`][@stdlib/blas/base/cswap]</span><span class="delimiter">: </span><span class="description">interchanges two complex single-precision floating-point vectors.</span>
|
|
241
246
|
|
|
242
247
|
</section>
|
|
243
248
|
|
|
@@ -269,7 +274,7 @@ See [LICENSE][stdlib-license].
|
|
|
269
274
|
|
|
270
275
|
## Copyright
|
|
271
276
|
|
|
272
|
-
Copyright © 2016-
|
|
277
|
+
Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
273
278
|
|
|
274
279
|
</section>
|
|
275
280
|
|
|
@@ -282,8 +287,8 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors].
|
|
|
282
287
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/blas-base-ccopy.svg
|
|
283
288
|
[npm-url]: https://npmjs.org/package/@stdlib/blas-base-ccopy
|
|
284
289
|
|
|
285
|
-
[test-image]: https://github.com/stdlib-js/blas-base-ccopy/actions/workflows/test.yml/badge.svg?branch=v0.0
|
|
286
|
-
[test-url]: https://github.com/stdlib-js/blas-base-ccopy/actions/workflows/test.yml?query=branch:v0.0
|
|
290
|
+
[test-image]: https://github.com/stdlib-js/blas-base-ccopy/actions/workflows/test.yml/badge.svg?branch=v0.1.0
|
|
291
|
+
[test-url]: https://github.com/stdlib-js/blas-base-ccopy/actions/workflows/test.yml?query=branch:v0.1.0
|
|
287
292
|
|
|
288
293
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/blas-base-ccopy/main.svg
|
|
289
294
|
[coverage-url]: https://codecov.io/github/stdlib-js/blas-base-ccopy?branch=main
|
|
@@ -296,7 +301,7 @@ Copyright © 2016-2022. The Stdlib [Authors][stdlib-authors].
|
|
|
296
301
|
-->
|
|
297
302
|
|
|
298
303
|
[chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
|
|
299
|
-
[chat-url]: https://gitter.im
|
|
304
|
+
[chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
|
|
300
305
|
|
|
301
306
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
302
307
|
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";var x=function(e,i){return function(){return i||e((i={exports:{}}).exports,i),i.exports}};var j=x(function(H,w){
|
|
2
|
+
var l=require('@stdlib/strided-base-reinterpret-complex64/dist');function h(e,i,o,s,a){var u,n,c,f,v,t,r;if(e<=0)return s;if(u=l(i,0),n=l(s,0),o===1&&a===1){for(r=0;r<e*2;r+=2)n[r]=u[r],n[r+1]=u[r+1];return s}for(o<0?v=2*(1-e)*o:v=0,a<0?t=2*(1-e)*a:t=0,c=o*2,f=a*2,r=0;r<e;r++)n[t]=u[v],n[t+1]=u[v+1],v+=c,t+=f;return s}w.exports=h
|
|
3
|
+
});var _=x(function(I,R){
|
|
4
|
+
var m=require('@stdlib/strided-base-reinterpret-complex64/dist');function k(e,i,o,s,a,u,n){var c,f,v,t,r,p,q;if(e<=0)return a;for(c=m(i,0),f=m(a,0),v=o*2,t=u*2,r=s*2,p=n*2,q=0;q<e;q++)f[p]=c[r],f[p+1]=c[r+1],r+=v,p+=t;return a}R.exports=k
|
|
5
|
+
});var b=x(function(J,O){
|
|
6
|
+
var z=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),E=j(),A=_();z(E,"ndarray",A);O.exports=E
|
|
7
|
+
});var B=require("path").join,C=require('@stdlib/utils-try-require/dist'),D=require('@stdlib/assert-is-error/dist'),F=b(),y,g=C(B(__dirname,"./native.js"));D(g)?y=F:y=g;module.exports=y;
|
|
8
|
+
/** @license Apache-2.0 */
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../lib/ccopy.js", "../lib/ndarray.js", "../lib/main.js", "../lib/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar reinterpret = require( '@stdlib/strided-base-reinterpret-complex64' );\n\n\n// MAIN //\n\n/**\n* Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Complex64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Complex64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Complex64Array} output array\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* ccopy( x.length, x, 1, y, 1 );\n*\n* var z = y.get( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nfunction ccopy( N, x, strideX, y, strideY ) {\n\tvar viewX;\n\tvar viewY;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tviewX = reinterpret( x, 0 );\n\tviewY = reinterpret( y, 0 );\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tfor ( i = 0; i < N*2; i += 2 ) {\n\t\t\tviewY[ i ] = viewX[ i ];\n\t\t\tviewY[ i+1 ] = viewX[ i+1 ];\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = 2 * (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = 2 * (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tsx = strideX * 2;\n\tsy = strideY * 2;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tviewY[ iy ] = viewX[ ix ];\n\t\tviewY[ iy+1 ] = viewX[ ix+1 ];\n\t\tix += sx;\n\t\tiy += sy;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ccopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar reinterpret = require( '@stdlib/strided-base-reinterpret-complex64' );\n\n\n// MAIN //\n\n/**\n* Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Complex64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Complex64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Complex64Array} output array\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* ccopy( x.length, x, 1, 0, y, 1, 0 );\n*\n* var z = y.get( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nfunction ccopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar viewX;\n\tvar viewY;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tviewX = reinterpret( x, 0 );\n\tviewY = reinterpret( y, 0 );\n\tsx = strideX * 2;\n\tsy = strideY * 2;\n\tix = offsetX * 2;\n\tiy = offsetY * 2;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tviewY[ iy ] = viewX[ ix ];\n\t\tviewY[ iy+1 ] = viewX[ ix+1 ];\n\t\tix += sx;\n\t\tiy += sy;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ccopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar ccopy = require( './ccopy.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ccopy, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ccopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to copy values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.\n*\n* @module @stdlib/blas-base-ccopy\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n* var ccopy = require( '@stdlib/blas-base-ccopy' );\n*\n* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* ccopy( x.length, x, 1, y, 1 );\n*\n* var z = y.get( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n* var ccopy = require( '@stdlib/blas-base-ccopy' );\n*\n* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* ccopy.ndarray( x.length, x, 1, 0, y, 1, 0 );\n*\n* var z = y.get( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils-try-require' );\nvar isError = require( '@stdlib/assert-is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar ccopy;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tccopy = main;\n} else {\n\tccopy = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ccopy;\n\n// exports: { \"ndarray\": \"ccopy.ndarray\" }\n"],
|
|
5
|
+
"mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,4CAA6C,EAkCxE,SAASC,EAAOC,EAAGC,EAAGC,EAASC,EAAGC,EAAU,CAC3C,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEJ,GAAKX,GAAK,EACT,OAAOG,EAIR,GAFAE,EAAQP,EAAaG,EAAG,CAAE,EAC1BK,EAAQR,EAAaK,EAAG,CAAE,EACrBD,IAAY,GAAKE,IAAY,EAAI,CACrC,IAAMO,EAAI,EAAGA,EAAIX,EAAE,EAAGW,GAAK,EAC1BL,EAAOK,CAAE,EAAIN,EAAOM,CAAE,EACtBL,EAAOK,EAAE,CAAE,EAAIN,EAAOM,EAAE,CAAE,EAE3B,OAAOR,CACR,CAaA,IAZKD,EAAU,EACdO,EAAK,GAAK,EAAET,GAAKE,EAEjBO,EAAK,EAEDL,EAAU,EACdM,EAAK,GAAK,EAAEV,GAAKI,EAEjBM,EAAK,EAENH,EAAKL,EAAU,EACfM,EAAKJ,EAAU,EACTO,EAAI,EAAGA,EAAIX,EAAGW,IACnBL,EAAOI,CAAG,EAAIL,EAAOI,CAAG,EACxBH,EAAOI,EAAG,CAAE,EAAIL,EAAOI,EAAG,CAAE,EAC5BA,GAAMF,EACNG,GAAMF,EAEP,OAAOL,CACR,CAKAN,EAAO,QAAUE,ICrGjB,IAAAa,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,4CAA6C,EAoCxE,SAASC,EAAOC,EAAGC,EAAGC,EAASC,EAASC,EAAGC,EAASC,EAAU,CAC7D,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEJ,GAAKb,GAAK,EACT,OAAOI,EAQR,IANAG,EAAQT,EAAaG,EAAG,CAAE,EAC1BO,EAAQV,EAAaM,EAAG,CAAE,EAC1BK,EAAKP,EAAU,EACfQ,EAAKL,EAAU,EACfM,EAAKR,EAAU,EACfS,EAAKN,EAAU,EACTO,EAAI,EAAGA,EAAIb,EAAGa,IACnBL,EAAOI,CAAG,EAAIL,EAAOI,CAAG,EACxBH,EAAOI,EAAG,CAAE,EAAIL,EAAOI,EAAG,CAAE,EAC5BA,GAAMF,EACNG,GAAMF,EAEP,OAAON,CACR,CAKAP,EAAO,QAAUE,ICxFjB,IAAAe,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,uDAAwD,EAC/EC,EAAQ,IACRC,EAAU,IAKdF,EAAaC,EAAO,UAAWC,CAAQ,EAKvCH,EAAO,QAAUE,ICkCjB,IAAIE,EAAO,QAAS,MAAO,EAAE,KACzBC,EAAa,QAAS,2BAA4B,EAClDC,EAAU,QAAS,yBAA0B,EAC7CC,EAAO,IAKPC,EACAC,EAAMJ,EAAYD,EAAM,UAAW,aAAc,CAAE,EAClDE,EAASG,CAAI,EACjBD,EAAQD,EAERC,EAAQC,EAMT,OAAO,QAAUD",
|
|
6
|
+
"names": ["require_ccopy", "__commonJSMin", "exports", "module", "reinterpret", "ccopy", "N", "x", "strideX", "y", "strideY", "viewX", "viewY", "sx", "sy", "ix", "iy", "i", "require_ndarray", "__commonJSMin", "exports", "module", "reinterpret", "ccopy", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "viewX", "viewY", "sx", "sy", "ix", "iy", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "ccopy", "ndarray", "join", "tryRequire", "isError", "main", "ccopy", "tmp"]
|
|
7
|
+
}
|
package/docs/types/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
// TypeScript Version:
|
|
19
|
+
// TypeScript Version: 4.1
|
|
20
20
|
|
|
21
21
|
/// <reference types="@stdlib/types"/>
|
|
22
22
|
|
|
@@ -29,12 +29,12 @@ interface Routine {
|
|
|
29
29
|
/**
|
|
30
30
|
* Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
|
|
31
31
|
*
|
|
32
|
-
* @param N - number of
|
|
32
|
+
* @param N - number of indexed elements
|
|
33
33
|
* @param x - input array
|
|
34
34
|
* @param strideX - `x` stride length
|
|
35
|
-
* @param y -
|
|
35
|
+
* @param y - output array
|
|
36
36
|
* @param strideY - `y` stride length
|
|
37
|
-
* @returns
|
|
37
|
+
* @returns output array
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
40
|
* var Complex64Array = require( `@stdlib/array/complex64` );
|
|
@@ -60,14 +60,14 @@ interface Routine {
|
|
|
60
60
|
/**
|
|
61
61
|
* Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector using alternative indexing semantics.
|
|
62
62
|
*
|
|
63
|
-
* @param N - number of
|
|
63
|
+
* @param N - number of indexed elements
|
|
64
64
|
* @param x - input array
|
|
65
65
|
* @param strideX - `x` stride length
|
|
66
66
|
* @param offsetX - starting index for `x`
|
|
67
|
-
* @param y -
|
|
67
|
+
* @param y - output array
|
|
68
68
|
* @param strideY - `y` stride length
|
|
69
69
|
* @param offsetY - starting index for `y`
|
|
70
|
-
* @returns
|
|
70
|
+
* @returns output array
|
|
71
71
|
*
|
|
72
72
|
* @example
|
|
73
73
|
* var Complex64Array = require( `@stdlib/array/complex64` );
|
|
@@ -94,12 +94,12 @@ interface Routine {
|
|
|
94
94
|
/**
|
|
95
95
|
* Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
|
|
96
96
|
*
|
|
97
|
-
* @param N - number of
|
|
97
|
+
* @param N - number of indexed elements
|
|
98
98
|
* @param x - input array
|
|
99
99
|
* @param strideX - `x` stride length
|
|
100
|
-
* @param y -
|
|
100
|
+
* @param y - output array
|
|
101
101
|
* @param strideY - `y` stride length
|
|
102
|
-
* @returns
|
|
102
|
+
* @returns output array
|
|
103
103
|
*
|
|
104
104
|
* @example
|
|
105
105
|
* var Complex64Array = require( `@stdlib/array/complex64` );
|
package/include.gypi
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
# Source files:
|
|
54
54
|
'src_files': [
|
|
55
|
-
'<(src_dir)/addon.
|
|
55
|
+
'<(src_dir)/addon.c',
|
|
56
56
|
'<!@(node -e "var arr = require(\'@stdlib/utils-library-manifest\')(\'./manifest.json\',{\'os\':\'<(OS)\',\'blas\':\'<(blas)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).src; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
|
|
57
57
|
],
|
|
58
58
|
|
package/lib/ccopy.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
// MODULES //
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var reinterpret = require( '@stdlib/strided-base-reinterpret-complex64' );
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
// MAIN //
|
|
@@ -28,12 +28,12 @@ var Float32Array = require( '@stdlib/array-float32' );
|
|
|
28
28
|
/**
|
|
29
29
|
* Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
|
|
30
30
|
*
|
|
31
|
-
* @param {PositiveInteger} N - number of
|
|
31
|
+
* @param {PositiveInteger} N - number of indexed elements
|
|
32
32
|
* @param {Complex64Array} x - input array
|
|
33
33
|
* @param {integer} strideX - `x` stride length
|
|
34
|
-
* @param {Complex64Array} y -
|
|
34
|
+
* @param {Complex64Array} y - output array
|
|
35
35
|
* @param {integer} strideY - `y` stride length
|
|
36
|
-
* @returns {Complex64Array}
|
|
36
|
+
* @returns {Complex64Array} output array
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* var Complex64Array = require( '@stdlib/array-complex64' );
|
|
@@ -66,8 +66,8 @@ function ccopy( N, x, strideX, y, strideY ) {
|
|
|
66
66
|
if ( N <= 0 ) {
|
|
67
67
|
return y;
|
|
68
68
|
}
|
|
69
|
-
viewX =
|
|
70
|
-
viewY =
|
|
69
|
+
viewX = reinterpret( x, 0 );
|
|
70
|
+
viewY = reinterpret( y, 0 );
|
|
71
71
|
if ( strideX === 1 && strideY === 1 ) {
|
|
72
72
|
for ( i = 0; i < N*2; i += 2 ) {
|
|
73
73
|
viewY[ i ] = viewX[ i ];
|
package/lib/ccopy.native.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
// MODULES //
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var reinterpret = require( '@stdlib/strided-base-reinterpret-complex64' );
|
|
24
24
|
var addon = require( './../src/addon.node' );
|
|
25
25
|
|
|
26
26
|
|
|
@@ -29,12 +29,12 @@ var addon = require( './../src/addon.node' );
|
|
|
29
29
|
/**
|
|
30
30
|
* Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
|
|
31
31
|
*
|
|
32
|
-
* @param {PositiveInteger} N - number of
|
|
32
|
+
* @param {PositiveInteger} N - number of indexed elements
|
|
33
33
|
* @param {Complex64Array} x - input array
|
|
34
34
|
* @param {integer} strideX - `x` stride length
|
|
35
|
-
* @param {Complex64Array} y -
|
|
35
|
+
* @param {Complex64Array} y - output array
|
|
36
36
|
* @param {integer} strideY - `y` stride length
|
|
37
|
-
* @returns {Complex64Array}
|
|
37
|
+
* @returns {Complex64Array} output array
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
40
|
* var Complex64Array = require( '@stdlib/array-complex64' );
|
|
@@ -56,8 +56,8 @@ var addon = require( './../src/addon.node' );
|
|
|
56
56
|
* // returns 2.0
|
|
57
57
|
*/
|
|
58
58
|
function ccopy( N, x, strideX, y, strideY ) {
|
|
59
|
-
var viewX =
|
|
60
|
-
var viewY =
|
|
59
|
+
var viewX = reinterpret( x, 0 );
|
|
60
|
+
var viewY = reinterpret( y, 0 );
|
|
61
61
|
addon( N, viewX, strideX, viewY, strideY );
|
|
62
62
|
return y;
|
|
63
63
|
}
|
package/lib/ndarray.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
// MODULES //
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var reinterpret = require( '@stdlib/strided-base-reinterpret-complex64' );
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
// MAIN //
|
|
@@ -28,14 +28,14 @@ var Float32Array = require( '@stdlib/array-float32' );
|
|
|
28
28
|
/**
|
|
29
29
|
* Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
|
|
30
30
|
*
|
|
31
|
-
* @param {PositiveInteger} N - number of
|
|
31
|
+
* @param {PositiveInteger} N - number of indexed elements
|
|
32
32
|
* @param {Complex64Array} x - input array
|
|
33
33
|
* @param {integer} strideX - `x` stride length
|
|
34
34
|
* @param {NonNegativeInteger} offsetX - starting `x` index
|
|
35
|
-
* @param {Complex64Array} y -
|
|
35
|
+
* @param {Complex64Array} y - output array
|
|
36
36
|
* @param {integer} strideY - `y` stride length
|
|
37
37
|
* @param {NonNegativeInteger} offsetY - starting `y` index
|
|
38
|
-
* @returns {Complex64Array}
|
|
38
|
+
* @returns {Complex64Array} output array
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
41
|
* var Complex64Array = require( '@stdlib/array-complex64' );
|
|
@@ -68,8 +68,8 @@ function ccopy( N, x, strideX, offsetX, y, strideY, offsetY ) {
|
|
|
68
68
|
if ( N <= 0 ) {
|
|
69
69
|
return y;
|
|
70
70
|
}
|
|
71
|
-
viewX =
|
|
72
|
-
viewY =
|
|
71
|
+
viewX = reinterpret( x, 0 );
|
|
72
|
+
viewY = reinterpret( y, 0 );
|
|
73
73
|
sx = strideX * 2;
|
|
74
74
|
sy = strideY * 2;
|
|
75
75
|
ix = offsetX * 2;
|
package/lib/ndarray.native.js
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
// MODULES //
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var reinterpret = require( '@stdlib/strided-base-reinterpret-complex64' );
|
|
24
|
+
var minViewBufferIndex = require( '@stdlib/strided-base-min-view-buffer-index' );
|
|
24
25
|
var addon = require( './../src/addon.node' );
|
|
25
26
|
|
|
26
27
|
|
|
@@ -29,14 +30,14 @@ var addon = require( './../src/addon.node' );
|
|
|
29
30
|
/**
|
|
30
31
|
* Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
|
|
31
32
|
*
|
|
32
|
-
* @param {PositiveInteger} N - number of
|
|
33
|
+
* @param {PositiveInteger} N - number of indexed elements
|
|
33
34
|
* @param {Complex64Array} x - input array
|
|
34
35
|
* @param {integer} strideX - `x` stride length
|
|
35
36
|
* @param {NonNegativeInteger} offsetX - starting `x` index
|
|
36
|
-
* @param {Complex64Array} y -
|
|
37
|
+
* @param {Complex64Array} y - output array
|
|
37
38
|
* @param {integer} strideY - `y` stride length
|
|
38
39
|
* @param {NonNegativeInteger} offsetY - starting `y` index
|
|
39
|
-
* @returns {Complex64Array}
|
|
40
|
+
* @returns {Complex64Array} output array
|
|
40
41
|
*
|
|
41
42
|
* @example
|
|
42
43
|
* var Complex64Array = require( '@stdlib/array-complex64' );
|
|
@@ -60,14 +61,13 @@ var addon = require( './../src/addon.node' );
|
|
|
60
61
|
function ccopy( N, x, strideX, offsetX, y, strideY, offsetY ) {
|
|
61
62
|
var viewX;
|
|
62
63
|
var viewY;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
viewY = new Float32Array( y.buffer, y.byteOffset+(y.BYTES_PER_ELEMENT*offsetY), 2*(y.length-offsetY) ); // eslint-disable-line max-len
|
|
64
|
+
|
|
65
|
+
offsetX = minViewBufferIndex( N, strideX, offsetX );
|
|
66
|
+
offsetY = minViewBufferIndex( N, strideY, offsetY );
|
|
67
|
+
|
|
68
|
+
viewX = reinterpret( x, offsetX );
|
|
69
|
+
viewY = reinterpret( y, offsetY );
|
|
70
|
+
|
|
71
71
|
addon( N, viewX, strideX, viewY, strideY );
|
|
72
72
|
return y;
|
|
73
73
|
}
|