diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f01fbb..a5aa3a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@
-## Unreleased (2024-07-14) +## Unreleased (2024-07-17)
@@ -22,6 +22,8 @@
+- [`8d4c46b`](https://github.com/stdlib-js/stdlib/commit/8d4c46b10ca912401e0ff0caa37a17cd3c443c2f) - **refactor:** update paths _(by Athan Reines)_ +- [`18b3c79`](https://github.com/stdlib-js/stdlib/commit/18b3c79c5035c7082618b7379cd6576e64393a96) - **refactor:** update paths _(by Athan Reines)_ - [`7d65943`](https://github.com/stdlib-js/stdlib/commit/7d65943604945f9a9e3ad63267c9d91a8c26da2c) - **feat:** add `blas/base/caxpy` [(#2121)](https://github.com/stdlib-js/stdlib/pull/2121) _(by Aman Bhansali, Athan Reines)_
diff --git a/README.md b/README.md index a972c7d..3ba1885 100644 --- a/README.md +++ b/README.md @@ -70,8 +70,8 @@ Scales values from `cx` by `ca` and adds the result to `cy`. ```javascript var Complex64Array = require( '@stdlib/array-complex64' ); var Complex64 = require('@stdlib/complex-float32-ctor'); -var realf = require( '@stdlib/complex-realf' ); -var imagf = require( '@stdlib/complex-imagf' ); +var realf = require( '@stdlib/complex-float32-real' ); +var imagf = require( '@stdlib/complex-float32-imag' ); var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); @@ -103,8 +103,8 @@ The `N` and stride parameters determine how values from `cx` are scaled by `ca` ```javascript var Complex64Array = require( '@stdlib/array-complex64' ); var Complex64 = require( '@stdlib/complex-float32-ctor' ); -var realf = require( '@stdlib/complex-realf' ); -var imagf = require( '@stdlib/complex-imagf' ); +var realf = require( '@stdlib/complex-float32-real' ); +var imagf = require( '@stdlib/complex-float32-imag' ); var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); @@ -129,8 +129,8 @@ Note that indexing is relative to the first index. To introduce an offset, use [ ```javascript var Complex64Array = require( '@stdlib/array-complex64' ); var Complex64 = require( '@stdlib/complex-float32-ctor' ); -var realf = require( '@stdlib/complex-realf' ); -var imagf = require( '@stdlib/complex-imagf' ); +var realf = require( '@stdlib/complex-float32-real' ); +var imagf = require( '@stdlib/complex-float32-imag' ); // Initial arrays... var cx0 = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); @@ -163,8 +163,8 @@ Scales values from `cx` by `ca` and adds the result to `cy` using alternative in ```javascript var Complex64Array = require( '@stdlib/array-complex64' ); var Complex64 = require( '@stdlib/complex-float32-ctor' ); -var realf = require( '@stdlib/complex-realf' ); -var imagf = require( '@stdlib/complex-imagf' ); +var realf = require( '@stdlib/complex-float32-real' ); +var imagf = require( '@stdlib/complex-float32-imag' ); var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); @@ -192,8 +192,8 @@ While [`typed array`][mdn-typed-array] views mandate a view offset based on the ```javascript var Complex64Array = require( '@stdlib/array-complex64' ); var Complex64 = require( '@stdlib/complex-float32-ctor' ); -var realf = require( '@stdlib/complex-realf' ); -var imagf = require( '@stdlib/complex-imagf' ); +var realf = require( '@stdlib/complex-float32-real' ); +var imagf = require( '@stdlib/complex-float32-imag' ); var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); diff --git a/dist/index.js.map b/dist/index.js.map index b32c1a2..302992b 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../lib/ndarray.js", "../lib/caxpy.js", "../lib/main.js", "../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 scabs1 = require( '@stdlib/blas-base-scabs1' );\nvar cmulf = require( '@stdlib/math-base-ops-cmulf' );\nvar caddf = require( '@stdlib/math-base-ops-caddf' );\n\n\n// MAIN //\n\n/**\n* Scales a single-precision complex floating-point vector by a single-precision complex floating-point constant and adds the result to a single-precision complex floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Complex64} ca - scalar constant\n* @param {Complex64Array} cx - first input array\n* @param {integer} strideX - `cx` stride length\n* @param {integer} offsetX - starting index for `cx`\n* @param {Complex64Array} cy - second input array\n* @param {integer} strideY - `cy` stride length\n* @param {integer} offsetY - starting index for `cy`\n* @returns {Complex64Array} second input array\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var Complex64 = require( '@stdlib/complex-float32-ctor' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var ca = new Complex64( 2.0, 2.0 );\n*\n* caxpy( 3, ca, cx, 1, 0, cy, 1, 0 );\n*\n* var z = cy.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns -1.0\n*\n* var im = imagf( z );\n* // returns 7.0\n*/\nfunction caxpy( N, ca, cx, strideX, offsetX, cy, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn cy;\n\t}\n\tif ( scabs1( ca ) === 0.0 ) {\n\t\treturn cy;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tcy.set( caddf( cmulf( ca, cx.get( ix ) ), cy.get( iy ) ), iy );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn cy;\n}\n\n\n// EXPORTS //\n\nmodule.exports = caxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 stride2offset = require('@stdlib/strided-base-stride2offset');\nvar ndarray = require('./ndarray.js');\n\n\n// MAIN //\n\n/**\n* Scales a single-precision complex floating-point vector by a single-precision complex floating-point constant and adds the result to a single-precision complex floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Complex64} ca - scalar constant\n* @param {Complex64Array} cx - first input array\n* @param {integer} strideX - `cx` stride length\n* @param {Complex64Array} cy - second input array\n* @param {integer} strideY - `cy` stride length\n* @returns {Complex64Array} second input array\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var Complex64 = require( '@stdlib/complex-float32-ctor' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n*\n* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var ca = new Complex64( 2.0, 2.0 );\n*\n* caxpy( 3, ca, cx, 1, cy, 1 );\n*\n* var z = cy.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns -1.0\n*\n* var im = imagf( z );\n* // returns 7.0\n*/\nfunction caxpy( N, ca, cx, strideX, cy, strideY ) {\n\tvar ix = stride2offset( N, strideX );\n\tvar iy = stride2offset( N, strideY );\n\treturn ndarray( N, ca, cx, strideX, ix, cy, strideY, iy );\n}\n\n\n// EXPORTS //\n\nmodule.exports = caxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 caxpy = require( './caxpy.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( caxpy, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = caxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 scale a single-precision complex floating-point vector by a single-precision complex floating-point constant and add the result to a single-precision complex floating-point vector.\n*\n* @module @stdlib/blas-base-caxpy\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var Complex64 = require( '@stdlib/complex-float32-ctor' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n* var caxpy = require( '@stdlib/blas-base-caxpy' );\n*\n* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var ca = new Complex64( 2.0, 2.0 );\n*\n* caxpy( 3, ca, cx, 1, cy, 1 );\n*\n* var z = cy.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns -1.0\n*\n* var im = imagf( z );\n* // returns 7.0\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var Complex64 = require( '@stdlib/complex-float32-ctor' );\n* var realf = require( '@stdlib/complex-realf' );\n* var imagf = require( '@stdlib/complex-imagf' );\n* var caxpy = require( '@stdlib/blas-base-caxpy' );\n*\n* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var ca = new Complex64( 2.0, 2.0 );\n*\n* caxpy.ndarray( 3, ca cx, 1, 0, cy, 1, 0);\n*\n* var z = cy.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns -1.0\n*\n* var im = imagf( z );\n* // returns 7.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 caxpy;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tcaxpy = main;\n} else {\n\tcaxpy = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = caxpy;\n\n// exports: { \"ndarray\": \"caxpy.ndarray\" }\n"], + "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 scabs1 = require( '@stdlib/blas-base-scabs1' );\nvar cmulf = require( '@stdlib/math-base-ops-cmulf' );\nvar caddf = require( '@stdlib/math-base-ops-caddf' );\n\n\n// MAIN //\n\n/**\n* Scales a single-precision complex floating-point vector by a single-precision complex floating-point constant and adds the result to a single-precision complex floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Complex64} ca - scalar constant\n* @param {Complex64Array} cx - first input array\n* @param {integer} strideX - `cx` stride length\n* @param {integer} offsetX - starting index for `cx`\n* @param {Complex64Array} cy - second input array\n* @param {integer} strideY - `cy` stride length\n* @param {integer} offsetY - starting index for `cy`\n* @returns {Complex64Array} second input array\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var Complex64 = require( '@stdlib/complex-float32-ctor' );\n* var realf = require( '@stdlib/complex-float32-real' );\n* var imagf = require( '@stdlib/complex-float32-imag' );\n*\n* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var ca = new Complex64( 2.0, 2.0 );\n*\n* caxpy( 3, ca, cx, 1, 0, cy, 1, 0 );\n*\n* var z = cy.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns -1.0\n*\n* var im = imagf( z );\n* // returns 7.0\n*/\nfunction caxpy( N, ca, cx, strideX, offsetX, cy, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn cy;\n\t}\n\tif ( scabs1( ca ) === 0.0 ) {\n\t\treturn cy;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tcy.set( caddf( cmulf( ca, cx.get( ix ) ), cy.get( iy ) ), iy );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn cy;\n}\n\n\n// EXPORTS //\n\nmodule.exports = caxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 stride2offset = require('@stdlib/strided-base-stride2offset');\nvar ndarray = require('./ndarray.js');\n\n\n// MAIN //\n\n/**\n* Scales a single-precision complex floating-point vector by a single-precision complex floating-point constant and adds the result to a single-precision complex floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Complex64} ca - scalar constant\n* @param {Complex64Array} cx - first input array\n* @param {integer} strideX - `cx` stride length\n* @param {Complex64Array} cy - second input array\n* @param {integer} strideY - `cy` stride length\n* @returns {Complex64Array} second input array\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var Complex64 = require( '@stdlib/complex-float32-ctor' );\n* var realf = require( '@stdlib/complex-float32-real' );\n* var imagf = require( '@stdlib/complex-float32-imag' );\n*\n* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var ca = new Complex64( 2.0, 2.0 );\n*\n* caxpy( 3, ca, cx, 1, cy, 1 );\n*\n* var z = cy.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns -1.0\n*\n* var im = imagf( z );\n* // returns 7.0\n*/\nfunction caxpy( N, ca, cx, strideX, cy, strideY ) {\n\tvar ix = stride2offset( N, strideX );\n\tvar iy = stride2offset( N, strideY );\n\treturn ndarray( N, ca, cx, strideX, ix, cy, strideY, iy );\n}\n\n\n// EXPORTS //\n\nmodule.exports = caxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 caxpy = require( './caxpy.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( caxpy, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = caxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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 scale a single-precision complex floating-point vector by a single-precision complex floating-point constant and add the result to a single-precision complex floating-point vector.\n*\n* @module @stdlib/blas-base-caxpy\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var Complex64 = require( '@stdlib/complex-float32-ctor' );\n* var realf = require( '@stdlib/complex-float32-real' );\n* var imagf = require( '@stdlib/complex-float32-imag' );\n* var caxpy = require( '@stdlib/blas-base-caxpy' );\n*\n* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var ca = new Complex64( 2.0, 2.0 );\n*\n* caxpy( 3, ca, cx, 1, cy, 1 );\n*\n* var z = cy.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns -1.0\n*\n* var im = imagf( z );\n* // returns 7.0\n*\n* @example\n* var Complex64Array = require( '@stdlib/array-complex64' );\n* var Complex64 = require( '@stdlib/complex-float32-ctor' );\n* var realf = require( '@stdlib/complex-float32-real' );\n* var imagf = require( '@stdlib/complex-float32-imag' );\n* var caxpy = require( '@stdlib/blas-base-caxpy' );\n*\n* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var ca = new Complex64( 2.0, 2.0 );\n*\n* caxpy.ndarray( 3, ca cx, 1, 0, cy, 1, 0);\n*\n* var z = cy.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns -1.0\n*\n* var im = imagf( z );\n* // returns 7.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 caxpy;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tcaxpy = main;\n} else {\n\tcaxpy = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = caxpy;\n\n// exports: { \"ndarray\": \"caxpy.ndarray\" }\n"], "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAS,QAAS,0BAA2B,EAC7CC,EAAQ,QAAS,6BAA8B,EAC/CC,EAAQ,QAAS,6BAA8B,EAuCnD,SAASC,EAAOC,EAAGC,EAAIC,EAAIC,EAASC,EAASC,EAAIC,EAASC,EAAU,CACnE,IAAIC,EACAC,EACAC,EAKJ,GAHKV,GAAK,GAGLJ,EAAQK,CAAG,IAAM,EACrB,OAAOI,EAIR,IAFAG,EAAKJ,EACLK,EAAKF,EACCG,EAAI,EAAGA,EAAIV,EAAGU,IACnBL,EAAG,IAAKP,EAAOD,EAAOI,EAAIC,EAAG,IAAKM,CAAG,CAAE,EAAGH,EAAG,IAAKI,CAAG,CAAE,EAAGA,CAAG,EAC7DD,GAAML,EACNM,GAAMH,EAEP,OAAOD,CACR,CAKAV,EAAO,QAAUI,ICvFjB,IAAAY,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAgB,QAAQ,oCAAoC,EAC5DC,EAAU,IAqCd,SAASC,EAAOC,EAAGC,EAAIC,EAAIC,EAASC,EAAIC,EAAU,CACjD,IAAIC,EAAKT,EAAeG,EAAGG,CAAQ,EAC/BI,EAAKV,EAAeG,EAAGK,CAAQ,EACnC,OAAOP,EAASE,EAAGC,EAAIC,EAAIC,EAASG,EAAIF,EAAIC,EAASE,CAAG,CACzD,CAKAX,EAAO,QAAUG,ICrEjB,IAAAS,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAc,QAAS,uDAAwD,EAC/EC,EAAQ,IACRC,EAAU,IAKdF,EAAaC,EAAO,UAAWC,CAAQ,EAKvCH,EAAO,QAAUE,ICsCjB,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", "names": ["require_ndarray", "__commonJSMin", "exports", "module", "scabs1", "cmulf", "caddf", "caxpy", "N", "ca", "cx", "strideX", "offsetX", "cy", "strideY", "offsetY", "ix", "iy", "i", "require_caxpy", "__commonJSMin", "exports", "module", "stride2offset", "ndarray", "caxpy", "N", "ca", "cx", "strideX", "cy", "strideY", "ix", "iy", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "caxpy", "ndarray", "join", "tryRequire", "isError", "main", "caxpy", "tmp"] } diff --git a/docs/repl.txt b/docs/repl.txt index 8a823c8..ec61e21 100644 --- a/docs/repl.txt +++ b/docs/repl.txt @@ -45,9 +45,9 @@ > var ca = new {{alias:@stdlib/complex/float32/ctor}}( 2.0, 2.0 ); > {{alias}}( 2, ca, cx, 1, cy, 1 ); > var z = cy.get( 0 ); - > var re = {{alias:@stdlib/complex/realf}}( z ) + > var re = {{alias:@stdlib/complex/float32/real}}( z ) -1.0 - > var im = {{alias:@stdlib/complex/imagf}}( z ) + > var im = {{alias:@stdlib/complex/float32/imag}}( z ) 7.0 // Advanced indexing: @@ -55,9 +55,9 @@ > cy = new {{alias:@stdlib/array/complex64}}( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); > {{alias}}( 2, ca, cx, -2, cy, 1 ); > z = cy.get( 0 ); - > re = {{alias:@stdlib/complex/realf}}( z ) + > re = {{alias:@stdlib/complex/float32/real}}( z ) -1.0 - > im = {{alias:@stdlib/complex/imagf}}( z ) + > im = {{alias:@stdlib/complex/float32/imag}}( z ) 23.0 // Using typed array views: @@ -67,9 +67,9 @@ > var cy1 = new {{alias:@stdlib/array/complex64}}( cy0.buffer, cy0.BYTES_PER_ELEMENT*1 ); > {{alias}}( 1, ca, cx1, 1, cy1, 1 ); > z = cy0.get( 1 ); - > re = {{alias:@stdlib/complex/realf}}( z ) + > re = {{alias:@stdlib/complex/float32/real}}( z ) -1.0 - > im = {{alias:@stdlib/complex/imagf}}( z ) + > im = {{alias:@stdlib/complex/float32/imag}}( z ) 15.0 @@ -122,9 +122,9 @@ > var ca = new {{alias:@stdlib/complex/float32/ctor}}( 2.0, 2.0 ); > {{alias}}.ndarray( cx.length, ca, cx, 1, 0, cy, 1, 0 ); > var z = cy.get( 0 ); - > var re = {{alias:@stdlib/complex/realf}}( z ) + > var re = {{alias:@stdlib/complex/float32/real}}( z ) -1.0 - > var im = {{alias:@stdlib/complex/imagf}}( z ) + > var im = {{alias:@stdlib/complex/float32/imag}}( z ) 7.0 // Advanced indexing: @@ -132,9 +132,9 @@ > cy = new {{alias:@stdlib/array/complex64}}( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); > {{alias}}.ndarray( 2, ca, cx, 1, 1, cy, 1, 1 ); > z = cy.get( 2 ); - > re = {{alias:@stdlib/complex/realf}}( z ) + > re = {{alias:@stdlib/complex/float32/real}}( z ) -1.0 - > im = {{alias:@stdlib/complex/imagf}}( z ) + > im = {{alias:@stdlib/complex/float32/imag}}( z ) 23.0 See Also diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index 6d21317..bc444ff 100644 --- a/docs/types/index.d.ts +++ b/docs/types/index.d.ts @@ -41,8 +41,8 @@ interface Routine { * @example * var Complex64Array = require( '@stdlib/array-complex64' ); * var Complex64 = require( '@stdlib/complex-float32-ctor' ); - * var realf = require( '@stdlib/complex-realf' ); - * var imagf = require( '@stdlib/complex-imagf' ); + * var realf = require( '@stdlib/complex-float32-real' ); + * var imagf = require( '@stdlib/complex-float32-imag' ); * * var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); * var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); @@ -77,8 +77,8 @@ interface Routine { * @example * var Complex64Array = require( '@stdlib/array-complex64' ); * var Complex64 = require( '@stdlib/complex-float32-ctor' ); - * var realf = require( '@stdlib/complex-realf' ); - * var imagf = require( '@stdlib/complex-imagf' ); + * var realf = require( '@stdlib/complex-float32-real' ); + * var imagf = require( '@stdlib/complex-float32-imag' ); * * var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); * var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); @@ -112,8 +112,8 @@ interface Routine { * @example * var Complex64Array = require( '@stdlib/array-complex64' ); * var Complex64 = require( '@stdlib/complex-float32-ctor' ); -* var realf = require( '@stdlib/complex-realf' ); -* var imagf = require( '@stdlib/complex-imagf' ); +* var realf = require( '@stdlib/complex-float32-real' ); +* var imagf = require( '@stdlib/complex-float32-imag' ); * * var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); * var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); @@ -133,8 +133,8 @@ interface Routine { * @example * var Complex64Array = require( '@stdlib/array-complex64' ); * var Complex64 = require( '@stdlib/complex-float32-ctor' ); -* var realf = require( '@stdlib/complex-realf' ); -* var imagf = require( '@stdlib/complex-imagf' ); +* var realf = require( '@stdlib/complex-float32-real' ); +* var imagf = require( '@stdlib/complex-float32-imag' ); * * var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); * var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); diff --git a/lib/caxpy.js b/lib/caxpy.js index 20fb0e3..6067add 100644 --- a/lib/caxpy.js +++ b/lib/caxpy.js @@ -40,8 +40,8 @@ var ndarray = require('./ndarray.js'); * @example * var Complex64Array = require( '@stdlib/array-complex64' ); * var Complex64 = require( '@stdlib/complex-float32-ctor' ); -* var realf = require( '@stdlib/complex-realf' ); -* var imagf = require( '@stdlib/complex-imagf' ); +* var realf = require( '@stdlib/complex-float32-real' ); +* var imagf = require( '@stdlib/complex-float32-imag' ); * * var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); * var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] ); diff --git a/lib/index.js b/lib/index.js index 1a0daf3..01f1f44 100644 --- a/lib/index.js +++ b/lib/index.js @@ -26,8 +26,8 @@ * @example * var Complex64Array = require( '@stdlib/array-complex64' ); * var Complex64 = require( '@stdlib/complex-float32-ctor' ); -* var realf = require( '@stdlib/complex-realf' ); -* var imagf = require( '@stdlib/complex-imagf' ); +* var realf = require( '@stdlib/complex-float32-real' ); +* var imagf = require( '@stdlib/complex-float32-imag' ); * var caxpy = require( '@stdlib/blas-base-caxpy' ); * * var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); @@ -48,8 +48,8 @@ * @example * var Complex64Array = require( '@stdlib/array-complex64' ); * var Complex64 = require( '@stdlib/complex-float32-ctor' ); -* var realf = require( '@stdlib/complex-realf' ); -* var imagf = require( '@stdlib/complex-imagf' ); +* var realf = require( '@stdlib/complex-float32-real' ); +* var imagf = require( '@stdlib/complex-float32-imag' ); * var caxpy = require( '@stdlib/blas-base-caxpy' ); * * var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); diff --git a/lib/ndarray.js b/lib/ndarray.js index 8f933b7..9933be7 100644 --- a/lib/ndarray.js +++ b/lib/ndarray.js @@ -43,8 +43,8 @@ var caddf = require( '@stdlib/math-base-ops-caddf' ); * @example * var Complex64Array = require( '@stdlib/array-complex64' ); * var Complex64 = require( '@stdlib/complex-float32-ctor' ); -* var realf = require( '@stdlib/complex-realf' ); -* var imagf = require( '@stdlib/complex-imagf' ); +* var realf = require( '@stdlib/complex-float32-real' ); +* var imagf = require( '@stdlib/complex-float32-imag' ); * * var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); * var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );