@stdlib/strided-base-dmap2
Advanced tools
+5
-5
@@ -1,7 +0,7 @@ | ||
| "use strict";var l=function(r,a){return function(){return a||r((a={exports:{}}).exports,a),a.exports}};var q=l(function(A,m){ | ||
| function g(r,a,v,c,t,f,o,s){var i,n,u,e;if(r<=0)return f;for(v<0?i=(1-r)*v:i=0,t<0?n=(1-r)*t:n=0,o<0?u=(1-r)*o:u=0,e=0;e<r;e++)f[u]=s(a[i],c[n]),i+=v,n+=t,u+=o;return f}m.exports=g | ||
| });var R=l(function(B,O){ | ||
| function h(r,a,v,c,t,f,o,s,i,n,u){var e,p,x,y;if(r<=0)return s;for(e=c,p=o,x=n,y=0;y<r;y++)s[x]=u(a[e],t[p]),e+=v,p+=f,x+=i;return s}O.exports=h | ||
| });var j=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),b=q(),k=R();j(b,"ndarray",k);module.exports=b; | ||
| "use strict";var y=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var p=y(function(B,d){ | ||
| function g(r,e,i,n,t,s,u,a,O,R,b){var v,o,f,c;if(r<=0)return a;for(v=n,o=u,f=R,c=0;c<r;c++)a[f]=b(e[v],t[o]),v+=i,o+=s,f+=O;return a}d.exports=g | ||
| });var m=y(function(C,x){ | ||
| var q=require('@stdlib/strided-base-stride2offset/dist'),h=p();function j(r,e,i,n,t,s,u,a){return h(r,e,i,q(r,i),n,t,q(r,t),s,u,q(r,u),a)}x.exports=j | ||
| });var k=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),l=m(),w=p();k(l,"ndarray",w);module.exports=l; | ||
| /** @license Apache-2.0 */ | ||
| //# sourceMappingURL=index.js.map |
| { | ||
| "version": 3, | ||
| "sources": ["../lib/main.js", "../lib/ndarray.js", "../lib/index.js"], | ||
| "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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// MAIN //\n\n/**\n* Applies a binary function to double-precision floating-point strided input arrays and assigns results to a double-precision floating-point strided output array.\n*\n* @param {NonNegativeInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - input array\n* @param {integer} strideY - `y` stride length\n* @param {Float64Array} z - destination array\n* @param {integer} strideZ - `z` stride length\n* @param {Function} fcn - binary function to apply\n* @returns {Float64Array} `z`\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var add = require( '@stdlib/math-base-ops-add' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( x.length );\n*\n* dmap2( x.length, x, 1, y, 1, z, 1, add );\n*\n* console.log( z );\n* // => <Float64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0 ]\n*/\nfunction dmap2( N, x, strideX, y, strideY, z, strideZ, fcn ) {\n\tvar ix;\n\tvar iy;\n\tvar iz;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn z;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tif ( strideZ < 0 ) {\n\t\tiz = (1-N) * strideZ;\n\t} else {\n\t\tiz = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tz[ iz ] = fcn( x[ ix ], y[ iy ] );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t\tiz += strideZ;\n\t}\n\treturn z;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dmap2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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// MAIN //\n\n/**\n* Applies a binary function to double-precision floating-point strided input arrays and assigns results to a double-precision floating-point strided output array.\n*\n* @param {NonNegativeInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Float64Array} y - input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @param {Float64Array} z - destination array\n* @param {integer} strideZ - `z` stride length\n* @param {NonNegativeInteger} offsetZ - starting `z` index\n* @param {Function} fcn - binary function to apply\n* @returns {Float64Array} `z`\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var add = require( '@stdlib/math-base-ops-add' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( x.length );\n*\n* dmap2( x.length, x, 1, 0, y, 1, 0, z, 1, 0, add );\n*\n* console.log( z );\n* // => <Float64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0 ]\n*/\nfunction dmap2( N, x, strideX, offsetX, y, strideY, offsetY, z, strideZ, offsetZ, fcn ) { // eslint-disable-line max-len, max-params\n\tvar ix;\n\tvar iy;\n\tvar iz;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn z;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\tiz = offsetZ;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tz[ iz ] = fcn( x[ ix ], y[ iy ] );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t\tiz += strideZ;\n\t}\n\treturn z;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dmap2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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* Apply a binary function to double-precision floating-point strided input arrays and assign results to a double-precision floating-point strided output array.\n*\n* @module @stdlib/strided-base-dmap2\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var add = require( '@stdlib/math-base-ops-add' );\n* var dmap2 = require( '@stdlib/strided-base-dmap2' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( x.length );\n*\n* dmap2( x.length, x, 1, y, 1, z, 1, add );\n*\n* console.log( z );\n* // => <Float64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var add = require( '@stdlib/math-base-ops-add' );\n* var dmap2 = require( '@stdlib/strided-base-dmap2' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( x.length );\n*\n* dmap2.ndarray( x.length, x, 1, 0, y, 1, 0, z, 1, 0, add );\n*\n* console.log( z );\n* // => <Float64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], | ||
| "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAgDA,SAASC,EAAOC,EAAGC,EAAGC,EAASC,EAAGC,EAASC,EAAGC,EAASC,EAAM,CAC5D,IAAIC,EACAC,EACAC,EACAC,EACJ,GAAKX,GAAK,EACT,OAAOK,EAiBR,IAfKH,EAAU,EACdM,GAAM,EAAER,GAAKE,EAEbM,EAAK,EAEDJ,EAAU,EACdK,GAAM,EAAET,GAAKI,EAEbK,EAAK,EAEDH,EAAU,EACdI,GAAM,EAAEV,GAAKM,EAEbI,EAAK,EAEAC,EAAI,EAAGA,EAAIX,EAAGW,IACnBN,EAAGK,CAAG,EAAIH,EAAKN,EAAGO,CAAG,EAAGL,EAAGM,CAAG,CAAE,EAChCD,GAAMN,EACNO,GAAML,EACNM,GAAMJ,EAEP,OAAOD,CACR,CAKAP,EAAO,QAAUC,ICnFjB,IAAAa,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAmDA,SAASC,EAAOC,EAAGC,EAAGC,EAASC,EAASC,EAAGC,EAASC,EAASC,EAAGC,EAASC,EAASC,EAAM,CACvF,IAAIC,EACAC,EACAC,EACAC,EACJ,GAAKd,GAAK,EACT,OAAOO,EAKR,IAHAI,EAAKR,EACLS,EAAKN,EACLO,EAAKJ,EACCK,EAAI,EAAGA,EAAId,EAAGc,IACnBP,EAAGM,CAAG,EAAIH,EAAKT,EAAGU,CAAG,EAAGP,EAAGQ,CAAG,CAAE,EAChCD,GAAMT,EACNU,GAAMP,EACNQ,GAAML,EAEP,OAAOD,CACR,CAKAT,EAAO,QAAUC,IClBjB,IAAIgB,EAAc,QAAS,uDAAwD,EAC/EC,EAAO,IACPC,EAAU,IAKdF,EAAaC,EAAM,UAAWC,CAAQ,EAKtC,OAAO,QAAUD", | ||
| "names": ["require_main", "__commonJSMin", "exports", "module", "dmap2", "N", "x", "strideX", "y", "strideY", "z", "strideZ", "fcn", "ix", "iy", "iz", "i", "require_ndarray", "__commonJSMin", "exports", "module", "dmap2", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "z", "strideZ", "offsetZ", "fcn", "ix", "iy", "iz", "i", "setReadOnly", "main", "ndarray"] | ||
| "sources": ["../lib/ndarray.js", "../lib/main.js", "../lib/index.js"], | ||
| "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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// MAIN //\n\n/**\n* Applies a binary function to double-precision floating-point strided input arrays and assigns results to a double-precision floating-point strided output array.\n*\n* @param {NonNegativeInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Float64Array} y - input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @param {Float64Array} z - destination array\n* @param {integer} strideZ - `z` stride length\n* @param {NonNegativeInteger} offsetZ - starting `z` index\n* @param {Function} fcn - binary function to apply\n* @returns {Float64Array} `z`\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var add = require( '@stdlib/math-base-ops-add' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( x.length );\n*\n* dmap2( x.length, x, 1, 0, y, 1, 0, z, 1, 0, add );\n*\n* console.log( z );\n* // => <Float64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0 ]\n*/\nfunction dmap2( N, x, strideX, offsetX, y, strideY, offsetY, z, strideZ, offsetZ, fcn ) { // eslint-disable-line max-len, max-params\n\tvar ix;\n\tvar iy;\n\tvar iz;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn z;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\tiz = offsetZ;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tz[ iz ] = fcn( x[ ix ], y[ iy ] );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t\tiz += strideZ;\n\t}\n\treturn z;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dmap2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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* Applies a binary function to double-precision floating-point strided input arrays and assigns results to a double-precision floating-point strided output array.\n*\n* @param {NonNegativeInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - input array\n* @param {integer} strideY - `y` stride length\n* @param {Float64Array} z - destination array\n* @param {integer} strideZ - `z` stride length\n* @param {Function} fcn - binary function to apply\n* @returns {Float64Array} `z`\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var add = require( '@stdlib/math-base-ops-add' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( x.length );\n*\n* dmap2( x.length, x, 1, y, 1, z, 1, add );\n*\n* console.log( z );\n* // => <Float64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0 ]\n*/\nfunction dmap2( N, x, strideX, y, strideY, z, strideZ, fcn ) {\n\treturn ndarray( N, x, strideX, stride2offset( N, strideX ), y, strideY, stride2offset( N, strideY ), z, strideZ, stride2offset( N, strideZ ), fcn ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = dmap2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 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* Apply a binary function to double-precision floating-point strided input arrays and assign results to a double-precision floating-point strided output array.\n*\n* @module @stdlib/strided-base-dmap2\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var add = require( '@stdlib/math-base-ops-add' );\n* var dmap2 = require( '@stdlib/strided-base-dmap2' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( x.length );\n*\n* dmap2( x.length, x, 1, y, 1, z, 1, add );\n*\n* console.log( z );\n* // => <Float64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var add = require( '@stdlib/math-base-ops-add' );\n* var dmap2 = require( '@stdlib/strided-base-dmap2' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var z = new Float64Array( x.length );\n*\n* dmap2.ndarray( x.length, x, 1, 0, y, 1, 0, z, 1, 0, add );\n*\n* console.log( z );\n* // => <Float64Array>[ 2.0, 4.0, 6.0, 8.0, 10.0 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], | ||
| "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAmDA,SAASC,EAAOC,EAAGC,EAAGC,EAASC,EAASC,EAAGC,EAASC,EAASC,EAAGC,EAASC,EAASC,EAAM,CACvF,IAAIC,EACAC,EACAC,EACAC,EACJ,GAAKd,GAAK,EACT,OAAOO,EAKR,IAHAI,EAAKR,EACLS,EAAKN,EACLO,EAAKJ,EACCK,EAAI,EAAGA,EAAId,EAAGc,IACnBP,EAAGM,CAAG,EAAIH,EAAKT,EAAGU,CAAG,EAAGP,EAAGQ,CAAG,CAAE,EAChCD,GAAMT,EACNU,GAAMP,EACNQ,GAAML,EAEP,OAAOD,CACR,CAKAT,EAAO,QAAUC,IC1EjB,IAAAgB,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAgB,QAAS,oCAAqC,EAC9DC,EAAU,IA+Bd,SAASC,EAAOC,EAAGC,EAAGC,EAASC,EAAGC,EAASC,EAAGC,EAASC,EAAM,CAC5D,OAAOT,EAASE,EAAGC,EAAGC,EAASL,EAAeG,EAAGE,CAAQ,EAAGC,EAAGC,EAASP,EAAeG,EAAGI,CAAQ,EAAGC,EAAGC,EAAST,EAAeG,EAAGM,CAAQ,EAAGC,CAAI,CACnJ,CAKAX,EAAO,QAAUG,ICLjB,IAAIS,EAAc,QAAS,uDAAwD,EAC/EC,EAAO,IACPC,EAAU,IAKdF,EAAaC,EAAM,UAAWC,CAAQ,EAKtC,OAAO,QAAUD", | ||
| "names": ["require_ndarray", "__commonJSMin", "exports", "module", "dmap2", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "z", "strideZ", "offsetZ", "fcn", "ix", "iy", "iz", "i", "require_main", "__commonJSMin", "exports", "module", "stride2offset", "ndarray", "dmap2", "N", "x", "strideX", "y", "strideY", "z", "strideZ", "fcn", "setReadOnly", "main", "ndarray"] | ||
| } |
+7
-29
@@ -21,2 +21,8 @@ /** | ||
| // MODULES // | ||
| var stride2offset = require( '@stdlib/strided-base-stride2offset' ); | ||
| var ndarray = require( './ndarray.js' ); | ||
| // MAIN // | ||
@@ -51,31 +57,3 @@ | ||
| function dmap2( N, x, strideX, y, strideY, z, strideZ, fcn ) { | ||
| var ix; | ||
| var iy; | ||
| var iz; | ||
| var i; | ||
| if ( N <= 0 ) { | ||
| return z; | ||
| } | ||
| if ( strideX < 0 ) { | ||
| ix = (1-N) * strideX; | ||
| } else { | ||
| ix = 0; | ||
| } | ||
| if ( strideY < 0 ) { | ||
| iy = (1-N) * strideY; | ||
| } else { | ||
| iy = 0; | ||
| } | ||
| if ( strideZ < 0 ) { | ||
| iz = (1-N) * strideZ; | ||
| } else { | ||
| iz = 0; | ||
| } | ||
| for ( i = 0; i < N; i++ ) { | ||
| z[ iz ] = fcn( x[ ix ], y[ iy ] ); | ||
| ix += strideX; | ||
| iy += strideY; | ||
| iz += strideZ; | ||
| } | ||
| return z; | ||
| return ndarray( N, x, strideX, stride2offset( N, strideX ), y, strideY, stride2offset( N, strideY ), z, strideZ, stride2offset( N, strideZ ), fcn ); // eslint-disable-line max-len | ||
| } | ||
@@ -82,0 +60,0 @@ |
+3
-1
@@ -35,5 +35,7 @@ { | ||
| "libpath": [], | ||
| "dependencies": [] | ||
| "dependencies": [ | ||
| "@stdlib/strided-base-stride2offset" | ||
| ] | ||
| } | ||
| ] | ||
| } |
+3
-2
| { | ||
| "name": "@stdlib/strided-base-dmap2", | ||
| "version": "0.2.1", | ||
| "version": "0.2.2", | ||
| "description": "Apply a binary function to double-precision floating-point strided input arrays and assign results to a double-precision floating-point strided output array.", | ||
@@ -35,3 +35,4 @@ "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1" | ||
| "@stdlib/strided-base-stride2offset": "^0.1.0", | ||
| "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2" | ||
| }, | ||
@@ -38,0 +39,0 @@ "devDependencies": {}, |
+2
-2
@@ -379,4 +379,4 @@ <!-- | ||
| [test-image]: https://github.com/stdlib-js/strided-base-dmap2/actions/workflows/test.yml/badge.svg?branch=v0.2.1 | ||
| [test-url]: https://github.com/stdlib-js/strided-base-dmap2/actions/workflows/test.yml?query=branch:v0.2.1 | ||
| [test-image]: https://github.com/stdlib-js/strided-base-dmap2/actions/workflows/test.yml/badge.svg?branch=v0.2.2 | ||
| [test-url]: https://github.com/stdlib-js/strided-base-dmap2/actions/workflows/test.yml?query=branch:v0.2.2 | ||
@@ -383,0 +383,0 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/strided-base-dmap2/main.svg |
+4
-15
@@ -20,2 +20,3 @@ /** | ||
| #include "stdlib/strided/base/dmap2.h" | ||
| #include "stdlib/strided/base/stride2offset.h" | ||
| #include <stdint.h> | ||
@@ -59,17 +60,5 @@ | ||
| } | ||
| if ( strideX < 0 ) { | ||
| ix = (1-N) * strideX; | ||
| } else { | ||
| ix = 0; | ||
| } | ||
| if ( strideY < 0 ) { | ||
| iy = (1-N) * strideY; | ||
| } else { | ||
| iy = 0; | ||
| } | ||
| if ( strideZ < 0 ) { | ||
| iz = (1-N) * strideZ; | ||
| } else { | ||
| iz = 0; | ||
| } | ||
| ix = stdlib_strided_stride2offset( N, strideX ); | ||
| iy = stdlib_strided_stride2offset( N, strideY ); | ||
| iz = stdlib_strided_stride2offset( N, strideZ ); | ||
| for ( i = 0; i < N; i++ ) { | ||
@@ -76,0 +65,0 @@ Z[ iz ] = fcn( X[ ix ], Y[ iy ] ); |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
49591
-0.7%2
100%352
-6.13%