@stdlib/blas-base-ccopy 0.2.0 → 0.3.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/README.md CHANGED
@@ -59,8 +59,8 @@ Copies values from `x` into `y`.
59
59
 
60
60
  ```javascript
61
61
  var Complex64Array = require( '@stdlib/array-complex64' );
62
- var realf = require( '@stdlib/complex-realf' );
63
- var imagf = require( '@stdlib/complex-imagf' );
62
+ var realf = require( '@stdlib/complex-float32-real' );
63
+ var imagf = require( '@stdlib/complex-float32-imag' );
64
64
 
65
65
  var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
66
66
  var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
@@ -89,8 +89,8 @@ The `N` and stride parameters determine how values from `x` are copied into `y`.
89
89
 
90
90
  ```javascript
91
91
  var Complex64Array = require( '@stdlib/array-complex64' );
92
- var realf = require( '@stdlib/complex-realf' );
93
- var imagf = require( '@stdlib/complex-imagf' );
92
+ var realf = require( '@stdlib/complex-float32-real' );
93
+ var imagf = require( '@stdlib/complex-float32-imag' );
94
94
 
95
95
  var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
96
96
  var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
@@ -113,8 +113,8 @@ Note that indexing is relative to the first index. To introduce an offset, use [
113
113
 
114
114
  ```javascript
115
115
  var Complex64Array = require( '@stdlib/array-complex64' );
116
- var realf = require( '@stdlib/complex-realf' );
117
- var imagf = require( '@stdlib/complex-imagf' );
116
+ var realf = require( '@stdlib/complex-float32-real' );
117
+ var imagf = require( '@stdlib/complex-float32-imag' );
118
118
 
119
119
  // Initial arrays...
120
120
  var x0 = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
@@ -143,8 +143,8 @@ Copies values from `x` into `y` using alternative indexing semantics.
143
143
 
144
144
  ```javascript
145
145
  var Complex64Array = require( '@stdlib/array-complex64' );
146
- var realf = require( '@stdlib/complex-realf' );
147
- var imagf = require( '@stdlib/complex-imagf' );
146
+ var realf = require( '@stdlib/complex-float32-real' );
147
+ var imagf = require( '@stdlib/complex-float32-imag' );
148
148
 
149
149
  var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
150
150
  var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
@@ -170,8 +170,8 @@ While [`typed array`][mdn-typed-array] views mandate a view offset based on the
170
170
 
171
171
  ```javascript
172
172
  var Complex64Array = require( '@stdlib/array-complex64' );
173
- var realf = require( '@stdlib/complex-realf' );
174
- var imagf = require( '@stdlib/complex-imagf' );
173
+ var realf = require( '@stdlib/complex-float32-real' );
174
+ var imagf = require( '@stdlib/complex-float32-imag' );
175
175
 
176
176
  var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
177
177
  var y = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
@@ -212,7 +212,7 @@ var im = imagf( z );
212
212
  ```javascript
213
213
  var discreteUniform = require( '@stdlib/random-base-discrete-uniform' );
214
214
  var filledarrayBy = require( '@stdlib/array-filled-by' );
215
- var Complex64 = require( '@stdlib/complex-float32' );
215
+ var Complex64 = require( '@stdlib/complex-float32-ctor' );
216
216
  var ccopy = require( '@stdlib/blas-base-ccopy' );
217
217
 
218
218
  function rand() {
@@ -234,6 +234,107 @@ console.log( y.get( y.length-1 ).toString() );
234
234
 
235
235
  <!-- /.examples -->
236
236
 
237
+ <!-- C interface documentation. -->
238
+
239
+ * * *
240
+
241
+ <section class="c">
242
+
243
+ ## C APIs
244
+
245
+ <!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
246
+
247
+ <section class="intro">
248
+
249
+ </section>
250
+
251
+ <!-- /.intro -->
252
+
253
+ <!-- C usage documentation. -->
254
+
255
+ <section class="usage">
256
+
257
+ ### Usage
258
+
259
+ ```c
260
+ #include "stdlib/blas/base/ccopy.h"
261
+ ```
262
+
263
+ #### c_ccopy( N, \*X, strideX, \*Y, strideY )
264
+
265
+ Copies values from `X` into `Y`.
266
+
267
+ ```c
268
+ const float x[] = { 1.0f, 2.0f, 3.0f, 4.0f }; // interleaved real and imaginary components
269
+ float y[] = { 0.0f, 0.0f, 0.0f, 0.0f };
270
+
271
+ c_ccopy( 2, (void *)x, 1, (void *)Y, 1 );
272
+ ```
273
+
274
+ The function accepts the following arguments:
275
+
276
+ - **N**: `[in] CBLAS_INT` number of indexed elements.
277
+ - **X**: `[in] void*` input array.
278
+ - **strideX**: `[in] CBLAS_INT` index increment for `X`.
279
+ - **Y**: `[out] void*` output array.
280
+ - **strideY**: `[in] CBLAS_INT` index increment for `Y`.
281
+
282
+ ```c
283
+ void c_ccopy( const CBLAS_INT N, const void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY );
284
+ ```
285
+
286
+ </section>
287
+
288
+ <!-- /.usage -->
289
+
290
+ <!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
291
+
292
+ <section class="notes">
293
+
294
+ </section>
295
+
296
+ <!-- /.notes -->
297
+
298
+ <!-- C API usage examples. -->
299
+
300
+ <section class="examples">
301
+
302
+ ### Examples
303
+
304
+ ```c
305
+ #include "stdlib/blas/base/ccopy.h"
306
+ #include <stdio.h>
307
+
308
+ int main( void ) {
309
+ // Create strided arrays:
310
+ const float x[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
311
+ float y[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f };
312
+
313
+ // Specify the number of elements:
314
+ const int N = 4;
315
+
316
+ // Specify stride lengths:
317
+ const int strideX = 1;
318
+ const int strideY = -1;
319
+
320
+ // Copy elements:
321
+ c_ccopy( N, (void *)x, strideX, (void *)y, strideY );
322
+
323
+ // Print the result:
324
+ for ( int i = 0; i < N; i++ ) {
325
+ printf( "y[ %i ] = %f + %fj\n", i, y[ i*2 ], y[ (i*2)+1 ] );
326
+ }
327
+ }
328
+ ```
329
+
330
+ </section>
331
+
332
+ <!-- /.examples -->
333
+
334
+ </section>
335
+
336
+ <!-- /.c -->
337
+
237
338
  <!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
238
339
 
239
340
  <section class="related">
@@ -287,8 +388,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
287
388
  [npm-image]: http://img.shields.io/npm/v/@stdlib/blas-base-ccopy.svg
288
389
  [npm-url]: https://npmjs.org/package/@stdlib/blas-base-ccopy
289
390
 
290
- [test-image]: https://github.com/stdlib-js/blas-base-ccopy/actions/workflows/test.yml/badge.svg?branch=v0.2.0
291
- [test-url]: https://github.com/stdlib-js/blas-base-ccopy/actions/workflows/test.yml?query=branch:v0.2.0
391
+ [test-image]: https://github.com/stdlib-js/blas-base-ccopy/actions/workflows/test.yml/badge.svg?branch=v0.3.0
392
+ [test-url]: https://github.com/stdlib-js/blas-base-ccopy/actions/workflows/test.yml?query=branch:v0.3.0
292
393
 
293
394
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/blas-base-ccopy/main.svg
294
395
  [coverage-url]: https://codecov.io/github/stdlib-js/blas-base-ccopy?branch=main
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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"],
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-float32-real' );\n* var imagf = require( '@stdlib/complex-float32-imag' );\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-float32-real' );\n* var imagf = require( '@stdlib/complex-float32-imag' );\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-float32-real' );\n* var imagf = require( '@stdlib/complex-float32-imag' );\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-float32-real' );\n* var imagf = require( '@stdlib/complex-float32-imag' );\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
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
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
7
  }
@@ -38,8 +38,8 @@ interface Routine {
38
38
  *
39
39
  * @example
40
40
  * var Complex64Array = require( '@stdlib/array-complex64' );
41
- * var realf = require( '@stdlib/complex-realf' );
42
- * var imagf = require( '@stdlib/complex-imagf' );
41
+ * var realf = require( '@stdlib/complex-float32-real' );
42
+ * var imagf = require( '@stdlib/complex-float32-imag' );
43
43
  *
44
44
  * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
45
45
  * var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
@@ -71,8 +71,8 @@ interface Routine {
71
71
  *
72
72
  * @example
73
73
  * var Complex64Array = require( '@stdlib/array-complex64' );
74
- * var realf = require( '@stdlib/complex-realf' );
75
- * var imagf = require( '@stdlib/complex-imagf' );
74
+ * var realf = require( '@stdlib/complex-float32-real' );
75
+ * var imagf = require( '@stdlib/complex-float32-imag' );
76
76
  *
77
77
  * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
78
78
  * var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
@@ -103,8 +103,8 @@ interface Routine {
103
103
  *
104
104
  * @example
105
105
  * var Complex64Array = require( '@stdlib/array-complex64' );
106
- * var realf = require( '@stdlib/complex-realf' );
107
- * var imagf = require( '@stdlib/complex-imagf' );
106
+ * var realf = require( '@stdlib/complex-float32-real' );
107
+ * var imagf = require( '@stdlib/complex-float32-imag' );
108
108
  *
109
109
  * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
110
110
  * var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
@@ -122,8 +122,8 @@ interface Routine {
122
122
  *
123
123
  * @example
124
124
  * var Complex64Array = require( '@stdlib/array-complex64' );
125
- * var realf = require( '@stdlib/complex-realf' );
126
- * var imagf = require( '@stdlib/complex-imagf' );
125
+ * var realf = require( '@stdlib/complex-float32-real' );
126
+ * var imagf = require( '@stdlib/complex-float32-imag' );
127
127
  *
128
128
  * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
129
129
  * var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
@@ -22,6 +22,8 @@
22
22
  #ifndef CCOPY_H
23
23
  #define CCOPY_H
24
24
 
25
+ #include "stdlib/blas/base/shared.h"
26
+
25
27
  /*
26
28
  * If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.
27
29
  */
@@ -32,7 +34,7 @@ extern "C" {
32
34
  /**
33
35
  * Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
34
36
  */
35
- void c_ccopy( const int N, const void *X, const int strideX, void *Y, const int strideY );
37
+ void API_SUFFIX(c_ccopy)( const CBLAS_INT N, const void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY );
36
38
 
37
39
  #ifdef __cplusplus
38
40
  }
@@ -22,6 +22,8 @@
22
22
  #ifndef CCOPY_CBLAS_H
23
23
  #define CCOPY_CBLAS_H
24
24
 
25
+ #include "stdlib/blas/base/shared.h"
26
+
25
27
  /*
26
28
  * If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.
27
29
  */
@@ -32,7 +34,7 @@ extern "C" {
32
34
  /**
33
35
  * Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
34
36
  */
35
- void cblas_ccopy( const int N, const void *X, const int strideX, void *Y, const int strideY );
37
+ void API_SUFFIX(cblas_ccopy)( const CBLAS_INT N, const void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY );
36
38
 
37
39
  #ifdef __cplusplus
38
40
  }
@@ -32,7 +32,7 @@ extern "C" {
32
32
  /**
33
33
  * Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
34
34
  */
35
- void ccopy( const int *, const void *, const int *, void *, const int * );
35
+ void ccopy( const CBLAS_INT *, const void *, const CBLAS_INT *, void *, const CBLAS_INT * );
36
36
 
37
37
  #ifdef __cplusplus
38
38
  }
package/lib/ccopy.js CHANGED
@@ -37,8 +37,8 @@ var reinterpret = require( '@stdlib/strided-base-reinterpret-complex64' );
37
37
  *
38
38
  * @example
39
39
  * var Complex64Array = require( '@stdlib/array-complex64' );
40
- * var realf = require( '@stdlib/complex-realf' );
41
- * var imagf = require( '@stdlib/complex-imagf' );
40
+ * var realf = require( '@stdlib/complex-float32-real' );
41
+ * var imagf = require( '@stdlib/complex-float32-imag' );
42
42
  *
43
43
  * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
44
44
  * var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
@@ -38,8 +38,8 @@ var addon = require( './../src/addon.node' );
38
38
  *
39
39
  * @example
40
40
  * var Complex64Array = require( '@stdlib/array-complex64' );
41
- * var realf = require( '@stdlib/complex-realf' );
42
- * var imagf = require( '@stdlib/complex-imagf' );
41
+ * var realf = require( '@stdlib/complex-float32-real' );
42
+ * var imagf = require( '@stdlib/complex-float32-imag' );
43
43
  *
44
44
  * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
45
45
  * var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
package/lib/index.js CHANGED
@@ -25,8 +25,8 @@
25
25
  *
26
26
  * @example
27
27
  * var Complex64Array = require( '@stdlib/array-complex64' );
28
- * var realf = require( '@stdlib/complex-realf' );
29
- * var imagf = require( '@stdlib/complex-imagf' );
28
+ * var realf = require( '@stdlib/complex-float32-real' );
29
+ * var imagf = require( '@stdlib/complex-float32-imag' );
30
30
  * var ccopy = require( '@stdlib/blas-base-ccopy' );
31
31
  *
32
32
  * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
@@ -45,8 +45,8 @@
45
45
  *
46
46
  * @example
47
47
  * var Complex64Array = require( '@stdlib/array-complex64' );
48
- * var realf = require( '@stdlib/complex-realf' );
49
- * var imagf = require( '@stdlib/complex-imagf' );
48
+ * var realf = require( '@stdlib/complex-float32-real' );
49
+ * var imagf = require( '@stdlib/complex-float32-imag' );
50
50
  * var ccopy = require( '@stdlib/blas-base-ccopy' );
51
51
  *
52
52
  * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
package/lib/ndarray.js CHANGED
@@ -39,8 +39,8 @@ var reinterpret = require( '@stdlib/strided-base-reinterpret-complex64' );
39
39
  *
40
40
  * @example
41
41
  * var Complex64Array = require( '@stdlib/array-complex64' );
42
- * var realf = require( '@stdlib/complex-realf' );
43
- * var imagf = require( '@stdlib/complex-imagf' );
42
+ * var realf = require( '@stdlib/complex-float32-real' );
43
+ * var imagf = require( '@stdlib/complex-float32-imag' );
44
44
  *
45
45
  * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
46
46
  * var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
@@ -41,8 +41,8 @@ var addon = require( './../src/addon.node' );
41
41
  *
42
42
  * @example
43
43
  * var Complex64Array = require( '@stdlib/array-complex64' );
44
- * var realf = require( '@stdlib/complex-realf' );
45
- * var imagf = require( '@stdlib/complex-imagf' );
44
+ * var realf = require( '@stdlib/complex-float32-real' );
45
+ * var imagf = require( '@stdlib/complex-float32-imag' );
46
46
  *
47
47
  * var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
48
48
  * var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
package/manifest.json CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "options": {
3
+ "task": "build",
3
4
  "os": "linux",
4
5
  "blas": "",
5
6
  "wasm": false
@@ -28,6 +29,7 @@
28
29
  ],
29
30
  "confs": [
30
31
  {
32
+ "task": "build",
31
33
  "os": "linux",
32
34
  "blas": "",
33
35
  "wasm": false,
@@ -44,10 +46,47 @@
44
46
  "@stdlib/napi-export",
45
47
  "@stdlib/napi-argv",
46
48
  "@stdlib/napi-argv-int64",
47
- "@stdlib/napi-argv-strided-complex64array"
49
+ "@stdlib/napi-argv-strided-complex64array",
50
+ "@stdlib/blas-base-shared"
48
51
  ]
49
52
  },
50
53
  {
54
+ "task": "benchmark",
55
+ "os": "linux",
56
+ "blas": "",
57
+ "wasm": false,
58
+ "src": [
59
+ "./src/ccopy.c"
60
+ ],
61
+ "include": [
62
+ "./include"
63
+ ],
64
+ "libraries": [],
65
+ "libpath": [],
66
+ "dependencies": [
67
+ "@stdlib/blas-base-shared"
68
+ ]
69
+ },
70
+ {
71
+ "task": "examples",
72
+ "os": "linux",
73
+ "blas": "",
74
+ "wasm": false,
75
+ "src": [
76
+ "./src/ccopy.c"
77
+ ],
78
+ "include": [
79
+ "./include"
80
+ ],
81
+ "libraries": [],
82
+ "libpath": [],
83
+ "dependencies": [
84
+ "@stdlib/blas-base-shared"
85
+ ]
86
+ },
87
+
88
+ {
89
+ "task": "build",
51
90
  "os": "linux",
52
91
  "blas": "openblas",
53
92
  "wasm": false,
@@ -66,10 +105,53 @@
66
105
  "@stdlib/napi-export",
67
106
  "@stdlib/napi-argv",
68
107
  "@stdlib/napi-argv-int64",
69
- "@stdlib/napi-argv-strided-complex64array"
108
+ "@stdlib/napi-argv-strided-complex64array",
109
+ "@stdlib/blas-base-shared"
70
110
  ]
71
111
  },
72
112
  {
113
+ "task": "benchmark",
114
+ "os": "linux",
115
+ "blas": "openblas",
116
+ "wasm": false,
117
+ "src": [
118
+ "./src/ccopy_cblas.c"
119
+ ],
120
+ "include": [
121
+ "./include"
122
+ ],
123
+ "libraries": [
124
+ "-lopenblas",
125
+ "-lpthread"
126
+ ],
127
+ "libpath": [],
128
+ "dependencies": [
129
+ "@stdlib/blas-base-shared"
130
+ ]
131
+ },
132
+ {
133
+ "task": "examples",
134
+ "os": "linux",
135
+ "blas": "openblas",
136
+ "wasm": false,
137
+ "src": [
138
+ "./src/ccopy_cblas.c"
139
+ ],
140
+ "include": [
141
+ "./include"
142
+ ],
143
+ "libraries": [
144
+ "-lopenblas",
145
+ "-lpthread"
146
+ ],
147
+ "libpath": [],
148
+ "dependencies": [
149
+ "@stdlib/blas-base-shared"
150
+ ]
151
+ },
152
+
153
+ {
154
+ "task": "build",
73
155
  "os": "mac",
74
156
  "blas": "",
75
157
  "wasm": false,
@@ -86,10 +168,47 @@
86
168
  "@stdlib/napi-export",
87
169
  "@stdlib/napi-argv",
88
170
  "@stdlib/napi-argv-int64",
89
- "@stdlib/napi-argv-strided-complex64array"
171
+ "@stdlib/napi-argv-strided-complex64array",
172
+ "@stdlib/blas-base-shared"
90
173
  ]
91
174
  },
92
175
  {
176
+ "task": "benchmark",
177
+ "os": "mac",
178
+ "blas": "",
179
+ "wasm": false,
180
+ "src": [
181
+ "./src/ccopy.c"
182
+ ],
183
+ "include": [
184
+ "./include"
185
+ ],
186
+ "libraries": [],
187
+ "libpath": [],
188
+ "dependencies": [
189
+ "@stdlib/blas-base-shared"
190
+ ]
191
+ },
192
+ {
193
+ "task": "examples",
194
+ "os": "mac",
195
+ "blas": "",
196
+ "wasm": false,
197
+ "src": [
198
+ "./src/ccopy.c"
199
+ ],
200
+ "include": [
201
+ "./include"
202
+ ],
203
+ "libraries": [],
204
+ "libpath": [],
205
+ "dependencies": [
206
+ "@stdlib/blas-base-shared"
207
+ ]
208
+ },
209
+
210
+ {
211
+ "task": "build",
93
212
  "os": "mac",
94
213
  "blas": "apple_accelerate_framework",
95
214
  "wasm": false,
@@ -107,10 +226,51 @@
107
226
  "@stdlib/napi-export",
108
227
  "@stdlib/napi-argv",
109
228
  "@stdlib/napi-argv-int64",
110
- "@stdlib/napi-argv-strided-complex64array"
229
+ "@stdlib/napi-argv-strided-complex64array",
230
+ "@stdlib/blas-base-shared"
231
+ ]
232
+ },
233
+ {
234
+ "task": "benchmark",
235
+ "os": "mac",
236
+ "blas": "apple_accelerate_framework",
237
+ "wasm": false,
238
+ "src": [
239
+ "./src/ccopy_cblas.c"
240
+ ],
241
+ "include": [
242
+ "./include"
243
+ ],
244
+ "libraries": [
245
+ "-lblas"
246
+ ],
247
+ "libpath": [],
248
+ "dependencies": [
249
+ "@stdlib/blas-base-shared"
250
+ ]
251
+ },
252
+ {
253
+ "task": "examples",
254
+ "os": "mac",
255
+ "blas": "apple_accelerate_framework",
256
+ "wasm": false,
257
+ "src": [
258
+ "./src/ccopy_cblas.c"
259
+ ],
260
+ "include": [
261
+ "./include"
262
+ ],
263
+ "libraries": [
264
+ "-lblas"
265
+ ],
266
+ "libpath": [],
267
+ "dependencies": [
268
+ "@stdlib/blas-base-shared"
111
269
  ]
112
270
  },
271
+
113
272
  {
273
+ "task": "build",
114
274
  "os": "mac",
115
275
  "blas": "openblas",
116
276
  "wasm": false,
@@ -129,10 +289,53 @@
129
289
  "@stdlib/napi-export",
130
290
  "@stdlib/napi-argv",
131
291
  "@stdlib/napi-argv-int64",
132
- "@stdlib/napi-argv-strided-complex64array"
292
+ "@stdlib/napi-argv-strided-complex64array",
293
+ "@stdlib/blas-base-shared"
133
294
  ]
134
295
  },
135
296
  {
297
+ "task": "benchmark",
298
+ "os": "mac",
299
+ "blas": "openblas",
300
+ "wasm": false,
301
+ "src": [
302
+ "./src/ccopy_cblas.c"
303
+ ],
304
+ "include": [
305
+ "./include"
306
+ ],
307
+ "libraries": [
308
+ "-lopenblas",
309
+ "-lpthread"
310
+ ],
311
+ "libpath": [],
312
+ "dependencies": [
313
+ "@stdlib/blas-base-shared"
314
+ ]
315
+ },
316
+ {
317
+ "task": "examples",
318
+ "os": "mac",
319
+ "blas": "openblas",
320
+ "wasm": false,
321
+ "src": [
322
+ "./src/ccopy_cblas.c"
323
+ ],
324
+ "include": [
325
+ "./include"
326
+ ],
327
+ "libraries": [
328
+ "-lopenblas",
329
+ "-lpthread"
330
+ ],
331
+ "libpath": [],
332
+ "dependencies": [
333
+ "@stdlib/blas-base-shared"
334
+ ]
335
+ },
336
+
337
+ {
338
+ "task": "build",
136
339
  "os": "win",
137
340
  "blas": "",
138
341
  "wasm": false,
@@ -148,10 +351,47 @@
148
351
  "@stdlib/napi-export",
149
352
  "@stdlib/napi-argv",
150
353
  "@stdlib/napi-argv-int64",
151
- "@stdlib/napi-argv-strided-complex64array"
354
+ "@stdlib/napi-argv-strided-complex64array",
355
+ "@stdlib/blas-base-shared"
152
356
  ]
153
357
  },
154
358
  {
359
+ "task": "benchmark",
360
+ "os": "win",
361
+ "blas": "",
362
+ "wasm": false,
363
+ "src": [
364
+ "./src/ccopy.c"
365
+ ],
366
+ "include": [
367
+ "./include"
368
+ ],
369
+ "libraries": [],
370
+ "libpath": [],
371
+ "dependencies": [
372
+ "@stdlib/blas-base-shared"
373
+ ]
374
+ },
375
+ {
376
+ "task": "examples",
377
+ "os": "win",
378
+ "blas": "",
379
+ "wasm": false,
380
+ "src": [
381
+ "./src/ccopy.c"
382
+ ],
383
+ "include": [
384
+ "./include"
385
+ ],
386
+ "libraries": [],
387
+ "libpath": [],
388
+ "dependencies": [
389
+ "@stdlib/blas-base-shared"
390
+ ]
391
+ },
392
+
393
+ {
394
+ "task": "build",
155
395
  "os": "",
156
396
  "blas": "",
157
397
  "wasm": true,
@@ -163,7 +403,9 @@
163
403
  ],
164
404
  "libraries": [],
165
405
  "libpath": [],
166
- "dependencies": []
406
+ "dependencies": [
407
+ "@stdlib/blas-base-shared"
408
+ ]
167
409
  }
168
410
  ]
169
411
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/blas-base-ccopy",
3
- "version": "0.2.0",
3
+ "version": "0.3.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": {
@@ -17,21 +17,14 @@
17
17
  "browser": "./lib/main.js",
18
18
  "gypfile": false,
19
19
  "directories": {
20
- "benchmark": "./benchmark",
21
20
  "doc": "./docs",
22
- "example": "./examples",
23
21
  "include": "./include",
24
22
  "lib": "./lib",
25
23
  "src": "./src",
26
- "test": "./test"
24
+ "dist": "./dist"
27
25
  },
28
26
  "types": "./docs/types",
29
- "scripts": {
30
- "test": "make test",
31
- "test-cov": "make test-cov",
32
- "examples": "make examples",
33
- "benchmark": "make benchmark"
34
- },
27
+ "scripts": {},
35
28
  "homepage": "https://stdlib.io",
36
29
  "repository": {
37
30
  "type": "git",
@@ -41,35 +34,18 @@
41
34
  "url": "https://github.com/stdlib-js/stdlib/issues"
42
35
  },
43
36
  "dependencies": {
44
- "@stdlib/assert-is-error": "^0.2.0",
45
- "@stdlib/napi-argv": "^0.2.0",
46
- "@stdlib/napi-argv-int64": "^0.2.0",
47
- "@stdlib/napi-argv-strided-complex64array": "^0.2.0",
48
- "@stdlib/napi-export": "^0.2.0",
37
+ "@stdlib/assert-is-error": "^0.2.2",
38
+ "@stdlib/blas-base-shared": "^0.1.0",
39
+ "@stdlib/napi-argv": "^0.2.2",
40
+ "@stdlib/napi-argv-int64": "^0.2.2",
41
+ "@stdlib/napi-argv-strided-complex64array": "^0.2.2",
42
+ "@stdlib/napi-export": "^0.2.2",
49
43
  "@stdlib/strided-base-reinterpret-complex64": "^0.2.0",
50
- "@stdlib/types": "^0.3.1",
51
- "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.0",
52
- "@stdlib/utils-library-manifest": "^0.2.0",
53
- "@stdlib/utils-try-require": "^0.2.0"
54
- },
55
- "devDependencies": {
56
- "@stdlib/array-complex64": "^0.1.0",
57
- "@stdlib/array-filled-by": "^0.1.0",
58
- "@stdlib/array-float32": "^0.1.1",
59
- "@stdlib/assert-is-browser": "^0.1.1",
60
- "@stdlib/complex-float32": "^0.1.1",
61
- "@stdlib/math-base-assert-is-nan": "^0.1.1",
62
- "@stdlib/math-base-special-pow": "^0.1.0",
63
- "@stdlib/random-array-uniform": "^0.1.0",
64
- "@stdlib/random-base-discrete-uniform": "^0.1.0",
65
- "@stdlib/strided-base-min-view-buffer-index": "^0.2.0",
66
- "proxyquire": "^2.0.0",
67
- "tape": "git+https://github.com/kgryte/tape.git#fix/globby",
68
- "istanbul": "^0.4.1",
69
- "tap-min": "git+https://github.com/Planeshifter/tap-min.git",
70
- "@stdlib/bench-harness": "^0.1.2",
71
- "@stdlib/bench": "^0.3.1"
44
+ "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2",
45
+ "@stdlib/utils-library-manifest": "^0.2.2",
46
+ "@stdlib/utils-try-require": "^0.2.2"
72
47
  },
48
+ "devDependencies": {},
73
49
  "engines": {
74
50
  "node": ">=0.10.0",
75
51
  "npm": ">2.7.0"
package/src/addon.c CHANGED
@@ -17,6 +17,7 @@
17
17
  */
18
18
 
19
19
  #include "stdlib/blas/base/ccopy.h"
20
+ #include "stdlib/blas/base/shared.h"
20
21
  #include "stdlib/napi/export.h"
21
22
  #include "stdlib/napi/argv.h"
22
23
  #include "stdlib/napi/argv_int64.h"
@@ -26,7 +27,6 @@
26
27
  /**
27
28
  * Receives JavaScript callback invocation data.
28
29
  *
29
- * @private
30
30
  * @param env environment under which the function is invoked
31
31
  * @param info callback data
32
32
  * @return Node-API value
@@ -38,7 +38,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
38
38
  STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 4 );
39
39
  STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, X, N, strideX, argv, 1 );
40
40
  STDLIB_NAPI_ARGV_STRIDED_COMPLEX64ARRAY( env, Y, N, strideY, argv, 3 );
41
- c_ccopy( N, (void *)X, strideX, (void *)Y, strideY );
41
+ API_SUFFIX(c_ccopy)( N, (void *)X, strideX, (void *)Y, strideY );
42
42
  return NULL;
43
43
  }
44
44
 
package/src/ccopy.c CHANGED
@@ -17,6 +17,7 @@
17
17
  */
18
18
 
19
19
  #include "stdlib/blas/base/ccopy.h"
20
+ #include "stdlib/blas/base/shared.h"
20
21
 
21
22
  /**
22
23
  * Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
@@ -27,12 +28,12 @@
27
28
  * @param Y output array
28
29
  * @param strideY Y stride length
29
30
  */
30
- void c_ccopy( const int N, const void *X, const int strideX, void *Y, const int strideY ) {
31
+ void API_SUFFIX(c_ccopy)( const CBLAS_INT N, const void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY ) {
31
32
  float *x = (float *)X;
32
33
  float *y = (float *)Y;
33
- int ix;
34
- int iy;
35
- int i;
34
+ CBLAS_INT ix;
35
+ CBLAS_INT iy;
36
+ CBLAS_INT i;
36
37
 
37
38
  if ( N <= 0 ) {
38
39
  return;
package/src/ccopy.f CHANGED
@@ -91,4 +91,4 @@ subroutine ccopy( N, cx, strideX, cy, strideY )
91
91
  end do
92
92
  end if
93
93
  return
94
- end subroutine ccopy
94
+ end subroutine ccopy
package/src/ccopy_cblas.c CHANGED
@@ -18,6 +18,7 @@
18
18
 
19
19
  #include "stdlib/blas/base/ccopy.h"
20
20
  #include "stdlib/blas/base/ccopy_cblas.h"
21
+ #include "stdlib/blas/base/shared.h"
21
22
 
22
23
  /**
23
24
  * Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
@@ -28,6 +29,6 @@
28
29
  * @param Y output array
29
30
  * @param strideY Y stride length
30
31
  */
31
- void c_ccopy( const int N, const void *X, const int strideX, void *Y, const int strideY ) {
32
- cblas_ccopy( N, X, strideX, Y, strideY );
32
+ void API_SUFFIX(c_ccopy)( const CBLAS_INT N, const void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY ) {
33
+ API_SUFFIX(cblas_ccopy)( N, X, strideX, Y, strideY );
33
34
  }
package/src/ccopy_f.c CHANGED
@@ -18,6 +18,7 @@
18
18
 
19
19
  #include "stdlib/blas/base/ccopy.h"
20
20
  #include "stdlib/blas/base/ccopy_fortran.h"
21
+ #include "stdlib/blas/base/shared.h"
21
22
 
22
23
  /**
23
24
  * Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.
@@ -28,6 +29,6 @@
28
29
  * @param Y output array
29
30
  * @param strideY Y stride length
30
31
  */
31
- void c_ccopy( const int N, const void *X, const int strideX, void *Y, const int strideY ) {
32
+ void API_SUFFIX(c_ccopy)( const CBLAS_INT N, const void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY ) {
32
33
  ccopy( &N, X, &strideX, Y, &strideY );
33
34
  }
package/include.gypi DELETED
@@ -1,70 +0,0 @@
1
- # @license Apache-2.0
2
- #
3
- # Copyright (c) 2020 The Stdlib Authors.
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- # A GYP include file for building a Node.js native add-on.
18
- #
19
- # Note that nesting variables is required due to how GYP processes a configuration. Any variables defined within a nested 'variables' section is defined in the outer scope. Thus, conditions in the outer variable scope are free to use these variables without running into "variable undefined" errors.
20
- #
21
- # Main documentation:
22
- #
23
- # [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
24
- # [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
25
- #
26
- # Variable nesting hacks:
27
- #
28
- # [3]: https://chromium.googlesource.com/external/skia/gyp/+/master/common_variables.gypi
29
- # [4]: https://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi?revision=127004
30
- {
31
- # Define variables to be used throughout the configuration for all targets:
32
- 'variables': {
33
- 'variables': {
34
- # Host BLAS library (to override -Dblas=<blas>):
35
- 'blas%': '',
36
-
37
- # Path to BLAS library (to override -Dblas_dir=<path>):
38
- 'blas_dir%': '',
39
- }, # end variables
40
-
41
- # Source directory:
42
- 'src_dir': './src',
43
-
44
- # Include directories:
45
- 'include_dirs': [
46
- '<@(blas_dir)',
47
- '<!@(node -e "var arr = require(\'@stdlib/utils-library-manifest\')(\'./manifest.json\',{\'os\':\'<(OS)\',\'blas\':\'<(blas)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).include; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
48
- ],
49
-
50
- # Add-on destination directory:
51
- 'addon_output_dir': './src',
52
-
53
- # Source files:
54
- 'src_files': [
55
- '<(src_dir)/addon.c',
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
- ],
58
-
59
- # Library dependencies:
60
- 'libraries': [
61
- '<!@(node -e "var arr = require(\'@stdlib/utils-library-manifest\')(\'./manifest.json\',{\'os\':\'<(OS)\',\'blas\':\'<(blas)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).libraries; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
62
- ],
63
-
64
- # Library directories:
65
- 'library_dirs': [
66
- '<@(blas_dir)',
67
- '<!@(node -e "var arr = require(\'@stdlib/utils-library-manifest\')(\'./manifest.json\',{\'os\':\'<(OS)\',\'blas\':\'<(blas)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).libpath; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
68
- ],
69
- }, # end variables
70
- }