diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml index 3e8e2db16..91f2b939f 100644 --- a/.github/workflows/productionize.yml +++ b/.github/workflows/productionize.yml @@ -82,21 +82,6 @@ jobs: id: transform-error-messages uses: stdlib-js/transform-errors-action@main - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - name: 'Update dependencies in package.json' run: | @@ -349,7 +334,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -520,7 +505,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -697,7 +682,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 26be02d3c..474004bea 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -209,7 +209,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 51c9d27be..2b4efa529 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,7 +89,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test_bundles.yml b/.github/workflows/test_bundles.yml index e9df6a01f..172cb2d75 100644 --- a/.github/workflows/test_bundles.yml +++ b/.github/workflows/test_bundles.yml @@ -88,7 +88,7 @@ jobs: # Send notification to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -130,7 +130,7 @@ jobs: # Send notification to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -172,7 +172,7 @@ jobs: # Send notification to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml index 6d8aa0b61..a73c51529 100644 --- a/.github/workflows/test_coverage.yml +++ b/.github/workflows/test_coverage.yml @@ -106,7 +106,7 @@ jobs: # Send Slack notification if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index aa74f6442..f896304af 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -75,7 +75,7 @@ jobs: # Send Slack notification if job fails: - name: 'Send notification to Slack in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/base/gcopy/docs/types/index.d.ts b/base/gcopy/docs/types/index.d.ts index 3609d7a68..f5e48bce1 100644 --- a/base/gcopy/docs/types/index.d.ts +++ b/base/gcopy/docs/types/index.d.ts @@ -20,7 +20,7 @@ /// -import { Collection } from '@stdlib/types/object'; +import { Collection } from '@stdlib/types/array'; /** * Interface describing `gcopy`. @@ -43,7 +43,7 @@ interface Routine { * gcopy( x.length, x, 1, y, 1 ); * // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ] */ - ( N: number, x: Collection, strideX: number, y: Collection, strideY: number ): Collection; // tslint:disable-line:max-line-length + ( N: number, x: Collection, strideX: number, y: Collection, strideY: number ): Collection; /** * Copies values from `x` into `y` using alternative indexing semantics. @@ -64,7 +64,7 @@ interface Routine { * gcopy.ndarray( x.length, x, 1, 0, y, 1, 0 ); * // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ] */ - ndarray( N: number, x: Collection, strideX: number, offsetX: number, y: Collection, strideY: number, offsetY: number ): Collection; // tslint:disable-line:max-line-length + ndarray( N: number, x: Collection, strideX: number, offsetX: number, y: Collection, strideY: number, offsetY: number ): Collection; } /** diff --git a/base/gcopy/docs/types/test.ts b/base/gcopy/docs/types/test.ts index 8bef49dcd..84cad59c4 100644 --- a/base/gcopy/docs/types/test.ts +++ b/base/gcopy/docs/types/test.ts @@ -26,7 +26,7 @@ import gcopy = require( './index' ); const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); - gcopy( x.length, x, 1, y, 1 ); // $ExpectType Collection + gcopy( x.length, x, 1, y, 1 ); // $ExpectType Collection } // The compiler throws an error if the function is provided a first argument which is not a number... @@ -117,7 +117,7 @@ import gcopy = require( './index' ); const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); - gcopy.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectType Collection + gcopy.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectType Collection } // The compiler throws an error if the `ndarray` method is provided a first argument which is not a number... diff --git a/base/gswap/docs/types/index.d.ts b/base/gswap/docs/types/index.d.ts index 5e3d34b81..fce3ca82b 100644 --- a/base/gswap/docs/types/index.d.ts +++ b/base/gswap/docs/types/index.d.ts @@ -20,7 +20,7 @@ /// -import { Collection } from '@stdlib/types/object'; +import { Collection } from '@stdlib/types/array'; /** * Interface describing `gswap`. @@ -44,7 +44,7 @@ interface Routine { * // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ] * // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ] */ - ( N: number, x: Collection, strideX: number, y: Collection, strideY: number ): Collection; // tslint:disable-line:max-line-length + ( N: number, x: Collection, strideX: number, y: Collection, strideY: number ): Collection; /** * Interchanges vectors `x` and `y` using alternative indexing semantics. @@ -66,7 +66,7 @@ interface Routine { * // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ] * // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ] */ - ndarray( N: number, x: Collection, strideX: number, offsetX: number, y: Collection, strideY: number, offsetY: number ): Collection; // tslint:disable-line:max-line-length + ndarray( N: number, x: Collection, strideX: number, offsetX: number, y: Collection, strideY: number, offsetY: number ): Collection; } /** diff --git a/base/gswap/docs/types/test.ts b/base/gswap/docs/types/test.ts index a05278b51..32c748b74 100644 --- a/base/gswap/docs/types/test.ts +++ b/base/gswap/docs/types/test.ts @@ -26,7 +26,7 @@ import gswap = require( './index' ); const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); - gswap( x.length, x, 1, y, 1 ); // $ExpectType Collection + gswap( x.length, x, 1, y, 1 ); // $ExpectType Collection } // The compiler throws an error if the function is provided a first argument which is not a number... @@ -117,7 +117,7 @@ import gswap = require( './index' ); const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); - gswap.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectType Collection + gswap.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectType Collection } // The compiler throws an error if the `ndarray` method is provided a first argument which is not a number... diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 000000000..15e948f06 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +/// +import ns from '../docs/types/index'; +export = ns; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 000000000..cf8714fd4 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,1091 @@ +"use strict";var c=function(n,e){return function(){return e||n((e={exports:{}}).exports,e),e.exports}};var Un=c(function(NQ,Qn){ +var Jn=require('@stdlib/strided/base/reinterpret-complex64/dist');function qO(n,e,a,i,r){var u,v,s,o,t,f,q;if(n<=0)return i;if(u=Jn(e,0),v=Jn(i,0),a===1&&r===1){for(q=0;q0)for(u=0;u0)for(s=0;s0)for(t=0;t0)for(q=0;q0)for(o=0;o0)for(f=0;f0)for(t=0;t0)for(q=0;q0)for(r=0;r0)for(s=0;s0)for(t=0;t0)for(q=0;q0)for(t=0;t0)for(q=0;q0)for(u=0;u0)for(s=0;s0)for(t=0;t0)for(q=0;q0)for(f=0;f0)for(m=0;m0)for(t=0;t0)for(q=0;q0)for(u=0;u0)for(s=0;s0)for(q=0;q0)for(p=0;p0)for(t=0;t0)for(q=0;q0)for(o=0;o0)for(f=0;f0)for(f=0;f0)for(m=0;mo?v=no(1,n):v=no(1,e),u=Y(s+o),u===0?(f=1,q=0,t=0,m=0):(t=Y(u*kM(Y(io(Y(n/u))+io(Y(e/u))))),t=Y(t*v),f=Y(n/t),q=Y(e/t),m=1,s>o?m=q:f!==0&&(m=Y(1/f))),n=t,e=m,a[r]=n,a[r+i]=e,a[r+2*i]=f,a[r+3*i]=q,a}vo.exports=_M +});var to=c(function(BW,so){ +var EM=require('@stdlib/array/float32/dist'),OM=Qa();function FM(n,e){var a=new EM(4);return OM(n,e,a,1,0)}so.exports=FM +});var qo=c(function(CW,fo){ +var MM=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),oo=to(),TM=Qa();MM(oo,"assign",TM);fo.exports=oo +});var mo=c(function(GW,co){ +var Ua=5;function SM(n,e,a,i){var r,u;if(n<=0||i<=0||e===1)return a;if(i===1){if(u=n%Ua,u>0)for(r=0;r0)for(v=0;v0)for(t=0;t0)for(q=0;q0)for(u=0;u0)for(s=0;s=rf(v)?o+=r-s+v:o+=v-s+r,r=s,u+=i;return r+o}ef.exports=n7 +});var vf=c(function(r9,nf){ +var uf=require('@stdlib/math/base/special/abs/dist');function v7(n,e,a,i,r){var u,v,s,o,t,f;if(n<=0)return 0;if(n===1||i===0)return e+a[r];for(v=r,u=0,t=0,f=0;f=uf(s)?t+=u-o+s:t+=s-o+u,u=o,v+=i;return u+t}nf.exports=v7 +});var of=c(function(e9,tf){ +var s7=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),sf=af(),t7=vf();s7(sf,"ndarray",t7);tf.exports=sf +});var Ir=c(function(a9,qf){ +var o7=require("path").join,f7=require('@stdlib/utils/try-require/dist'),q7=require('@stdlib/assert/is-error/dist'),c7=of(),Na,ff=f7(o7(__dirname,"./native.js"));q7(ff)?Na=c7:Na=ff;qf.exports=Na +});var mf=c(function(u9,cf){ +var m7=Ir();function l7(n,e,a,i){return m7(n,e,a,i)}cf.exports=l7 +});var pf=c(function(i9,lf){ +var p7=Ir().ndarray;function j7(n,e,a,i,r){return p7(n,e,a,i,r)}lf.exports=j7 +});var bf=c(function(n9,gf){ +var g7=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),jf=mf(),b7=pf();g7(jf,"ndarray",b7);gf.exports=jf +});var Rf=c(function(v9,yf){ +var w7=require("path").join,y7=require('@stdlib/utils/try-require/dist'),R7=require('@stdlib/assert/is-error/dist'),k7=bf(),ru,wf=y7(w7(__dirname,"./native.js"));R7(wf)?ru=k7:ru=wf;yf.exports=ru +});var _f=c(function(s9,kf){ +var Kr=require('@stdlib/math/base/special/abs/dist');function _7(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||i===0)return e+a[0];for(i<0?v=(1-n)*i:v=0,r=0,u=0,s=0,m=0;m=Kr(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,Kr(s)>=Kr(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=i;return r+s+u}kf.exports=_7 +});var Of=c(function(t9,Ef){ +var Vr=require('@stdlib/math/base/special/abs/dist');function E7(n,e,a,i,r){var u,v,s,o,t,f,q,m,p;if(n<=0)return 0;if(n===1||i===0)return e+a[0];for(s=r,u=0,v=0,o=0,p=0;p=Vr(f)?m=u-q+f:m=f-q+u,u=q,q=o+m,Vr(o)>=Vr(m)?t=o-q+m:t=m-q+o,o=q,v+=t,s+=i;return u+o+v}Ef.exports=E7 +});var Tf=c(function(o9,Mf){ +var O7=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Ff=_f(),F7=Of();O7(Ff,"ndarray",F7);Mf.exports=Ff +});var Pf=c(function(f9,Zf){ +var M7=require("path").join,T7=require('@stdlib/utils/try-require/dist'),S7=require('@stdlib/assert/is-error/dist'),Z7=Tf(),eu,Sf=T7(M7(__dirname,"./native.js"));S7(Sf)?eu=Z7:eu=Sf;Zf.exports=eu +});var Lf=c(function(q9,Af){ +function P7(n,e,a,i){var r,u,v;if(n<=0)return 0;if(n===1||i===0)return e+a[0];for(i<0?u=(1-n)*i:u=0,r=0,v=0;v=sq(t)?q+=o-f+t:q+=t-f+o,o=f,r[s]=o+q,v+=i,s+=u;return r}tq.exports=nT +});var cq=c(function(E9,qq){ +var fq=require('@stdlib/math/base/special/abs/dist');function vT(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l;if(n<=0)return u;for(o=r,t=s,f=e,p=0,l=0;l=fq(q)?p+=f-m+q:p+=q-m+f,f=m,u[t]=f+p,o+=i,t+=v;return u}qq.exports=vT +});var pq=c(function(O9,lq){ +var sT=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),mq=oq(),tT=cq();sT(mq,"ndarray",tT);lq.exports=mq +});var zr=c(function(F9,gq){ +var oT=require("path").join,fT=require('@stdlib/utils/try-require/dist'),qT=require('@stdlib/assert/is-error/dist'),cT=pq(),ou,jq=fT(oT(__dirname,"./native.js"));qT(jq)?ou=cT:ou=jq;gq.exports=ou +});var wq=c(function(M9,bq){ +var mT=zr();function lT(n,e,a,i,r,u){return mT(n,e,a,i,r,u)}bq.exports=lT +});var Rq=c(function(T9,yq){ +var pT=zr().ndarray;function jT(n,e,a,i,r,u,v,s){return pT(n,e,a,i,r,u,v,s)}yq.exports=jT +});var Eq=c(function(S9,_q){ +var gT=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),kq=wq(),bT=Rq();gT(kq,"ndarray",bT);_q.exports=kq +});var Mq=c(function(Z9,Fq){ +var wT=require("path").join,yT=require('@stdlib/utils/try-require/dist'),RT=require('@stdlib/assert/is-error/dist'),kT=Eq(),fu,Oq=yT(wT(__dirname,"./native.js"));RT(Oq)?fu=kT:fu=Oq;Fq.exports=fu +});var Sq=c(function(P9,Tq){ +var Dr=require('@stdlib/math/base/special/abs/dist');function _T(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l;if(n<=0)return r;for(i<0?s=(1-n)*i:s=0,u<0?o=(1-n)*u:o=0,v=0,t=0,l=0;l=Dr(q)?p=e-m+q:p=q-m+e,e=m,m=t+p,Dr(t)>=Dr(p)?f=t-m+p:f=p-m+t,t=m,v+=f,r[o]=e+t+v,s+=i,o+=u;return r}Tq.exports=_T +});var Pq=c(function(A9,Zq){ +var Hr=require('@stdlib/math/base/special/abs/dist');function ET(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g;if(n<=0)return u;for(t=r,f=s,o=0,q=0,g=0;g=Hr(p)?j=e-l+p:j=p-l+e,e=l,l=q+j,Hr(q)>=Hr(j)?m=q-l+j:m=j-l+q,q=l,o+=m,u[f]=e+q+o,t+=i,f+=v;return u}Zq.exports=ET +});var Bq=c(function(L9,Lq){ +var OT=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Aq=Sq(),FT=Pq();OT(Aq,"ndarray",FT);Lq.exports=Aq +});var Iq=c(function(B9,Gq){ +var MT=require("path").join,TT=require('@stdlib/utils/try-require/dist'),ST=require('@stdlib/assert/is-error/dist'),ZT=Bq(),qu,Cq=TT(MT(__dirname,"./native.js"));ST(Cq)?qu=ZT:qu=Cq;Gq.exports=qu +});var Vq=c(function(C9,Kq){ +function PT(n,e,a,i,r,u){var v,s,o;if(n<=0)return r;for(i<0?v=(1-n)*i:v=0,u<0?s=(1-n)*u:s=0,o=0;o0)for(u=0;u0)for(s=0;s=Ic(o)?f+=u-t+o:f+=o-t+u,u=t,q+=1),v+=a;return i[s]=u+f,i[s+r]=q,i}Kc.exports=RS +});var Jc=c(function(a$,Hc){ +var zc=require('@stdlib/math/base/assert/is-nan/dist'),Dc=require('@stdlib/math/base/special/abs/dist');function kS(n,e,a,i,r,u,v){var s,o,t,f,q,m,p,l;if(o=i,t=v,s=0,n<=0)return r[t]=s,r[t+u]=0,r;if(n===1||a===0)return zc(e[o])?(r[t]=s,r[t+u]=0,r):(r[t]=e[o],r[t+u]=1,r);for(m=0,p=0,l=0;l=Dc(f)?m+=s-q+f:m+=f-q+s,s=q,p+=1),o+=a;return r[t]=s+m,r[t+u]=p,r}Hc.exports=kS +});var Wc=c(function(u$,Uc){ +var _S=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Qc=Vc(),ES=Jc();_S(Qc,"ndarray",ES);Uc.exports=Qc +});var Ur=c(function(i$,hc){ +var OS=require("path").join,FS=require('@stdlib/utils/try-require/dist'),MS=require('@stdlib/assert/is-error/dist'),TS=Wc(),yu,$c=FS(OS(__dirname,"./native.js"));MS($c)?yu=TS:yu=$c;hc.exports=yu +});var Xc=c(function(n$,Yc){ +var SS=Ur();function ZS(n,e,a,i,r){return SS(n,e,a,i,r)}Yc.exports=ZS +});var xc=c(function(v$,dc){ +var PS=Ur().ndarray;function AS(n,e,a,i,r,u,v){return PS(n,e,a,i,r,u,v)}dc.exports=AS +});var em=c(function(s$,rm){ +var LS=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Nc=Xc(),BS=xc();LS(Nc,"ndarray",BS);rm.exports=Nc +});var im=c(function(t$,um){ +var CS=require("path").join,GS=require('@stdlib/utils/try-require/dist'),IS=require('@stdlib/assert/is-error/dist'),KS=em(),Ru,am=GS(CS(__dirname,"./native.js"));IS(am)?Ru=KS:Ru=am;um.exports=Ru +});var sm=c(function(o$,vm){ +var nm=require('@stdlib/math/base/assert/is-nan/dist'),Wr=require('@stdlib/math/base/special/abs/dist');function VS(n,e,a,i,r){var u,v,s,o,t,f,q,m,p,l,j;if(a<0?t=(1-n)*a:t=0,r<0?f=-r:f=0,u=0,n<=0)return i[f]=u,i[f+r]=0,i;if(n===1||a===0)return nm(e[t])?(i[f]=u,i[f+r]=0,i):(i[f]=e[t],i[f+r]=1,i);for(v=0,s=0,l=0,j=0;j=Wr(q)?p=u-m+q:p=q-m+u,u=m,m=s+p,Wr(s)>=Wr(p)?o=s-m+p:o=p-m+s,s=m,v+=o,l+=1),t+=a;return i[f]=u+s+v,i[f+r]=l,i}vm.exports=VS +});var fm=c(function(f$,om){ +var tm=require('@stdlib/math/base/assert/is-nan/dist'),$r=require('@stdlib/math/base/special/abs/dist');function zS(n,e,a,i,r,u,v){var s,o,t,f,q,m,p,l,j,g,b;if(q=i,m=v,s=0,n<=0)return r[m]=s,r[m+u]=0,r;if(n===1||a===0)return tm(e[q])?(r[m]=s,r[m+u]=0,r):(r[m]=e[q],r[m+u]=1,r);for(o=0,t=0,g=0,b=0;b=$r(p)?j=s-l+p:j=p-l+s,s=l,l=t+j,$r(t)>=$r(j)?f=t-l+j:f=j-l+t,t=l,o+=f,g+=1),q+=a;return r[m]=s+t+o,r[m+u]=g,r}om.exports=zS +});var mm=c(function(q$,cm){ +var DS=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),qm=sm(),HS=fm();DS(qm,"ndarray",HS);cm.exports=qm +});var jm=c(function(c$,pm){ +var JS=require("path").join,QS=require('@stdlib/utils/try-require/dist'),US=require('@stdlib/assert/is-error/dist'),WS=mm(),ku,lm=QS(JS(__dirname,"./native.js"));US(lm)?ku=WS:ku=lm;pm.exports=ku +});var wm=c(function(m$,bm){ +var gm=require('@stdlib/math/base/assert/is-nan/dist');function $S(n,e,a,i,r){var u,v,s,o,t;if(a<0?v=(1-n)*a:v=0,r<0?s=-r:s=0,u=0,n<=0)return i[s]=u,i[s+r]=0,i;if(n===1||a===0)return gm(e[v])?(i[s]=u,i[s+r]=0,i):(i[s]=e[v],i[s+r]=1,i);for(o=0,t=0;t=Dm(u)?s+=i-v+u:s+=u-v+i,i=v),r+=a;return i+s}Hm.exports=lZ +});var $m=c(function(_$,Wm){ +var Qm=require('@stdlib/math/base/assert/is-nan/dist'),Um=require('@stdlib/math/base/special/abs/dist');function pZ(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return Qm(e[i])?0:e[i];for(u=i,r=0,o=0,t=0;t=Um(v)?o+=r-s+v:o+=v-s+r,r=s),u+=a;return r+o}Wm.exports=pZ +});var Xm=c(function(E$,Ym){ +var jZ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),hm=Jm(),gZ=$m();jZ(hm,"ndarray",gZ);Ym.exports=hm +});var hr=c(function(O$,xm){ +var bZ=require("path").join,wZ=require('@stdlib/utils/try-require/dist'),yZ=require('@stdlib/assert/is-error/dist'),RZ=Xm(),Mu,dm=wZ(bZ(__dirname,"./native.js"));yZ(dm)?Mu=RZ:Mu=dm;xm.exports=Mu +});var r1=c(function(F$,Nm){ +var kZ=hr();function _Z(n,e,a){return kZ(n,e,a)}Nm.exports=_Z +});var a1=c(function(M$,e1){ +var EZ=hr().ndarray;function OZ(n,e,a,i){return EZ(n,e,a,i)}e1.exports=OZ +});var n1=c(function(T$,i1){ +var FZ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),u1=r1(),MZ=a1();FZ(u1,"ndarray",MZ);i1.exports=u1 +});var t1=c(function(S$,s1){ +var TZ=require("path").join,SZ=require('@stdlib/utils/try-require/dist'),ZZ=require('@stdlib/assert/is-error/dist'),PZ=n1(),Tu,v1=SZ(TZ(__dirname,"./native.js"));ZZ(v1)?Tu=PZ:Tu=v1;s1.exports=Tu +});var q1=c(function(Z$,f1){ +var o1=require('@stdlib/math/base/assert/is-nan/dist'),Yr=require('@stdlib/math/base/special/abs/dist');function AZ(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return o1(e[0])?0:e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=Yr(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,Yr(v)>=Yr(f)?s=v-t+f:s=f-t+v,v=t,r+=s),u+=a;return i+v+r}f1.exports=AZ +});var l1=c(function(P$,m1){ +var c1=require('@stdlib/math/base/assert/is-nan/dist'),Xr=require('@stdlib/math/base/special/abs/dist');function LZ(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||a===0)return c1(e[i])?0:e[i];for(v=i,r=0,u=0,s=0,m=0;m=Xr(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,Xr(s)>=Xr(q)?o=s-f+q:o=q-f+s,s=f,u+=o),v+=a;return r+s+u}m1.exports=LZ +});var g1=c(function(A$,j1){ +var BZ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),p1=q1(),CZ=l1();BZ(p1,"ndarray",CZ);j1.exports=p1 +});var y1=c(function(L$,w1){ +var GZ=require("path").join,IZ=require('@stdlib/utils/try-require/dist'),KZ=require('@stdlib/assert/is-error/dist'),VZ=g1(),Su,b1=IZ(GZ(__dirname,"./native.js"));KZ(b1)?Su=VZ:Su=b1;w1.exports=Su +});var _1=c(function(B$,k1){ +var R1=require('@stdlib/math/base/assert/is-nan/dist');function zZ(n,e,a){var i,r,u;if(i=0,n<=0)return i;if(n===1||a===0)return R1(e[0])?i:e[0];for(a<0?r=(1-n)*a:r=0,u=0;u0)for(r=0;r0)for(t=0;t0)o-=1,m=a[v+o*i],p=r[s+o*u];else{if(g-=1,g===0)return a;l=v+g*i,m=a[l],j=s+g*u,p=r[j],a[l]=a[v],r[j]=r[s]}for(b=o,t=b*2+1;tq||sp(f)||f===q&&vp(f))&&(t+=1)),f=a[v+t*i],f>m||sp(f)||f===m&&vp(f));)a[v+b*i]=f,r[s+b*u]=r[s+t*u],b=t,t=b*2+1;a[v+b*i]=m,r[s+b*u]=p}}tp.exports=gA +});var mp=c(function(gh,cp){ +var fp=require('@stdlib/math/base/assert/is-positive-zero/dist'),qp=require('@stdlib/math/base/assert/is-nan/dist'),bA=require('@stdlib/math/base/special/floor/dist');function wA(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g,b,R;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),g=n,o=bA(n/2);;){if(o>0)o-=1,m=a[r+o*i],p=u[s+o*v];else{if(g-=1,g===0)return a;l=r+g*i,m=a[l],j=s+g*v,p=u[j],a[l]=a[r],u[j]=u[s]}for(b=o,t=b*2+1;tq||qp(f)||f===q&&fp(f))&&(t+=1)),f=a[r+t*i],f>m||qp(f)||f===m&&fp(f));)a[r+b*i]=f,u[s+b*v]=u[s+t*v],b=t,t=b*2+1;a[r+b*i]=m,u[s+b*v]=p}}cp.exports=wA +});var jp=c(function(bh,pp){ +var yA=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),lp=op(),RA=mp();yA(lp,"ndarray",RA);pp.exports=lp +});var wp=c(function(wh,bp){ +var kA=require("path").join,_A=require('@stdlib/utils/try-require/dist'),EA=require('@stdlib/assert/is-error/dist'),OA=jp(),Uu,gp=_A(kA(__dirname,"./native.js"));EA(gp)?Uu=OA:Uu=gp;bp.exports=Uu +});var kp=c(function(yh,Rp){ +var re=require('@stdlib/math/base/assert/is-negative-zero/dist'),yp=require('@stdlib/math/base/assert/is-nan/dist');function FA(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,j,g,b,R;if(n<=0||e===0)return a;if(e<0&&(i*=-1,u*=-1),u<0?(p=(1-n)*u,l=0):(p=0,l=(n-1)*u),q=p+u,i<0){for(t=(1-n)*i,f=0,s=t+i,R=1;Rf;)a[o]=a[o+i],r[m]=r[m+u],o+=i,m+=u;a[f]=j,r[l]=g}else{for(v=re(j),o=s-i,m=q-u;o<=t&&(b=a[o],!(b<=j&&!(v&&b===j&&re(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=j,r[m+u]=g,s+=i,q+=u}return a}for(t=0,f=(n-1)*i,s=t+i,R=1;R=t&&(b=a[o],!(b<=j&&!(v&&b===j&&re(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=j,r[m+u]=g,s+=i,q+=u}return a}Rp.exports=FA +});var Op=c(function(Rh,Ep){ +var ee=require('@stdlib/math/base/assert/is-negative-zero/dist'),_p=require('@stdlib/math/base/assert/is-nan/dist');function MA(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g,b,R,_,k;if(n<=0||e===0)return a;if(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),q=r,m=q+(n-1)*i,t=q+i,j=s,g=j+(n-1)*v,p=j+v,i<0){for(k=1;km;)a[f]=a[f+i],u[l]=u[l+v],f+=i,l+=v;a[m]=b,u[g]=R}else{for(o=ee(b),f=t-i,l=p-v;f<=q&&(_=a[f],!(_<=b&&!(o&&_===b&&ee(_)===!1)));)a[f+i]=_,u[l+v]=u[l],f-=i,l-=v;a[f+i]=b,u[l+v]=R,t+=i,p+=v}return a}for(k=1;k=q&&(_=a[f],!(_<=b&&!(o&&_===b&&ee(_)===!1)));)a[f+i]=_,u[l+v]=u[l],f-=i,l-=v;a[f+i]=b,u[l+v]=R,t+=i,p+=v}return a}Ep.exports=MA +});var Tp=c(function(kh,Mp){ +var TA=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Fp=kp(),SA=Op();TA(Fp,"ndarray",SA);Mp.exports=Fp +});var Pp=c(function(_h,Zp){ +var ZA=require("path").join,PA=require('@stdlib/utils/try-require/dist'),AA=require('@stdlib/assert/is-error/dist'),LA=Tp(),Wu,Sp=PA(ZA(__dirname,"./native.js"));AA(Sp)?Wu=LA:Wu=Sp;Zp.exports=Wu +});var $u=c(function(Eh,BA){BA.exports=[701,301,132,57,23,10,4,1]});var Bp=c(function(Oh,Lp){ +var CA=require('@stdlib/math/base/assert/is-negative-zero/dist'),GA=require('@stdlib/math/base/assert/is-nan/dist'),Ap=$u(),IA=Ap.length;function KA(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,j;if(n<=0||e===0)return a;for(e<0&&(i*=-1,u*=-1),i<0?v=(1-n)*i:v=0,u<0?s=(1-n)*u:s=0,p=0;p=t&&(m=a[v+(j-t)*i],!(m<=f&&!(o&&m===f)));j-=t)a[v+j*i]=m,r[s+j*u]=r[s+(j-t)*u];a[v+j*i]=f,r[s+j*u]=q}return a}Lp.exports=KA +});var Ip=c(function(Fh,Gp){ +var VA=require('@stdlib/math/base/assert/is-negative-zero/dist'),zA=require('@stdlib/math/base/assert/is-nan/dist'),Cp=$u(),DA=Cp.length;function HA(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),p=0;p=t&&(m=a[r+(j-t)*i],!(m<=f&&!(o&&m===f)));j-=t)a[r+j*i]=m,u[s+j*v]=u[s+(j-t)*v];a[r+j*i]=f,u[s+j*v]=q}return a}Gp.exports=HA +});var zp=c(function(Mh,Vp){ +var JA=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Kp=Bp(),QA=Ip();JA(Kp,"ndarray",QA);Vp.exports=Kp +});var Jp=c(function(Th,Hp){ +var UA=require("path").join,WA=require('@stdlib/utils/try-require/dist'),$A=require('@stdlib/assert/is-error/dist'),hA=zp(),hu,Dp=WA(UA(__dirname,"./native.js"));$A(Dp)?hu=hA:hu=Dp;Hp.exports=hu +});var $p=c(function(Sh,Wp){ +var Qp=require('@stdlib/math/base/assert/is-positive-zero/dist'),Up=require('@stdlib/math/base/assert/is-nan/dist'),YA=require('@stdlib/math/base/special/floor/dist');function XA(n,e,a,i){var r,u,v,s,o,t,f,q,m,p;if(n<=0||e===0)return a;for(e<0&&(i*=-1),i<0?r=(1-n)*i:r=0,t=n,u=YA(n/2);;){if(u>0)u-=1,f=a[r+u*i];else{if(t-=1,t===0)return a;q=r+t*i,f=a[q],a[q]=a[r]}for(m=u,v=m*2+1;vo||Up(s)||s===o&&Qp(s))&&(v+=1)),s=a[r+v*i],s>f||Up(s)||s===f&&Qp(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}Wp.exports=XA +});var dp=c(function(Zh,Xp){ +var hp=require('@stdlib/math/base/assert/is-positive-zero/dist'),Yp=require('@stdlib/math/base/assert/is-nan/dist'),dA=require('@stdlib/math/base/special/floor/dist');function xA(n,e,a,i,r){var u,v,s,o,t,f,q,m,p;if(n<=0||e===0)return a;for(e<0&&(i*=-1,r-=(n-1)*i),t=n,u=dA(n/2);;){if(u>0)u-=1,f=a[r+u*i];else{if(t-=1,t===0)return a;q=r+t*i,f=a[q],a[q]=a[r]}for(m=u,v=m*2+1;vo||Yp(s)||s===o&&hp(s))&&(v+=1)),s=a[r+v*i],s>f||Yp(s)||s===f&&hp(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}Xp.exports=xA +});var r2=c(function(Ph,Np){ +var NA=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),xp=$p(),rL=dp();NA(xp,"ndarray",rL);Np.exports=xp +});var u2=c(function(Ah,a2){ +var eL=require("path").join,aL=require('@stdlib/utils/try-require/dist'),uL=require('@stdlib/assert/is-error/dist'),iL=r2(),Yu,e2=aL(eL(__dirname,"./native.js"));uL(e2)?Yu=iL:Yu=e2;a2.exports=Yu +});var v2=c(function(Lh,n2){ +var ae=require('@stdlib/math/base/assert/is-negative-zero/dist'),i2=require('@stdlib/math/base/assert/is-nan/dist');function nL(n,e,a,i){var r,u,v,s,o,t,f,q;if(n<=0||e===0)return a;if(e<0&&(i*=-1),i<0){for(s=(1-n)*i,o=0,u=s+i,q=1;qo;)a[v]=a[v+i],v+=i;a[o]=t}else{for(r=ae(t),v=u-i;v<=s&&(f=a[v],!(f<=t&&!(r&&f===t&&ae(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}for(s=0,o=(n-1)*i,u=s+i,q=1;q=s&&(f=a[v],!(f<=t&&!(r&&f===t&&ae(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}n2.exports=nL +});var o2=c(function(Bh,t2){ +var ue=require('@stdlib/math/base/assert/is-negative-zero/dist'),s2=require('@stdlib/math/base/assert/is-nan/dist');function vL(n,e,a,i,r){var u,v,s,o,t,f,q,m;if(n<=0||e===0)return a;if(e<0&&(i*=-1,r-=(n-1)*i),o=r,t=o+(n-1)*i,v=o+i,i<0){for(m=1;mt;)a[s]=a[s+i],s+=i;a[t]=f}else{for(u=ue(f),s=v-i;s<=o&&(q=a[s],!(q<=f&&!(u&&q===f&&ue(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}for(m=1;m=o&&(q=a[s],!(q<=f&&!(u&&q===f&&ue(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}t2.exports=vL +});var c2=c(function(Ch,q2){ +var sL=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),f2=v2(),tL=o2();sL(f2,"ndarray",tL);q2.exports=f2 +});var p2=c(function(Gh,l2){ +var oL=require("path").join,fL=require('@stdlib/utils/try-require/dist'),qL=require('@stdlib/assert/is-error/dist'),cL=c2(),Xu,m2=fL(oL(__dirname,"./native.js"));qL(m2)?Xu=cL:Xu=m2;l2.exports=Xu +});var du=c(function(Ih,mL){mL.exports=[701,301,132,57,23,10,4,1]});var b2=c(function(Kh,g2){ +var lL=require('@stdlib/math/base/assert/is-negative-zero/dist'),pL=require('@stdlib/math/base/assert/is-nan/dist'),j2=du(),jL=j2.length;function gL(n,e,a,i){var r,u,v,s,o,t,f,q;if(n<=0||e===0)return a;for(e<0&&(i*=-1),i<0?r=(1-n)*i:r=0,t=0;t=v&&(o=a[r+(q-v)*i],!(o<=s&&!(u&&o===s)));q-=v)a[r+q*i]=o;a[r+q*i]=s}return a}g2.exports=gL +});var R2=c(function(Vh,y2){ +var bL=require('@stdlib/math/base/assert/is-negative-zero/dist'),wL=require('@stdlib/math/base/assert/is-nan/dist'),w2=du(),yL=w2.length;function RL(n,e,a,i,r){var u,v,s,o,t,f,q;if(n<=0||e===0)return a;for(e<0&&(i*=-1,r-=(n-1)*i),t=0;t=v&&(o=a[r+(q-v)*i],!(o<=s&&!(u&&o===s)));q-=v)a[r+q*i]=o;a[r+q*i]=s}return a}y2.exports=RL +});var E2=c(function(zh,_2){ +var kL=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),k2=b2(),_L=R2();kL(k2,"ndarray",_L);_2.exports=k2 +});var M2=c(function(Dh,F2){ +var EL=require("path").join,OL=require('@stdlib/utils/try-require/dist'),FL=require('@stdlib/assert/is-error/dist'),ML=E2(),xu,O2=OL(EL(__dirname,"./native.js"));FL(O2)?xu=ML:xu=O2;F2.exports=xu +});var ri=c(function(Hh,T2){ +var TL=require('@stdlib/math/base/special/floor/dist'),SL=128;function Nu(n,e,a,i){var r,u,v,s,o,t,f,q,m,p,l,j,g;if(n<=0)return 0;if(n===1||a===0)return e[i];if(r=i,n<8){for(l=0,g=0;g0)for(v=0;v0)for(s=0;s=aj(u)?s+=i-v+u:s+=u-v+i,i=v,r+=a;return i+s}uj.exports=aB +});var sj=c(function(eY,vj){ +var nj=require('@stdlib/math/base/special/abs/dist');function uB(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return e[i];for(u=i,r=0,o=0,t=0;t=nj(v)?o+=r-s+v:o+=v-s+r,r=s,u+=a;return r+o}vj.exports=uB +});var fj=c(function(aY,oj){ +var iB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),tj=ij(),nB=sj();iB(tj,"ndarray",nB);oj.exports=tj +});var ve=c(function(uY,cj){ +var vB=require("path").join,sB=require('@stdlib/utils/try-require/dist'),tB=require('@stdlib/assert/is-error/dist'),oB=fj(),ni,qj=sB(vB(__dirname,"./native.js"));tB(qj)?ni=oB:ni=qj;cj.exports=ni +});var lj=c(function(iY,mj){ +var fB=ve();function qB(n,e,a){return fB(n,e,a)}mj.exports=qB +});var jj=c(function(nY,pj){ +var cB=ve().ndarray;function mB(n,e,a,i){return cB(n,e,a,i)}pj.exports=mB +});var wj=c(function(vY,bj){ +var lB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),gj=lj(),pB=jj();lB(gj,"ndarray",pB);bj.exports=gj +});var kj=c(function(sY,Rj){ +var jB=require("path").join,gB=require('@stdlib/utils/try-require/dist'),bB=require('@stdlib/assert/is-error/dist'),wB=wj(),vi,yj=gB(jB(__dirname,"./native.js"));bB(yj)?vi=wB:vi=yj;Rj.exports=vi +});var Ej=c(function(tY,_j){ +var se=require('@stdlib/math/base/special/abs/dist');function yB(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=se(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,se(v)>=se(f)?s=v-t+f:s=f-t+v,v=t,r+=s,u+=a;return i+v+r}_j.exports=yB +});var Fj=c(function(oY,Oj){ +var te=require('@stdlib/math/base/special/abs/dist');function RB(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||a===0)return e[i];for(v=i,r=0,u=0,s=0,m=0;m=te(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,te(s)>=te(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=a;return r+s+u}Oj.exports=RB +});var Sj=c(function(fY,Tj){ +var kB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Mj=Ej(),_B=Fj();kB(Mj,"ndarray",_B);Tj.exports=Mj +});var Aj=c(function(qY,Pj){ +var EB=require("path").join,OB=require('@stdlib/utils/try-require/dist'),FB=require('@stdlib/assert/is-error/dist'),MB=Sj(),si,Zj=OB(EB(__dirname,"./native.js"));FB(Zj)?si=MB:si=Zj;Pj.exports=si +});var Bj=c(function(cY,Lj){ +var ti=6;function TB(n,e,a){var i,r,u,v;if(i=0,n<=0)return i;if(n===1||a===0)return e[0];if(a===1){if(u=n%ti,u>0)for(v=0;v0)for(s=0;s0)for(u=0;u0)for(s=0;s=ng(v)?o+=r-s+v:o+=v-s+r,r=s,u+=i;return r+o}vg.exports=XB +});var fg=c(function(EY,og){ +var tg=require('@stdlib/math/base/special/abs/dist');function dB(n,e,a,i,r){var u,v,s,o,t,f;if(n<=0)return 0;if(n===1||i===0)return e+a[r];for(v=r,u=0,t=0,f=0;f=tg(s)?t+=u-o+s:t+=s-o+u,u=o,v+=i;return u+t}og.exports=dB +});var qe=c(function(OY,cg){ +var xB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),qg=sg(),NB=fg();xB(qg,"ndarray",NB);cg.exports=qg +});var lg=c(function(FY,mg){ +var rC=qe();function eC(n,e,a,i){return rC(n,e,a,i)}mg.exports=eC +});var jg=c(function(MY,pg){ +var aC=qe().ndarray;function uC(n,e,a,i,r){return aC(n,e,a,i,r)}pg.exports=uC +});var wg=c(function(TY,bg){ +var iC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),gg=lg(),nC=jg();iC(gg,"ndarray",nC);bg.exports=gg +});var Rg=c(function(SY,yg){ +var ce=require('@stdlib/math/base/special/abs/dist');function vC(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||i===0)return e+a[0];for(i<0?v=(1-n)*i:v=0,r=0,u=0,s=0,m=0;m=ce(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,ce(s)>=ce(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=i;return r+s+u}yg.exports=vC +});var _g=c(function(ZY,kg){ +var me=require('@stdlib/math/base/special/abs/dist');function sC(n,e,a,i,r){var u,v,s,o,t,f,q,m,p;if(n<=0)return 0;if(n===1||i===0)return e+a[0];for(s=r,u=0,v=0,o=0,p=0;p=me(f)?m=u-q+f:m=f-q+u,u=q,q=o+m,me(o)>=me(m)?t=o-q+m:t=m-q+o,o=q,v+=t,s+=i;return u+o+v}kg.exports=sC +});var Fg=c(function(PY,Og){ +var tC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Eg=Rg(),oC=_g();tC(Eg,"ndarray",oC);Og.exports=Eg +});var Tg=c(function(AY,Mg){ +function fC(n,e,a,i){var r,u,v;if(n<=0)return 0;if(n===1||i===0)return e+a[0];for(i<0?u=(1-n)*i:u=0,r=0,v=0;v=$g(t)?q+=o-f+t:q+=t-f+o,o=f,r[s]=o+q,v+=i,s+=u;return r}hg.exports=FC +});var xg=c(function(HY,dg){ +var Xg=require('@stdlib/math/base/special/abs/dist');function MC(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l;if(n<=0)return u;for(o=r,t=s,f=e,p=0,l=0;l=Xg(q)?p+=f-m+q:p+=q-m+f,f=m,u[t]=f+p,o+=i,t+=v;return u}dg.exports=MC +});var le=c(function(JY,rb){ +var TC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Ng=Yg(),SC=xg();TC(Ng,"ndarray",SC);rb.exports=Ng +});var ab=c(function(QY,eb){ +var ZC=le();function PC(n,e,a,i,r,u){return ZC(n,e,a,i,r,u)}eb.exports=PC +});var ib=c(function(UY,ub){ +var AC=le().ndarray;function LC(n,e,a,i,r,u,v,s){return AC(n,e,a,i,r,u,v,s)}ub.exports=LC +});var sb=c(function(WY,vb){ +var BC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),nb=ab(),CC=ib();BC(nb,"ndarray",CC);vb.exports=nb +});var ob=c(function($Y,tb){ +var pe=require('@stdlib/math/base/special/abs/dist');function GC(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l;if(n<=0)return r;for(i<0?s=(1-n)*i:s=0,u<0?o=(1-n)*u:o=0,v=0,t=0,l=0;l=pe(q)?p=e-m+q:p=q-m+e,e=m,m=t+p,pe(t)>=pe(p)?f=t-m+p:f=p-m+t,t=m,v+=f,r[o]=e+t+v,s+=i,o+=u;return r}tb.exports=GC +});var qb=c(function(hY,fb){ +var je=require('@stdlib/math/base/special/abs/dist');function IC(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g;if(n<=0)return u;for(t=r,f=s,o=0,q=0,g=0;g=je(p)?j=e-l+p:j=p-l+e,e=l,l=q+j,je(q)>=je(j)?m=q-l+j:m=j-l+q,q=l,o+=m,u[f]=e+q+o,t+=i,f+=v;return u}fb.exports=IC +});var lb=c(function(YY,mb){ +var KC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),cb=ob(),VC=qb();KC(cb,"ndarray",VC);mb.exports=cb +});var jb=c(function(XY,pb){ +function zC(n,e,a,i,r,u){var v,s,o;if(n<=0)return r;for(i<0?v=(1-n)*i:v=0,u<0?s=(1-n)*u:s=0,o=0;o0)for(u=0;u0)for(o=0;o=Ub(o)?f+=u-t+o:f+=o-t+u,u=t,q+=1),v+=a;return i[s]=u+f,i[s+r]=q,i}Wb.exports=lG +});var db=c(function(qX,Xb){ +var hb=require('@stdlib/math/base/assert/is-nan/dist'),Yb=require('@stdlib/math/base/special/abs/dist');function pG(n,e,a,i,r,u,v){var s,o,t,f,q,m,p,l;if(o=i,t=v,s=0,n<=0)return r[t]=s,r[t+u]=0,r;if(n===1||a===0)return hb(e[o])?(r[t]=s,r[t+u]=0,r):(r[t]=e[o],r[t+u]=1,r);for(m=0,p=0,l=0;l=Yb(f)?m+=s-q+f:m+=f-q+s,s=q,p+=1),o+=a;return r[t]=s+m,r[t+u]=p,r}Xb.exports=pG +});var rw=c(function(cX,Nb){ +var jG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),xb=$b(),gG=db();jG(xb,"ndarray",gG);Nb.exports=xb +});var iw=c(function(mX,uw){ +var ew=require('@stdlib/math/base/assert/is-nan/dist'),aw=require('@stdlib/math/base/special/abs/dist');function bG(n,e,a){var i,r,u,v,s,o;if(n<=0)return 0;if(n===1||a===0)return ew(e[0])?0:e[0];for(a<0?r=(1-n)*a:r=0,i=0,s=0,o=0;o=aw(u)?s+=i-v+u:s+=u-v+i,i=v),r+=a;return i+s}uw.exports=bG +});var tw=c(function(lX,sw){ +var nw=require('@stdlib/math/base/assert/is-nan/dist'),vw=require('@stdlib/math/base/special/abs/dist');function wG(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return nw(e[i])?0:e[i];for(u=i,r=0,o=0,t=0;t=vw(v)?o+=r-s+v:o+=v-s+r,r=s),u+=a;return r+o}sw.exports=wG +});var be=c(function(pX,fw){ +var yG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),ow=iw(),RG=tw();yG(ow,"ndarray",RG);fw.exports=ow +});var cw=c(function(jX,qw){ +var kG=be();function _G(n,e,a){return kG(n,e,a)}qw.exports=_G +});var lw=c(function(gX,mw){ +var EG=be().ndarray;function OG(n,e,a,i){return EG(n,e,a,i)}mw.exports=OG +});var gw=c(function(bX,jw){ +var FG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),pw=cw(),MG=lw();FG(pw,"ndarray",MG);jw.exports=pw +});var yw=c(function(wX,ww){ +var bw=require('@stdlib/math/base/assert/is-nan/dist'),we=require('@stdlib/math/base/special/abs/dist');function TG(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return bw(e[0])?0:e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=we(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,we(v)>=we(f)?s=v-t+f:s=f-t+v,v=t,r+=s),u+=a;return i+v+r}ww.exports=TG +});var _w=c(function(yX,kw){ +var Rw=require('@stdlib/math/base/assert/is-nan/dist'),ye=require('@stdlib/math/base/special/abs/dist');function SG(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||a===0)return Rw(e[i])?0:e[i];for(v=i,r=0,u=0,s=0,m=0;m=ye(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,ye(s)>=ye(q)?o=s-f+q:o=q-f+s,s=f,u+=o),v+=a;return r+s+u}kw.exports=SG +});var Fw=c(function(RX,Ow){ +var ZG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Ew=yw(),PG=_w();ZG(Ew,"ndarray",PG);Ow.exports=Ew +});var Sw=c(function(kX,Tw){ +var Mw=require('@stdlib/math/base/assert/is-nan/dist');function AG(n,e,a){var i,r,u;if(r=0,n<=0)return r;if(n===1||a===0)return Mw(e[0])?r:e[0];for(a<0?i=(1-n)*a:i=0,u=0;u0)for(r=0;r0)for(f=0;f0)o-=1,m=a[v+o*i],p=r[s+o*u];else{if(g-=1,g===0)return a;l=v+g*i,m=a[l],j=s+g*u,p=r[j],a[l]=a[v],r[j]=r[s]}for(b=o,t=b*2+1;tq||xw(f)||f===q&&dw(f))&&(t+=1)),f=a[v+t*i],f>m||xw(f)||f===m&&dw(f));)a[v+b*i]=f,r[s+b*u]=r[s+t*u],b=t,t=b*2+1;a[v+b*i]=m,r[s+b*u]=p}}Nw.exports=eI +});var iy=c(function(LX,uy){ +var ey=require('@stdlib/math/base/assert/is-positive-zero/dist'),ay=require('@stdlib/math/base/assert/is-nan/dist'),aI=require('@stdlib/math/base/special/floor/dist');function uI(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g,b,R;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),g=n,o=aI(n/2);;){if(o>0)o-=1,m=a[r+o*i],p=u[s+o*v];else{if(g-=1,g===0)return a;l=r+g*i,m=a[l],j=s+g*v,p=u[j],a[l]=a[r],u[j]=u[s]}for(b=o,t=b*2+1;tq||ay(f)||f===q&&ey(f))&&(t+=1)),f=a[r+t*i],f>m||ay(f)||f===m&&ey(f));)a[r+b*i]=f,u[s+b*v]=u[s+t*v],b=t,t=b*2+1;a[r+b*i]=m,u[s+b*v]=p}}uy.exports=uI +});var sy=c(function(BX,vy){ +var iI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),ny=ry(),nI=iy();iI(ny,"ndarray",nI);vy.exports=ny +});var fy=c(function(CX,oy){ +var ke=require('@stdlib/math/base/assert/is-negative-zero/dist'),ty=require('@stdlib/math/base/assert/is-nan/dist');function vI(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,j,g,b,R;if(n<=0||e===0)return a;if(e<0&&(i*=-1,u*=-1),u<0?(p=(1-n)*u,l=0):(p=0,l=(n-1)*u),q=p+u,i<0){for(t=(1-n)*i,f=0,s=t+i,R=1;Rf;)a[o]=a[o+i],r[m]=r[m+u],o+=i,m+=u;a[f]=j,r[l]=g}else{for(v=ke(j),o=s-i,m=q-u;o<=t&&(b=a[o],!(b<=j&&!(v&&b===j&&ke(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=j,r[m+u]=g,s+=i,q+=u}return a}for(t=0,f=(n-1)*i,s=t+i,R=1;R=t&&(b=a[o],!(b<=j&&!(v&&b===j&&ke(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=j,r[m+u]=g,s+=i,q+=u}return a}oy.exports=vI +});var my=c(function(GX,cy){ +var _e=require('@stdlib/math/base/assert/is-negative-zero/dist'),qy=require('@stdlib/math/base/assert/is-nan/dist');function sI(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g,b,R,_,k;if(n<=0||e===0)return a;if(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),q=r,m=q+(n-1)*i,t=q+i,j=s,g=j+(n-1)*v,p=j+v,i<0){for(k=1;km;)a[f]=a[f+i],u[l]=u[l+v],f+=i,l+=v;a[m]=b,u[g]=R}else{for(o=_e(b),f=t-i,l=p-v;f<=q&&(_=a[f],!(_<=b&&!(o&&_===b&&_e(_)===!1)));)a[f+i]=_,u[l+v]=u[l],f-=i,l-=v;a[f+i]=b,u[l+v]=R,t+=i,p+=v}return a}for(k=1;k=q&&(_=a[f],!(_<=b&&!(o&&_===b&&_e(_)===!1)));)a[f+i]=_,u[l+v]=u[l],f-=i,l-=v;a[f+i]=b,u[l+v]=R,t+=i,p+=v}return a}cy.exports=sI +});var jy=c(function(IX,py){ +var tI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),ly=fy(),oI=my();tI(ly,"ndarray",oI);py.exports=ly +});var Fi=c(function(KX,fI){fI.exports=[701,301,132,57,23,10,4,1]});var wy=c(function(VX,by){ +var qI=require('@stdlib/math/base/assert/is-negative-zero/dist'),cI=require('@stdlib/math/base/assert/is-nan/dist'),gy=Fi(),mI=gy.length;function lI(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,j;if(n<=0||e===0)return a;for(e<0&&(i*=-1,u*=-1),i<0?v=(1-n)*i:v=0,u<0?s=(1-n)*u:s=0,p=0;p=t&&(m=a[v+(j-t)*i],!(m<=f&&!(o&&m===f)));j-=t)a[v+j*i]=m,r[s+j*u]=r[s+(j-t)*u];a[v+j*i]=f,r[s+j*u]=q}return a}by.exports=lI +});var ky=c(function(zX,Ry){ +var pI=require('@stdlib/math/base/assert/is-negative-zero/dist'),jI=require('@stdlib/math/base/assert/is-nan/dist'),yy=Fi(),gI=yy.length;function bI(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),p=0;p=t&&(m=a[r+(j-t)*i],!(m<=f&&!(o&&m===f)));j-=t)a[r+j*i]=m,u[s+j*v]=u[s+(j-t)*v];a[r+j*i]=f,u[s+j*v]=q}return a}Ry.exports=bI +});var Oy=c(function(DX,Ey){ +var wI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),_y=wy(),yI=ky();wI(_y,"ndarray",yI);Ey.exports=_y +});var Sy=c(function(HX,Ty){ +var Fy=require('@stdlib/math/base/assert/is-positive-zero/dist'),My=require('@stdlib/math/base/assert/is-nan/dist'),RI=require('@stdlib/math/base/special/floor/dist');function kI(n,e,a,i){var r,u,v,s,o,t,f,q,m,p;if(n<=0||e===0)return a;for(e<0&&(i*=-1),i<0?r=(1-n)*i:r=0,t=n,u=RI(n/2);;){if(u>0)u-=1,f=a[r+u*i];else{if(t-=1,t===0)return a;q=r+t*i,f=a[q],a[q]=a[r]}for(m=u,v=m*2+1;vo||My(s)||s===o&&Fy(s))&&(v+=1)),s=a[r+v*i],s>f||My(s)||s===f&&Fy(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}Ty.exports=kI +});var Ly=c(function(JX,Ay){ +var Zy=require('@stdlib/math/base/assert/is-positive-zero/dist'),Py=require('@stdlib/math/base/assert/is-nan/dist'),_I=require('@stdlib/math/base/special/floor/dist');function EI(n,e,a,i,r){var u,v,s,o,t,f,q,m,p;if(n<=0||e===0)return a;for(e<0&&(i*=-1,r-=(n-1)*i),t=n,u=_I(n/2);;){if(u>0)u-=1,f=a[r+u*i];else{if(t-=1,t===0)return a;q=r+t*i,f=a[q],a[q]=a[r]}for(m=u,v=m*2+1;vo||Py(s)||s===o&&Zy(s))&&(v+=1)),s=a[r+v*i],s>f||Py(s)||s===f&&Zy(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}Ay.exports=EI +});var Gy=c(function(QX,Cy){ +var OI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),By=Sy(),FI=Ly();OI(By,"ndarray",FI);Cy.exports=By +});var Vy=c(function(UX,Ky){ +var Ee=require('@stdlib/math/base/assert/is-negative-zero/dist'),Iy=require('@stdlib/math/base/assert/is-nan/dist');function MI(n,e,a,i){var r,u,v,s,o,t,f,q;if(n<=0||e===0)return a;if(e<0&&(i*=-1),i<0){for(s=(1-n)*i,o=0,u=s+i,q=1;qo;)a[v]=a[v+i],v+=i;a[o]=t}else{for(r=Ee(t),v=u-i;v<=s&&(f=a[v],!(f<=t&&!(r&&f===t&&Ee(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}for(s=0,o=(n-1)*i,u=s+i,q=1;q=s&&(f=a[v],!(f<=t&&!(r&&f===t&&Ee(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}Ky.exports=MI +});var Hy=c(function(WX,Dy){ +var Oe=require('@stdlib/math/base/assert/is-negative-zero/dist'),zy=require('@stdlib/math/base/assert/is-nan/dist');function TI(n,e,a,i,r){var u,v,s,o,t,f,q,m;if(n<=0||e===0)return a;if(e<0&&(i*=-1,r-=(n-1)*i),o=r,t=o+(n-1)*i,v=o+i,i<0){for(m=1;mt;)a[s]=a[s+i],s+=i;a[t]=f}else{for(u=Oe(f),s=v-i;s<=o&&(q=a[s],!(q<=f&&!(u&&q===f&&Oe(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}for(m=1;m=o&&(q=a[s],!(q<=f&&!(u&&q===f&&Oe(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}Dy.exports=TI +});var Uy=c(function($X,Qy){ +var SI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Jy=Vy(),ZI=Hy();SI(Jy,"ndarray",ZI);Qy.exports=Jy +});var Mi=c(function(hX,PI){PI.exports=[701,301,132,57,23,10,4,1]});var hy=c(function(YX,$y){ +var AI=require('@stdlib/math/base/assert/is-negative-zero/dist'),LI=require('@stdlib/math/base/assert/is-nan/dist'),Wy=Mi(),BI=Wy.length;function CI(n,e,a,i){var r,u,v,s,o,t,f,q;if(n<=0||e===0)return a;for(e<0&&(i*=-1),i<0?r=(1-n)*i:r=0,t=0;t=v&&(o=a[r+(q-v)*i],!(o<=s&&!(u&&o===s)));q-=v)a[r+q*i]=o;a[r+q*i]=s}return a}$y.exports=CI +});var dy=c(function(XX,Xy){ +var GI=require('@stdlib/math/base/assert/is-negative-zero/dist'),II=require('@stdlib/math/base/assert/is-nan/dist'),Yy=Mi(),KI=Yy.length;function VI(n,e,a,i,r){var u,v,s,o,t,f,q;if(n<=0||e===0)return a;for(e<0&&(i*=-1,r-=(n-1)*i),t=0;t=v&&(o=a[r+(q-v)*i],!(o<=s&&!(u&&o===s)));q-=v)a[r+q*i]=o;a[r+q*i]=s}return a}Xy.exports=VI +});var rR=c(function(dX,Ny){ +var zI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),xy=hy(),DI=dy();zI(xy,"ndarray",DI);Ny.exports=xy +});var uR=c(function(xX,aR){ +var eR=require('@stdlib/math/base/special/abs/dist');function HI(n,e,a){var i,r,u,v,s,o;if(n<=0)return 0;if(n===1||a===0)return e[0];for(a<0?r=(1-n)*a:r=0,i=0,s=0,o=0;o=eR(u)?s+=i-v+u:s+=u-v+i,i=v,r+=a;return i+s}aR.exports=HI +});var vR=c(function(NX,nR){ +var iR=require('@stdlib/math/base/special/abs/dist');function JI(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return e[i];for(u=i,r=0,o=0,t=0;t=iR(v)?o+=r-s+v:o+=v-s+r,r=s,u+=a;return r+o}nR.exports=JI +});var Fe=c(function(rd,tR){ +var QI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),sR=uR(),UI=vR();QI(sR,"ndarray",UI);tR.exports=sR +});var fR=c(function(ed,oR){ +var WI=Fe();function $I(n,e,a){return WI(n,e,a)}oR.exports=$I +});var cR=c(function(ad,qR){ +var hI=Fe().ndarray;function YI(n,e,a,i){return hI(n,e,a,i)}qR.exports=YI +});var pR=c(function(ud,lR){ +var XI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),mR=fR(),dI=cR();XI(mR,"ndarray",dI);lR.exports=mR +});var gR=c(function(id,jR){ +var Me=require('@stdlib/math/base/special/abs/dist');function xI(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=Me(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,Me(v)>=Me(f)?s=v-t+f:s=f-t+v,v=t,r+=s,u+=a;return i+v+r}jR.exports=xI +});var wR=c(function(nd,bR){ +var Te=require('@stdlib/math/base/special/abs/dist');function NI(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||a===0)return e[i];for(v=i,r=0,u=0,s=0,m=0;m=Te(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,Te(s)>=Te(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=a;return r+s+u}bR.exports=NI +});var kR=c(function(vd,RR){ +var rK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),yR=gR(),eK=wR();rK(yR,"ndarray",eK);RR.exports=yR +});var ER=c(function(sd,_R){ +var Ti=6;function aK(n,e,a){var i,r,u,v;if(u=0,n<=0)return u;if(n===1||a===0)return e[0];if(a===1){if(r=n%Ti,r>0)for(v=0;v0)for(s=0;s0)for(u=0;u0)for(s=0;s=WR(v)?o=W(o+W(W(r-s)+v)):o=W(o+W(W(v-s)+r)),r=s,u+=i;return W(r+o)}$R.exports=yK +});var dR=c(function(bd,XR){ +var $=require('@stdlib/number/float64/base/to-float32/dist'),YR=require('@stdlib/math/base/special/abs/dist');function RK(n,e,a,i,r){var u,v,s,o,t,f;if(n<=0)return 0;if(n===1||i===0)return $(e+a[r]);for(v=r,u=0,t=0,f=0;f=YR(s)?t=$(t+$($(u-o)+s)):t=$(t+$($(s-o)+u)),u=o,v+=i;return $(u+t)}XR.exports=RK +});var rk=c(function(wd,NR){ +var kK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),xR=hR(),_K=dR();kK(xR,"ndarray",_K);NR.exports=xR +});var Pe=c(function(yd,ak){ +var EK=require("path").join,OK=require('@stdlib/utils/try-require/dist'),FK=require('@stdlib/assert/is-error/dist'),MK=rk(),Li,ek=OK(EK(__dirname,"./native.js"));FK(ek)?Li=MK:Li=ek;ak.exports=Li +});var ik=c(function(Rd,uk){ +var TK=Pe();function SK(n,e,a,i){return TK(n,e,a,i)}uk.exports=SK +});var vk=c(function(kd,nk){ +var ZK=Pe().ndarray;function PK(n,e,a,i,r){return ZK(n,e,a,i,r)}nk.exports=PK +});var ok=c(function(_d,tk){ +var AK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),sk=ik(),LK=vk();AK(sk,"ndarray",LK);tk.exports=sk +});var ck=c(function(Ed,qk){ +var BK=require("path").join,CK=require('@stdlib/utils/try-require/dist'),GK=require('@stdlib/assert/is-error/dist'),IK=ok(),Bi,fk=CK(BK(__dirname,"./native.js"));GK(fk)?Bi=IK:Bi=fk;qk.exports=Bi +});var lk=c(function(Od,mk){ +var K=require('@stdlib/number/float64/base/to-float32/dist'),Ae=require('@stdlib/math/base/special/abs/dist');function KK(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||i===0)return K(e+a[0]);for(i<0?v=(1-n)*i:v=0,r=0,u=0,s=0,m=0;m=Ae(t)?q=K(K(r-f)+t):q=K(K(t-f)+r),r=f,f=K(s+q),Ae(s)>=Ae(q)?o=K(K(s-f)+q):o=K(K(q-f)+s),s=f,u=K(u+o),v+=i;return K(r+K(s+u))}mk.exports=KK +});var jk=c(function(Fd,pk){ +var V=require('@stdlib/number/float64/base/to-float32/dist'),Le=require('@stdlib/math/base/special/abs/dist');function VK(n,e,a,i,r){var u,v,s,o,t,f,q,m,p;if(n<=0)return 0;if(n===1||i===0)return V(e+a[r]);for(s=r,u=0,v=0,o=0,p=0;p=Le(f)?m=V(V(u-q)+f):m=V(V(f-q)+u),u=q,q=V(o+m),Le(o)>=Le(m)?t=V(V(o-q)+m):t=V(V(m-q)+o),o=q,v=V(v+t),s+=i;return V(u+V(o+v))}pk.exports=VK +});var wk=c(function(Md,bk){ +var zK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),gk=lk(),DK=jk();zK(gk,"ndarray",DK);bk.exports=gk +});var kk=c(function(Td,Rk){ +var HK=require("path").join,JK=require('@stdlib/utils/try-require/dist'),QK=require('@stdlib/assert/is-error/dist'),UK=wk(),Ci,yk=JK(HK(__dirname,"./native.js"));QK(yk)?Ci=UK:Ci=yk;Rk.exports=Ci +});var Ek=c(function(Sd,_k){ +var Gi=require('@stdlib/number/float64/base/to-float32/dist');function WK(n,e,a,i){var r,u,v;if(n<=0)return 0;if(n===1||i===0)return Gi(e+a[0]);for(i<0?u=(1-n)*i:u=0,r=0,v=0;v=xk(t)?q=er(q+er(er(o-f)+t)):q=er(q+er(er(t-f)+o)),o=f,r[s]=er(o+q),v+=i,s+=u;return r}Nk.exports=RV +});var u3=c(function(Hd,a3){ +var ar=require('@stdlib/number/float64/base/to-float32/dist'),e3=require('@stdlib/math/base/special/abs/dist');function kV(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l;if(n<=0)return u;for(o=r,t=s,f=e,p=0,l=0;l=e3(q)?p=ar(p+ar(ar(f-m)+q)):p=ar(p+ar(ar(q-m)+f)),f=m,u[t]=ar(f+p),o+=i,t+=v;return u}a3.exports=kV +});var v3=c(function(Jd,n3){ +var _V=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),i3=r3(),EV=u3();_V(i3,"ndarray",EV);n3.exports=i3 +});var Be=c(function(Qd,t3){ +var OV=require("path").join,FV=require('@stdlib/utils/try-require/dist'),MV=require('@stdlib/assert/is-error/dist'),TV=v3(),Wi,s3=FV(OV(__dirname,"./native.js"));MV(s3)?Wi=TV:Wi=s3;t3.exports=Wi +});var f3=c(function(Ud,o3){ +var SV=Be();function ZV(n,e,a,i,r,u){return SV(n,e,a,i,r,u)}o3.exports=ZV +});var c3=c(function(Wd,q3){ +var PV=Be().ndarray;function AV(n,e,a,i,r,u,v,s){return PV(n,e,a,i,r,u,v,s)}q3.exports=AV +});var p3=c(function($d,l3){ +var LV=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),m3=f3(),BV=c3();LV(m3,"ndarray",BV);l3.exports=m3 +});var b3=c(function(hd,g3){ +var CV=require("path").join,GV=require('@stdlib/utils/try-require/dist'),IV=require('@stdlib/assert/is-error/dist'),KV=p3(),$i,j3=GV(CV(__dirname,"./native.js"));IV(j3)?$i=KV:$i=j3;g3.exports=$i +});var y3=c(function(Yd,w3){ +var z=require('@stdlib/number/float64/base/to-float32/dist'),Ce=require('@stdlib/math/base/special/abs/dist');function VV(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l;if(n<=0)return r;for(i<0?s=(1-n)*i:s=0,u<0?o=(1-n)*u:o=0,v=0,t=0,l=0;l=Ce(q)?p=z(z(e-m)+q):p=z(z(q-m)+e),e=m,m=z(t+p),Ce(t)>=Ce(p)?f=z(z(t-m)+p):f=z(z(p-m)+t),t=m,v=z(v+f),r[o]=z(e+z(t+v)),s+=i,o+=u;return r}w3.exports=VV +});var k3=c(function(Xd,R3){ +var D=require('@stdlib/number/float64/base/to-float32/dist'),Ge=require('@stdlib/math/base/special/abs/dist');function zV(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g;if(n<=0)return u;for(t=r,f=s,o=0,q=0,g=0;g=Ge(p)?j=D(D(e-l)+p):j=D(D(p-l)+e),e=l,l=D(q+j),Ge(q)>=Ge(j)?m=D(D(q-l)+j):m=D(D(j-l)+q),q=l,o=D(o+m),u[f]=D(e+D(q+o)),t+=i,f+=v;return u}R3.exports=zV +});var O3=c(function(dd,E3){ +var DV=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),_3=y3(),HV=k3();DV(_3,"ndarray",HV);E3.exports=_3 +});var T3=c(function(xd,M3){ +var JV=require("path").join,QV=require('@stdlib/utils/try-require/dist'),UV=require('@stdlib/assert/is-error/dist'),WV=O3(),hi,F3=QV(JV(__dirname,"./native.js"));UV(F3)?hi=WV:hi=F3;M3.exports=hi +});var Z3=c(function(Nd,S3){ +var $V=require('@stdlib/number/float64/base/to-float32/dist');function hV(n,e,a,i,r,u){var v,s,o;if(n<=0)return r;for(i<0?v=(1-n)*i:v=0,u<0?s=(1-n)*u:s=0,o=0;o0)for(u=0;u0)for(s=0;s=t4(u)?s=vr(s+vr(vr(i-v)+u)):s=vr(s+vr(vr(u-v)+i)),i=v),r+=a;return vr(i+s)}o4.exports=SD +});var l4=c(function(Gx,m4){ +var sr=require('@stdlib/number/float64/base/to-float32/dist'),q4=require('@stdlib/math/base/assert/is-nanf/dist'),c4=require('@stdlib/math/base/special/abs/dist');function ZD(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return q4(e[i])?0:e[i];for(u=i,r=0,o=0,t=0;t=c4(v)?o=sr(o+sr(sr(r-s)+v)):o=sr(o+sr(sr(v-s)+r)),r=s),u+=a;return sr(r+o)}m4.exports=ZD +});var g4=c(function(Ix,j4){ +var PD=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),p4=f4(),AD=l4();PD(p4,"ndarray",AD);j4.exports=p4 +});var He=c(function(Kx,w4){ +var LD=require("path").join,BD=require('@stdlib/utils/try-require/dist'),CD=require('@stdlib/assert/is-error/dist'),GD=g4(),jn,b4=BD(LD(__dirname,"./native.js"));CD(b4)?jn=GD:jn=b4;w4.exports=jn +});var R4=c(function(Vx,y4){ +var ID=He();function KD(n,e,a){return ID(n,e,a)}y4.exports=KD +});var _4=c(function(zx,k4){ +var VD=He().ndarray;function zD(n,e,a,i){return VD(n,e,a,i)}k4.exports=zD +});var F4=c(function(Dx,O4){ +var DD=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),E4=R4(),HD=_4();DD(E4,"ndarray",HD);O4.exports=E4 +});var S4=c(function(Hx,T4){ +var JD=require("path").join,QD=require('@stdlib/utils/try-require/dist'),UD=require('@stdlib/assert/is-error/dist'),WD=F4(),gn,M4=QD(JD(__dirname,"./native.js"));UD(M4)?gn=WD:gn=M4;T4.exports=gn +});var A4=c(function(Jx,P4){ +var H=require('@stdlib/number/float64/base/to-float32/dist'),Z4=require('@stdlib/math/base/assert/is-nanf/dist'),Je=require('@stdlib/math/base/special/abs/dist');function $D(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return Z4(e[0])?0:e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=Je(o)?f=H(H(i-t)+o):f=H(H(o-t)+i),i=t,t=H(v+f),Je(v)>=Je(f)?s=H(H(v-t)+f):s=H(H(f-t)+v),v=t,r=H(r+s)),u+=a;return H(i+H(v+r))}P4.exports=$D +});var C4=c(function(Qx,B4){ +var J=require('@stdlib/number/float64/base/to-float32/dist'),L4=require('@stdlib/math/base/assert/is-nanf/dist'),Qe=require('@stdlib/math/base/special/abs/dist');function hD(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||a===0)return L4(e[i])?0:e[i];for(v=i,r=0,u=0,s=0,m=0;m=Qe(t)?q=J(J(r-f)+t):q=J(J(t-f)+r),r=f,f=J(s+q),Qe(s)>=Qe(q)?o=J(J(s-f)+q):o=J(J(q-f)+s),s=f,u=J(u+o)),v+=a;return J(r+J(s+u))}B4.exports=hD +});var K4=c(function(Ux,I4){ +var YD=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),G4=A4(),XD=C4();YD(G4,"ndarray",XD);I4.exports=G4 +});var D4=c(function(Wx,z4){ +var dD=require("path").join,xD=require('@stdlib/utils/try-require/dist'),ND=require('@stdlib/assert/is-error/dist'),rH=K4(),bn,V4=xD(dD(__dirname,"./native.js"));ND(V4)?bn=rH:bn=V4;z4.exports=bn +});var Q4=c(function($x,J4){ +var eH=require('@stdlib/number/float64/base/to-float32/dist'),H4=require('@stdlib/math/base/assert/is-nanf/dist');function aH(n,e,a){var i,r,u;if(i=0,n<=0)return i;if(n===1||a===0)return H4(e[0])?i:e[0];for(a<0?r=(1-n)*a:r=0,u=0;u0)for(r=0;r0)for(t=0;t0)o-=1,m=a[v+o*i],p=r[s+o*u];else{if(g-=1,g===0)return a;l=v+g*i,m=a[l],j=s+g*u,p=r[j],a[l]=a[v],r[j]=r[s]}for(b=o,t=b*2+1;tq||R8(f)||f===q&&y8(f))&&(t+=1)),f=a[v+t*i],f>m||R8(f)||f===m&&y8(f));)a[v+b*i]=f,r[s+b*u]=r[s+t*u],b=t,t=b*2+1;a[v+b*i]=m,r[s+b*u]=p}}k8.exports=LH +});var M8=c(function(vN,F8){ +var E8=require('@stdlib/math/base/assert/is-positive-zerof/dist'),O8=require('@stdlib/math/base/assert/is-nanf/dist'),BH=require('@stdlib/math/base/special/floor/dist');function CH(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g,b,R;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),g=n,o=BH(n/2);;){if(o>0)o-=1,m=a[r+o*i],p=u[s+o*v];else{if(g-=1,g===0)return a;l=r+g*i,m=a[l],j=s+g*v,p=u[j],a[l]=a[r],u[j]=u[s]}for(b=o,t=b*2+1;tq||O8(f)||f===q&&E8(f))&&(t+=1)),f=a[r+t*i],f>m||O8(f)||f===m&&E8(f));)a[r+b*i]=f,u[s+b*v]=u[s+t*v],b=t,t=b*2+1;a[r+b*i]=m,u[s+b*v]=p}}F8.exports=CH +});var Z8=c(function(sN,S8){ +var GH=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),T8=_8(),IH=M8();GH(T8,"ndarray",IH);S8.exports=T8 +});var L8=c(function(tN,A8){ +var KH=require("path").join,VH=require('@stdlib/utils/try-require/dist'),zH=require('@stdlib/assert/is-error/dist'),DH=Z8(),En,P8=VH(KH(__dirname,"./native.js"));zH(P8)?En=DH:En=P8;A8.exports=En +});var G8=c(function(oN,C8){ +var We=require('@stdlib/math/base/assert/is-negative-zerof/dist'),B8=require('@stdlib/math/base/assert/is-nanf/dist');function HH(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,j,g,b,R;if(n<=0||e===0)return a;if(e<0&&(i*=-1,u*=-1),u<0?(p=(1-n)*u,l=0):(p=0,l=(n-1)*u),q=p+u,i<0){for(t=(1-n)*i,f=0,s=t+i,R=1;Rf;)a[o]=a[o+i],r[m]=r[m+u],o+=i,m+=u;a[f]=j,r[l]=g}else{for(v=We(j),o=s-i,m=q-u;o<=t&&(b=a[o],!(b<=j&&!(v&&b===j&&We(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=j,r[m+u]=g,s+=i,q+=u}return a}for(t=0,f=(n-1)*i,s=t+i,R=1;R=t&&(b=a[o],!(b<=j&&!(v&&b===j&&We(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=j,r[m+u]=g,s+=i,q+=u}return a}C8.exports=HH +});var V8=c(function(fN,K8){ +var $e=require('@stdlib/math/base/assert/is-negative-zerof/dist'),I8=require('@stdlib/math/base/assert/is-nanf/dist');function JH(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g,b,R,_,k;if(n<=0||e===0)return a;if(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),q=r,m=q+(n-1)*i,t=q+i,j=s,g=j+(n-1)*v,p=j+v,i<0){for(k=1;km;)a[f]=a[f+i],u[l]=u[l+v],f+=i,l+=v;a[m]=b,u[g]=R}else{for(o=$e(b),f=t-i,l=p-v;f<=q&&(_=a[f],!(_<=b&&!(o&&_===b&&$e(_)===!1)));)a[f+i]=_,u[l+v]=u[l],f-=i,l-=v;a[f+i]=b,u[l+v]=R,t+=i,p+=v}return a}for(k=1;k=q&&(_=a[f],!(_<=b&&!(o&&_===b&&$e(_)===!1)));)a[f+i]=_,u[l+v]=u[l],f-=i,l-=v;a[f+i]=b,u[l+v]=R,t+=i,p+=v}return a}K8.exports=JH +});var H8=c(function(qN,D8){ +var QH=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),z8=G8(),UH=V8();QH(z8,"ndarray",UH);D8.exports=z8 +});var U8=c(function(cN,Q8){ +var WH=require("path").join,$H=require('@stdlib/utils/try-require/dist'),hH=require('@stdlib/assert/is-error/dist'),YH=H8(),On,J8=$H(WH(__dirname,"./native.js"));hH(J8)?On=YH:On=J8;Q8.exports=On +});var Fn=c(function(mN,XH){XH.exports=[701,301,132,57,23,10,4,1]});var h8=c(function(lN,$8){ +var dH=require('@stdlib/math/base/assert/is-negative-zerof/dist'),xH=require('@stdlib/math/base/assert/is-nanf/dist'),W8=Fn(),NH=W8.length;function rJ(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,j;if(n<=0||e===0)return a;for(e<0&&(i*=-1,u*=-1),i<0?v=(1-n)*i:v=0,u<0?s=(1-n)*u:s=0,p=0;p=t&&(m=a[v+(j-t)*i],!(m<=f&&!(o&&m===f)));j-=t)a[v+j*i]=m,r[s+j*u]=r[s+(j-t)*u];a[v+j*i]=f,r[s+j*u]=q}return a}$8.exports=rJ +});var d8=c(function(pN,X8){ +var eJ=require('@stdlib/math/base/assert/is-negative-zerof/dist'),aJ=require('@stdlib/math/base/assert/is-nanf/dist'),Y8=Fn(),uJ=Y8.length;function iJ(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),p=0;p=t&&(m=a[r+(j-t)*i],!(m<=f&&!(o&&m===f)));j-=t)a[r+j*i]=m,u[s+j*v]=u[s+(j-t)*v];a[r+j*i]=f,u[s+j*v]=q}return a}X8.exports=iJ +});var rE=c(function(jN,N8){ +var nJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),x8=h8(),vJ=d8();nJ(x8,"ndarray",vJ);N8.exports=x8 +});var uE=c(function(gN,aE){ +var sJ=require("path").join,tJ=require('@stdlib/utils/try-require/dist'),oJ=require('@stdlib/assert/is-error/dist'),fJ=rE(),Mn,eE=tJ(sJ(__dirname,"./native.js"));oJ(eE)?Mn=fJ:Mn=eE;aE.exports=Mn +});var sE=c(function(bN,vE){ +var iE=require('@stdlib/math/base/assert/is-positive-zerof/dist'),nE=require('@stdlib/math/base/assert/is-nanf/dist'),qJ=require('@stdlib/math/base/special/floor/dist');function cJ(n,e,a,i){var r,u,v,s,o,t,f,q,m,p;if(n<=0||e===0)return a;for(e<0&&(i*=-1),i<0?r=(1-n)*i:r=0,t=n,u=qJ(n/2);;){if(u>0)u-=1,f=a[r+u*i];else{if(t-=1,t===0)return a;q=r+t*i,f=a[q],a[q]=a[r]}for(m=u,v=m*2+1;vo||nE(s)||s===o&&iE(s))&&(v+=1)),s=a[r+v*i],s>f||nE(s)||s===f&&iE(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}vE.exports=cJ +});var qE=c(function(wN,fE){ +var tE=require('@stdlib/math/base/assert/is-positive-zerof/dist'),oE=require('@stdlib/math/base/assert/is-nanf/dist'),mJ=require('@stdlib/math/base/special/floor/dist');function lJ(n,e,a,i,r){var u,v,s,o,t,f,q,m,p;if(n<=0||e===0)return a;for(e<0&&(i*=-1,r-=(n-1)*i),t=n,u=mJ(n/2);;){if(u>0)u-=1,f=a[r+u*i];else{if(t-=1,t===0)return a;q=r+t*i,f=a[q],a[q]=a[r]}for(m=u,v=m*2+1;vo||oE(s)||s===o&&tE(s))&&(v+=1)),s=a[r+v*i],s>f||oE(s)||s===f&&tE(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}fE.exports=lJ +});var lE=c(function(yN,mE){ +var pJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),cE=sE(),jJ=qE();pJ(cE,"ndarray",jJ);mE.exports=cE +});var gE=c(function(RN,jE){ +var gJ=require("path").join,bJ=require('@stdlib/utils/try-require/dist'),wJ=require('@stdlib/assert/is-error/dist'),yJ=lE(),Tn,pE=bJ(gJ(__dirname,"./native.js"));wJ(pE)?Tn=yJ:Tn=pE;jE.exports=Tn +});var yE=c(function(kN,wE){ +var he=require('@stdlib/math/base/assert/is-negative-zerof/dist'),bE=require('@stdlib/math/base/assert/is-nanf/dist');function RJ(n,e,a,i){var r,u,v,s,o,t,f,q;if(n<=0||e===0)return a;if(e<0&&(i*=-1),i<0){for(s=(1-n)*i,o=0,u=s+i,q=1;qo;)a[v]=a[v+i],v+=i;a[o]=t}else{for(r=he(t),v=u-i;v<=s&&(f=a[v],!(f<=t&&!(r&&f===t&&he(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}for(s=0,o=(n-1)*i,u=s+i,q=1;q=s&&(f=a[v],!(f<=t&&!(r&&f===t&&he(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}wE.exports=RJ +});var _E=c(function(_N,kE){ +var Ye=require('@stdlib/math/base/assert/is-negative-zerof/dist'),RE=require('@stdlib/math/base/assert/is-nanf/dist');function kJ(n,e,a,i,r){var u,v,s,o,t,f,q,m;if(n<=0||e===0)return a;if(e<0&&(i*=-1,r-=(n-1)*i),o=r,t=o+(n-1)*i,v=o+i,i<0){for(m=1;mt;)a[s]=a[s+i],s+=i;a[t]=f}else{for(u=Ye(f),s=v-i;s<=o&&(q=a[s],!(q<=f&&!(u&&q===f&&Ye(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}for(m=1;m=o&&(q=a[s],!(q<=f&&!(u&&q===f&&Ye(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}kE.exports=kJ +});var FE=c(function(EN,OE){ +var _J=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),EE=yE(),EJ=_E();_J(EE,"ndarray",EJ);OE.exports=EE +});var SE=c(function(ON,TE){ +var OJ=require("path").join,FJ=require('@stdlib/utils/try-require/dist'),MJ=require('@stdlib/assert/is-error/dist'),TJ=FE(),Sn,ME=FJ(OJ(__dirname,"./native.js"));MJ(ME)?Sn=TJ:Sn=ME;TE.exports=Sn +});var Zn=c(function(FN,SJ){SJ.exports=[701,301,132,57,23,10,4,1]});var AE=c(function(MN,PE){ +var ZJ=require('@stdlib/math/base/assert/is-negative-zerof/dist'),PJ=require('@stdlib/math/base/assert/is-nanf/dist'),ZE=Zn(),AJ=ZE.length;function LJ(n,e,a,i){var r,u,v,s,o,t,f,q;if(n<=0||e===0)return a;for(e<0&&(i*=-1),i<0?r=(1-n)*i:r=0,t=0;t=v&&(o=a[r+(q-v)*i],!(o<=s&&!(u&&o===s)));q-=v)a[r+q*i]=o;a[r+q*i]=s}return a}PE.exports=LJ +});var CE=c(function(TN,BE){ +var BJ=require('@stdlib/math/base/assert/is-negative-zerof/dist'),CJ=require('@stdlib/math/base/assert/is-nanf/dist'),LE=Zn(),GJ=LE.length;function IJ(n,e,a,i,r){var u,v,s,o,t,f,q;if(n<=0||e===0)return a;for(e<0&&(i*=-1,r-=(n-1)*i),t=0;t=v&&(o=a[r+(q-v)*i],!(o<=s&&!(u&&o===s)));q-=v)a[r+q*i]=o;a[r+q*i]=s}return a}BE.exports=IJ +});var KE=c(function(SN,IE){ +var KJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),GE=AE(),VJ=CE();KJ(GE,"ndarray",VJ);IE.exports=GE +});var DE=c(function(ZN,zE){ +var zJ=require("path").join,DJ=require('@stdlib/utils/try-require/dist'),HJ=require('@stdlib/assert/is-error/dist'),JJ=KE(),Pn,VE=DJ(zJ(__dirname,"./native.js"));HJ(VE)?Pn=JJ:Pn=VE;zE.exports=Pn +});var QE=c(function(PN,JE){ +var ur=require('@stdlib/number/float64/base/to-float32/dist'),HE=require('@stdlib/math/base/special/abs/dist');function QJ(n,e,a){var i,r,u,v,s,o;if(n<=0)return 0;if(n===1||a===0)return e[0];for(a<0?r=(1-n)*a:r=0,i=0,s=0,o=0;o=HE(u)?s=ur(s+ur(ur(i-v)+u)):s=ur(s+ur(ur(u-v)+i)),i=v,r+=a;return ur(i+s)}JE.exports=QJ +});var $E=c(function(AN,WE){ +var ir=require('@stdlib/number/float64/base/to-float32/dist'),UE=require('@stdlib/math/base/special/abs/dist');function UJ(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return e[i];for(u=i,r=0,o=0,t=0;t=UE(v)?o=ir(o+ir(ir(r-s)+v)):o=ir(o+ir(ir(v-s)+r)),r=s,u+=a;return ir(r+o)}WE.exports=UJ +});var XE=c(function(LN,YE){ +var WJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),hE=QE(),$J=$E();WJ(hE,"ndarray",$J);YE.exports=hE +});var Xe=c(function(BN,xE){ +var hJ=require("path").join,YJ=require('@stdlib/utils/try-require/dist'),XJ=require('@stdlib/assert/is-error/dist'),dJ=XE(),An,dE=YJ(hJ(__dirname,"./native.js"));XJ(dE)?An=dJ:An=dE;xE.exports=An +});var r6=c(function(CN,NE){ +var xJ=Xe();function NJ(n,e,a){return xJ(n,e,a)}NE.exports=NJ +});var a6=c(function(GN,e6){ +var rQ=Xe().ndarray;function eQ(n,e,a,i){return rQ(n,e,a,i)}e6.exports=eQ +});var n6=c(function(IN,i6){ +var aQ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),u6=r6(),uQ=a6();aQ(u6,"ndarray",uQ);i6.exports=u6 +});var t6=c(function(KN,s6){ +var iQ=require("path").join,nQ=require('@stdlib/utils/try-require/dist'),vQ=require('@stdlib/assert/is-error/dist'),sQ=n6(),Ln,v6=nQ(iQ(__dirname,"./native.js"));vQ(v6)?Ln=sQ:Ln=v6;s6.exports=Ln +});var f6=c(function(VN,o6){ +var Q=require('@stdlib/number/float64/base/to-float32/dist'),de=require('@stdlib/math/base/special/abs/dist');function tQ(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=de(o)?f=Q(Q(i-t)+o):f=Q(Q(o-t)+i),i=t,t=Q(v+f),de(v)>=de(f)?s=Q(Q(v-t)+f):s=Q(Q(f-t)+v),v=t,r=Q(r+s),u+=a;return Q(i+Q(v+r))}o6.exports=tQ +});var c6=c(function(zN,q6){ +var U=require('@stdlib/number/float64/base/to-float32/dist'),xe=require('@stdlib/math/base/special/abs/dist');function oQ(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||a===0)return e[i];for(v=i,r=0,u=0,s=0,m=0;m=xe(t)?q=U(U(r-f)+t):q=U(U(t-f)+r),r=f,f=U(s+q),xe(s)>=xe(q)?o=U(U(s-f)+q):o=U(U(q-f)+s),s=f,u=U(u+o),v+=a;return U(r+U(s+u))}q6.exports=oQ +});var p6=c(function(DN,l6){ +var fQ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),m6=f6(),qQ=c6();fQ(m6,"ndarray",qQ);l6.exports=m6 +});var b6=c(function(HN,g6){ +var cQ=require("path").join,mQ=require('@stdlib/utils/try-require/dist'),lQ=require('@stdlib/assert/is-error/dist'),pQ=p6(),Bn,j6=mQ(cQ(__dirname,"./native.js"));lQ(j6)?Bn=pQ:Bn=j6;g6.exports=Bn +});var y6=c(function(JN,w6){ +var jQ=require('@stdlib/number/float64/base/to-float32/dist');function gQ(n,e,a){var i,r,u;if(i=0,n<=0)return i;if(n===1||a===0)return e[0];for(a<0?r=(1-n)*a:r=0,u=0;u\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 \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 \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 \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", "/**\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 Float32Array = require( '@stdlib/array/float32' );\n\n\n// MAIN //\n\n/**\n* Interchanges two complex single-precision floating-point vectors.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Complex64Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Complex64Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {Complex64Array} `y`\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* cswap( x.length, x, 1, y, 1 );\n*\n* var z = y.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*\n* z = x.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 7.0\n*\n* im = imagf( z );\n* // returns 8.0\n*/\nfunction cswap( N, x, strideX, y, strideY ) {\n\tvar viewX;\n\tvar viewY;\n\tvar tmp;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\tvar j;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tviewX = new Float32Array( x.buffer, x.byteOffset, x.length*2 );\n\tviewY = new Float32Array( y.buffer, y.byteOffset, y.length*2 );\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tfor ( i = 0; i < N*2; i += 2 ) {\n\t\t\ttmp = viewX[ i ];\n\t\t\tviewX[ i ] = viewY[ i ];\n\t\t\tviewY[ i ] = tmp;\n\n\t\t\tj = i + 1;\n\t\t\ttmp = viewX[ j ];\n\t\t\tviewX[ j ] = viewY[ j ];\n\t\t\tviewY[ j ] = tmp;\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\ttmp = viewX[ ix ];\n\t\tviewX[ ix ] = viewY[ iy ];\n\t\tviewY[ iy ] = tmp;\n\n\t\ttmp = viewX[ ix+1 ];\n\t\tviewX[ ix+1 ] = viewY[ iy+1 ];\n\t\tviewY[ iy+1 ] = tmp;\n\n\t\tix += sx;\n\t\tiy += sy;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = cswap;\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 Float32Array = require( '@stdlib/array/float32' );\n\n\n// MAIN //\n\n/**\n* Interchanges two complex single-precision floating-point vectors.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Complex64Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Complex64Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Complex64Array} `y`\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* cswap( x.length, x, 1, 0, y, 1, 0 );\n*\n* var z = y.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*\n* z = x.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 7.0\n*\n* im = imagf( z );\n* // returns 8.0\n*/\nfunction cswap( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar viewX;\n\tvar viewY;\n\tvar tmp;\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 = new Float32Array( x.buffer, x.byteOffset, x.length*2 );\n\tviewY = new Float32Array( y.buffer, y.byteOffset, y.length*2 );\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\ttmp = viewX[ ix ];\n\t\tviewX[ ix ] = viewY[ iy ];\n\t\tviewY[ iy ] = tmp;\n\n\t\ttmp = viewX[ ix+1 ];\n\t\tviewX[ ix+1 ] = viewY[ iy+1 ];\n\t\tviewY[ iy+1 ] = tmp;\n\n\t\tix += sx;\n\t\tiy += sy;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = cswap;\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 cswap = require( './cswap.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( cswap, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = cswap;\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 interchange two complex single-precision floating-point vectors.\n*\n* @module @stdlib/blas/base/cswap\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 cswap = require( '@stdlib/blas/base/cswap' );\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* cswap( x.length, x, 1, y, 1 );\n*\n* var z = y.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*\n* z = x.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 7.0\n*\n* im = imagf( z );\n* // returns 8.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 cswap = require( '@stdlib/blas/base/cswap' );\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* cswap.ndarray( x.length, x, 1, 0, y, 1, 0 );\n*\n* var z = y.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*\n* z = x.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 7.0\n*\n* im = imagf( z );\n* // returns 8.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 cswap;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tcswap = main;\n} else {\n\tcswap = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = cswap;\n\n// exports: { \"ndarray\": \"cswap.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {PositiveInteger} stride - `x` stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = dasum( x.length, x, 1 );\n* // returns 15.0\n*/\nfunction dasum( N, x, stride ) {\n\tvar sum;\n\tvar m;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn sum;\n\t}\n\t// Use unrolled loops if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tsum += abs( x[i] );\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn sum;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tsum += abs(x[i]) + abs(x[i+1]) + abs(x[i+2]) + abs(x[i+3]) + abs(x[i+4]) + abs(x[i+5]); // eslint-disable-line max-len\n\t\t}\n\t\treturn sum;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tsum += abs( x[i] );\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - `x` stride length\n* @param {NonNegativeInteger} offset - starting `x` index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = dasum( x.length, x, 1, 0 );\n* // returns 15.0\n*/\nfunction dasum( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tix = offset;\n\n\t// Use unrolled loops if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tsum += abs( x[ix] );\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn sum;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tsum += abs( x[ix] ) + abs( x[ix+1] ) + abs( x[ix+2] ) + abs( x[ix+3] ) + abs( x[ix+4] ) + abs( x[ix+5] ); // eslint-disable-line max-len\n\t\t\tix += M;\n\t\t}\n\t\treturn sum;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += abs( x[ix] );\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 dasum = require( './dasum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dasum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 compute the sum of absolute values.\n*\n* @module @stdlib/blas/base/dasum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dasum = require( '@stdlib/blas/base/dasum' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = dasum( x.length, x, 1 );\n* // returns 15.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dasum = require( '@stdlib/blas/base/dasum' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = dasum.ndarray( x.length, x, 1, 0 );\n* // returns 15.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 dasum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdasum = main;\n} else {\n\tdasum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dasum;\n\n// exports: { \"ndarray\": \"dasum.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// VARIABLES //\n\nvar M = 4;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a constant and adds the result to `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* daxpy( x.length, alpha, x, 1, y, 1 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\nfunction daxpy( N, alpha, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] += alpha * x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] += alpha * x[ i ];\n\t\t\ty[ i+1 ] += alpha * x[ i+1 ];\n\t\t\ty[ i+2 ] += alpha * x[ i+2 ];\n\t\t\ty[ i+3 ] += alpha * x[ i+3 ];\n\t\t}\n\t\treturn y;\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\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] += alpha * x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = daxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// VARIABLES //\n\nvar M = 4;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a constant and adds the result to `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* daxpy( x.length, alpha, x, 1, 0, y, 1, 0 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\nfunction daxpy( N, alpha, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] += alpha * x[ ix ];\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] += alpha * x[ ix ];\n\t\t\ty[ iy+1 ] += alpha * x[ ix+1 ];\n\t\t\ty[ iy+2 ] += alpha * x[ ix+2 ];\n\t\t\ty[ iy+3 ] += alpha * x[ ix+3 ];\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] += alpha * x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = daxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 daxpy = require( './daxpy.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( daxpy, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = daxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 multiply a vector `x` and a constant and add the result to `y`.\n*\n* @module @stdlib/blas/base/daxpy\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var daxpy = require( '@stdlib/blas/base/daxpy' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* daxpy( x.length, alpha, x, 1, y, 1 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var daxpy = require( '@stdlib/blas/base/daxpy' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* daxpy.ndarray( x.length, alpha, x, 1, 0, y, 1, 0 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.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 daxpy;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdaxpy = main;\n} else {\n\tdaxpy = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = daxpy;\n\n// exports: { \"ndarray\": \"daxpy.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dcopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction dcopy( N, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] = x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] = x[ i ];\n\t\t\ty[ i+1 ] = x[ i+1 ];\n\t\t\ty[ i+2 ] = x[ i+2 ];\n\t\t\ty[ i+3 ] = x[ i+3 ];\n\t\t\ty[ i+4 ] = x[ i+4 ];\n\t\t\ty[ i+5 ] = x[ i+5 ];\n\t\t\ty[ i+6 ] = x[ i+6 ];\n\t\t\ty[ i+7 ] = x[ i+7 ];\n\t\t}\n\t\treturn y;\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\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} 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 - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dcopy( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction dcopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] = x[ ix ];\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] = x[ ix ];\n\t\t\ty[ iy+1 ] = x[ ix+1 ];\n\t\t\ty[ iy+2 ] = x[ ix+2 ];\n\t\t\ty[ iy+3 ] = x[ ix+3 ];\n\t\t\ty[ iy+4 ] = x[ ix+4 ];\n\t\t\ty[ iy+5 ] = x[ ix+5 ];\n\t\t\ty[ iy+6 ] = x[ ix+6 ];\n\t\t\ty[ iy+7 ] = x[ ix+7 ];\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 dcopy = require( './dcopy.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dcopy, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dcopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 `x` into `y`.\n*\n* @module @stdlib/blas/base/dcopy\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dcopy = require( '@stdlib/blas/base/dcopy' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dcopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dcopy = require( '@stdlib/blas/base/dcopy' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dcopy.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.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 dcopy;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdcopy = main;\n} else {\n\tdcopy = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcopy;\n\n// exports: { \"ndarray\": \"dcopy.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {number} dot product of `x` and `y`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = ddot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*/\nfunction ddot( N, x, strideX, y, strideY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += x[ i ] * y[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn dot;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[ i ] * y[ i ] ) + ( x[ i+1 ] * y[ i+1 ] ) + ( x[ i+2 ] * y[ i+2 ] ) + ( x[ i+3 ] * y[ i+3 ] ) + ( x[ i+4 ] * y[ i+4 ] ); // eslint-disable-line max-len\n\t\t}\n\t\treturn dot;\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\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += ( x[ ix ] * y[ iy ] );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ddot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y`.\n*\n* @param {integer} N - number of indexed elements\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {number} dot product of `x` and `y`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = ddot( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.0\n*/\nfunction ddot( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += ( x[ ix ] * y[ iy ] );\n\t\t\t\tix += 1;\n\t\t\t\tiy += 1;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn dot;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[ ix ] * y[ iy ] ) + ( x[ ix+1 ] * y[ iy+1 ] ) + ( x[ ix+2 ] * y[ iy+2 ] ) + ( x[ ix+3 ] * y[ iy+3 ] ) + ( x[ ix+4 ] * y[ iy+4 ] ); // eslint-disable-line max-len\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn dot;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += x[ ix ] * y[ iy ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ddot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 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 ddot = require( './ddot.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ddot, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ddot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 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 compute the dot product of two double-precision floating-point vectors.\n*\n* @module @stdlib/blas/base/ddot\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var ddot = require( '@stdlib/blas/base/ddot' );\n*\n* var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = ddot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var ddot = require( '@stdlib/blas/base/ddot' );\n*\n* var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = ddot.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.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 ddot;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tddot = main;\n} else {\n\tddot = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ddot;\n\n// exports: { \"ndarray\": \"ddot.ndarray\" }\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 sqrt = require( '@stdlib/math/base/special/sqrt' );\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar pow = require( '@stdlib/math/base/special/pow' );\n\n\n// MAIN //\n\n/**\n* Computes the L2-norm of a double-precision floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {PositiveInteger} stride - stride length\n* @returns {number} L2-norm of `x`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = 3;\n*\n* var z = dnrm2( N, x, 1 );\n* // returns 3.0\n*/\nfunction dnrm2( N, x, stride ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar i;\n\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn abs( x[ 0 ] );\n\t}\n\tscale = 0.0;\n\tssq = 1.0;\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tif ( x[ i ] !== 0.0 ) {\n\t\t\tax = abs( x[ i ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tssq = 1.0 + ( ssq * pow( scale/ax, 2 ) );\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tssq += pow( ax/scale, 2 );\n\t\t\t}\n\t\t}\n\t}\n\treturn scale * sqrt( ssq );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnrm2;\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 sqrt = require( '@stdlib/math/base/special/sqrt' );\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar pow = require( '@stdlib/math/base/special/pow' );\n\n\n// MAIN //\n\n/**\n* Computes the L2-norm of a double-precision floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} L2-norm of `x`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var z = dnrm2( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dnrm2( N, x, stride, offset ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar ix;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn abs( x[ offset ] );\n\t}\n\tix = offset;\n\tscale = 0.0;\n\tssq = 1.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( x[ ix ] !== 0.0 ) {\n\t\t\tax = abs( x[ ix ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tssq = 1.0 + ( ssq * pow( scale/ax, 2 ) );\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tssq += pow( ax/scale, 2 );\n\t\t\t}\n\t\t}\n\t\tix += stride;\n\t}\n\treturn scale * sqrt( ssq );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnrm2;\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 dnrm2 = require( './dnrm2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnrm2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnrm2;\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* Compute the L2-norm of a double-precision floating-point vector.\n*\n* @module @stdlib/blas/base/dnrm2\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnrm2 = require( '@stdlib/blas/base/dnrm2' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = 3;\n*\n* var z = dnrm2( N, x, 1 );\n* // returns 3.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnrm2 = require( '@stdlib/blas/base/dnrm2' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var z = dnrm2.ndarray( N, x, 2, 1 );\n* // returns 5.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 dnrm2;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnrm2 = main;\n} else {\n\tdnrm2 = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnrm2;\n\n// exports: { \"ndarray\": \"dnrm2.ndarray\" }\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {PositiveInteger} stride - index increment\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*/\nfunction dscal( N, alpha, x, stride ) {\n\tvar i;\n\tvar m;\n\n\tif ( N <= 0 || stride <= 0 || alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ i ] *= alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tx[ i ] *= alpha;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dscal;\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );\n* var alpha = 5.0;\n*\n* dscal( 3, alpha, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, -20.0, 25.0, -30.0 ]\n*/\nfunction dscal( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] *= alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ ix ] *= alpha;\n\t\t\tx[ ix+1 ] *= alpha;\n\t\t\tx[ ix+2 ] *= alpha;\n\t\t\tx[ ix+3 ] *= alpha;\n\t\t\tx[ ix+4 ] *= alpha;\n\t\t\tix += M;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] *= alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dscal;\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 dscal = require( './dscal.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dscal, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dscal;\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 multiply a double-precision floating-point vector by a constant.\n*\n* @module @stdlib/blas/base/dscal\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dscal = require( '@stdlib/blas/base/dscal' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dscal = require( '@stdlib/blas/base/dscal' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dscal.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.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 dscal;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdscal = main;\n} else {\n\tdscal = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dscal;\n\n// exports: { \"ndarray\": \"dscal.ndarray\" }\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y` with extended accumulation and result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {number} dot product of `x` and `y`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = dsdot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*/\nfunction dsdot( N, x, strideX, y, strideY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += x[ i ] * y[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn dot;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[i]*y[i] ) + ( x[i+1]*y[i+1] ) + ( x[i+2]*y[i+2] ) + ( x[i+3]*y[i+3] ) + ( x[i+4]*y[i+4] ); // eslint-disable-line max-len\n\t\t}\n\t\treturn dot;\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\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += x[ ix ] * y[ iy ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsdot;\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y` with extended accumulation and result.\n*\n* @param {integer} N - number of indexed elements\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {number} dot product of `x` and `y`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = dsdot( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.0\n*/\nfunction dsdot( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += x[ ix ] * y[ iy ];\n\t\t\t\tix += 1;\n\t\t\t\tiy += 1;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn dot;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[ix]*y[iy] ) + ( x[ix+1]*y[iy+1] ) + ( x[ix+2]*y[iy+2] ) + ( x[ix+3]*y[iy+3] ) + ( x[ix+4]*y[iy+4] ); // eslint-disable-line max-len\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn dot;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += x[ ix ] * y[ iy ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsdot;\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 dsdot = require( './dsdot.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsdot, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsdot;\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 compute the dot product of vectors `x` and `y` with extended accumulation and result.\n*\n* @module @stdlib/blas/base/dsdot\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var dsdot = require( '@stdlib/blas/base/dsdot' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = dsdot( x.length, x, 1, y, 1 );\n* // returns -12.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var dsdot = require( '@stdlib/blas/base/dsdot' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = dsdot.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // returns -12.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 dsdot;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsdot = main;\n} else {\n\tdsdot = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsdot;\n\n// exports: { \"ndarray\": \"dsdot.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Interchanges two double-precision floating-point vectors.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {Float64Array} `y`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dswap( x.length, x, 1, y, 1 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction dswap( N, x, strideX, y, strideY ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tvar j;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ i ];\n\t\t\t\tx[ i ] = y[ i ];\n\t\t\t\ty[ i ] = tmp;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ttmp = x[ i ];\n\t\t\tx[ i ] = y[ i ];\n\t\t\ty[ i ] = tmp;\n\n\t\t\tj = i + 1;\n\t\t\ttmp = x[ j ];\n\t\t\tx[ j ] = y[ j ];\n\t\t\ty[ j ] = tmp;\n\n\t\t\tj += 1;\n\t\t\ttmp = x[ j ];\n\t\t\tx[ j ] = y[ j ];\n\t\t\ty[ j ] = tmp;\n\t\t}\n\t\treturn y;\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\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = y[ iy ];\n\t\ty[ iy ] = tmp;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Interchanges two double-precision floating-point vectors.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Float64Array} `y`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dswap( x.length, x, 1, 0, y, 1, 0 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction dswap( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = y[ iy ];\n\t\t\t\ty[ iy ] = tmp;\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = y[ iy ];\n\t\t\ty[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = y[ iy+1 ];\n\t\t\ty[ iy+1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = y[ iy+2 ];\n\t\t\ty[ iy+2 ] = tmp;\n\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = y[ iy ];\n\t\ty[ iy ] = tmp;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dswap;\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 dswap = require( './dswap.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dswap, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dswap;\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 interchange two double-precision floating-point vectors.\n*\n* @module @stdlib/blas/base/dswap\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dswap = require( '@stdlib/blas/base/dswap' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dswap( x.length, x, 1, y, 1 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dswap = require( '@stdlib/blas/base/dswap' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dswap.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.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 dswap;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdswap = main;\n} else {\n\tdswap = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dswap;\n\n// exports: { \"ndarray\": \"dswap.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {PositiveInteger} stride - `x` stride length\n* @returns {number} sum\n*\n* @example\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = gasum( x.length, x, 1 );\n* // 15.0\n*/\nfunction gasum( N, x, stride ) {\n\tvar sum;\n\tvar m;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn sum;\n\t}\n\t// Use unrolled loops if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tsum += abs( x[i] );\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn sum;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tsum += abs(x[i]) + abs(x[i+1]) + abs(x[i+2]) + abs(x[i+3]) + abs(x[i+4]) + abs(x[i+5]); // eslint-disable-line max-len\n\t\t}\n\t\treturn sum;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tsum += abs( x[i] );\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - `x` stride length\n* @param {NonNegativeInteger} offset - starting `x` index\n* @returns {number} sum\n*\n* @example\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = gasum( x.length, x, 1, 0 );\n* // 15.0\n*/\nfunction gasum( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tix = offset;\n\n\t// Use unrolled loops if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tsum += abs( x[ix] );\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn sum;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tsum += abs( x[ix] ) + abs( x[ix+1] ) + abs( x[ix+2] ) + abs( x[ix+3] ) + abs( x[ix+4] ) + abs( x[ix+5] ); // eslint-disable-line max-len\n\t\t\tix += M;\n\t\t}\n\t\treturn sum;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += abs( x[ix] );\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 compute the sum of absolute values.\n*\n* @module @stdlib/blas/base/gasum\n*\n* @example\n* var gasum = require( '@stdlib/blas/base/gasum' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = gasum( x.length, x, 1 );\n* // 15.0\n*\n* @example\n* // Use the `ndarray` interface...\n* var gasum = require( '@stdlib/blas/base/gasum' ).ndarray;\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = gasum( x.length, x, 1, 0 );\n* // 15.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", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// VARIABLES //\n\nvar M = 4;\n\n\n// MAIN //\n\n/**\n* Multiplies `x` by a constant and adds the result to `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NumericArray} y - destination array\n* @param {integer} strideY - `y` stride length\n* @returns {NumericArray} `y`\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 1.0, 1.0, 1.0, 1.0, 1.0 ];\n* var alpha = 5.0;\n*\n* gaxpy( x.length, alpha, x, 1, y, 1 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\nfunction gaxpy( N, alpha, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] += alpha * x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] += alpha * x[ i ];\n\t\t\ty[ i+1 ] += alpha * x[ i+1 ];\n\t\t\ty[ i+2 ] += alpha * x[ i+2 ];\n\t\t\ty[ i+3 ] += alpha * x[ i+3 ];\n\t\t}\n\t\treturn y;\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\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] += alpha * x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gaxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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// VARIABLES //\n\nvar M = 4;\n\n\n// MAIN //\n\n/**\n* Multiplies `x` by a constant and adds the result to `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {NumericArray} y - destination array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {NumericArray} `y`\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 1.0, 1.0, 1.0, 1.0, 1.0 ];\n* var alpha = 5.0;\n*\n* gaxpy( x.length, alpha, x, 1, 0, y, 1, 0 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\nfunction gaxpy( N, alpha, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] += alpha * x[ ix ];\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] += alpha * x[ ix ];\n\t\t\ty[ iy+1 ] += alpha * x[ ix+1 ];\n\t\t\ty[ iy+2 ] += alpha * x[ ix+2 ];\n\t\t\ty[ iy+3 ] += alpha * x[ ix+3 ];\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] += alpha * x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gaxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 multiply `x` and a constant and add the result to `y`.\n*\n* @module @stdlib/blas/base/gaxpy\n*\n* @example\n* var gaxpy = require( '@stdlib/blas/base/gaxpy' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 1.0, 1.0, 1.0, 1.0, 1.0 ];\n* var alpha = 5.0;\n*\n* gaxpy( x.length, alpha, x, 1, y, 1 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*\n* @example\n* var gaxpy = require( '@stdlib/blas/base/gaxpy' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 1.0, 1.0, 1.0, 1.0, 1.0 ];\n* var alpha = 5.0;\n*\n* gaxpy.ndarray( x.length, alpha, x, 1, 0, y, 1, 0 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.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", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* Copies values from `x` into `y`.\n*\n* @private\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Object} x - input array object\n* @param {Collection} x.data - input array data\n* @param {Array} x.accessors - array element accessors\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Object} y - output array object\n* @param {Collection} y.data - output array data\n* @param {Array} y.accessors - array element accessors\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Object} output array object\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var reinterpret64 = require( '@stdlib/strided/base/reinterpret-complex64' );\n*\n* function setter( data, idx, value ) {\n* data.set( value, idx );\n* }\n*\n* function getter( data, idx ) {\n* return data.get( idx );\n* }\n*\n* var x = {\n* 'data': new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] ),\n* 'accessors': [ getter, setter ]\n* };\n*\n* var y = {\n* 'data': new Complex64Array( [ 5.0, 6.0, 7.0, 8.0 ] ),\n* 'accessors': [ getter, setter ]\n* };\n*\n* gcopy( x.data.length, x, 1, 0, y, 1, 0 );\n*\n* var view = reinterpret64( y.data, 0 );\n* // view => [ 1.0, 2.0, 3.0, 4.0 ]\n*/\nfunction gcopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar set;\n\tvar get;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\t// Cache references to array data:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache a reference to the element accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\tix = offsetX;\n\tiy = offsetY;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tset( ybuf, iy, get( xbuf, ix ) );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Collection} y - destination array\n* @param {integer} strideY - `y` stride length\n* @returns {Collection} `y`\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction gcopy( N, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar ox;\n\tvar oy;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tox = arraylike2object( x );\n\toy = arraylike2object( y );\n\tif ( ox.accessorProtocol || oy.accessorProtocol ) {\n\t\tif ( strideX < 0 ) {\n\t\t\tix = (1-N) * strideX;\n\t\t} else {\n\t\t\tix = 0;\n\t\t}\n\t\tif ( strideY < 0 ) {\n\t\t\tiy = (1-N) * strideY;\n\t\t} else {\n\t\t\tiy = 0;\n\t\t}\n\t\taccessors( N, ox, strideX, ix, oy, strideY, iy );\n\t\treturn oy.data;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] = x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] = x[ i ];\n\t\t\ty[ i+1 ] = x[ i+1 ];\n\t\t\ty[ i+2 ] = x[ i+2 ];\n\t\t\ty[ i+3 ] = x[ i+3 ];\n\t\t\ty[ i+4 ] = x[ i+4 ];\n\t\t\ty[ i+5 ] = x[ i+5 ];\n\t\t\ty[ i+6 ] = x[ i+6 ];\n\t\t\ty[ i+7 ] = x[ i+7 ];\n\t\t}\n\t\treturn y;\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\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Collection} y - destination array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Collection} `y`\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction gcopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar ox;\n\tvar oy;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tox = arraylike2object( x );\n\toy = arraylike2object( y );\n\tif ( ox.accessorProtocol || oy.accessorProtocol ) {\n\t\taccessors( N, ox, strideX, offsetX, oy, strideY, offsetY );\n\t\treturn oy.data;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] = x[ ix ];\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] = x[ ix ];\n\t\t\ty[ iy+1 ] = x[ ix+1 ];\n\t\t\ty[ iy+2 ] = x[ ix+2 ];\n\t\t\ty[ iy+3 ] = x[ ix+3 ];\n\t\t\ty[ iy+4 ] = x[ ix+4 ];\n\t\t\ty[ iy+5 ] = x[ ix+5 ];\n\t\t\ty[ iy+6 ] = x[ ix+6 ];\n\t\t\ty[ iy+7 ] = x[ ix+7 ];\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 `x` into `y`.\n*\n* @module @stdlib/blas/base/gcopy\n*\n* @example\n* var gcopy = require( '@stdlib/blas/base/gcopy' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* var gcopy = require( '@stdlib/blas/base/gcopy' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.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", "/**\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NumericArray} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {number} dot product of `x` and `y`\n*\n* @example\n* var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];\n* var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];\n\n* var z = gdot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*/\nfunction gdot( N, x, strideX, y, strideY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += x[ i ] * y[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn dot;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[i]*y[i] ) + ( x[i+1]*y[i+1] ) + ( x[i+2]*y[i+2] ) + ( x[i+3]*y[i+3] ) + ( x[i+4]*y[i+4] ); // eslint-disable-line max-len\n\t\t}\n\t\treturn dot;\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\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += ( x[ ix ] * y[ iy ] );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gdot;\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y`.\n*\n* @param {integer} N - number of indexed elements\n* @param {NumericArray} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {NumericArray} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {number} dot product of `x` and `y`\n*\n* @example\n* var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];\n* var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];\n\n* var z = gdot( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.0\n*/\nfunction gdot( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += ( x[ ix ] * y[ iy ] );\n\t\t\t\tix += 1;\n\t\t\t\tiy += 1;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn dot;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[ix]*y[iy] ) + ( x[ix+1]*y[iy+1] ) + ( x[ix+2]*y[iy+2] ) + ( x[ix+3]*y[iy+3] ) + ( x[ix+4]*y[iy+4] ); // eslint-disable-line max-len\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn dot;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += x[ ix ] * y[ iy ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gdot;\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 compute the dot product of vectors `x` and `y`.\n*\n* @module @stdlib/blas/base/gdot\n*\n* @example\n* var gdot = require( '@stdlib/blas/base/gdot' );\n*\n* var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];\n* var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];\n*\n* var z = gdot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*\n* @example\n* var gdot = require( '@stdlib/blas/base/gdot' );\n*\n* var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];\n* var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];\n*\n* var z = gdot.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.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", "/**\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 sqrt = require( '@stdlib/math/base/special/sqrt' );\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar pow = require( '@stdlib/math/base/special/pow' );\n\n\n// MAIN //\n\n/**\n* Computes the L2-norm of a vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {PositiveInteger} stride - stride length\n* @returns {number} L2-norm\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n*\n* var z = gnrm2( x.length, x, 1 );\n* // returns 3.0\n*/\nfunction gnrm2( N, x, stride ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar i;\n\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn abs( x[ 0 ] );\n\t}\n\tscale = 0.0;\n\tssq = 1.0;\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tif ( x[ i ] !== 0.0 ) {\n\t\t\tax = abs( x[ i ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tssq = 1.0 + ( ssq * pow( scale/ax, 2 ) );\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tssq += pow( ax/scale, 2 );\n\t\t\t}\n\t\t}\n\t}\n\treturn scale * sqrt( ssq );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnrm2;\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 sqrt = require( '@stdlib/math/base/special/sqrt' );\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar pow = require( '@stdlib/math/base/special/pow' );\n\n\n// MAIN //\n\n/**\n* Computes the L2-norm of a vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} L2-norm\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var z = gnrm2( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction gnrm2( N, x, stride, offset ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar ix;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn abs( x[ offset ] );\n\t}\n\tix = offset;\n\tscale = 0.0;\n\tssq = 1.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( x[ ix ] !== 0.0 ) {\n\t\t\tax = abs( x[ ix ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tssq = 1.0 + ( ssq * pow( scale/ax, 2 ) );\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tssq += pow( ax/scale, 2 );\n\t\t\t}\n\t\t}\n\t\tix += stride;\n\t}\n\treturn scale * sqrt( ssq );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnrm2;\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 gnrm2 = require( './gnrm2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( gnrm2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = gnrm2;\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* Compute the L2-norm of a vector.\n*\n* @module @stdlib/blas/base/gnrm2\n*\n* @example\n* var gnrm2 = require( '@stdlib/blas/base/gnrm2' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n*\n* var z = gnrm2( x.length, x, 1 );\n* // returns 3.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gnrm2 = require( '@stdlib/blas/base/gnrm2' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var z = gnrm2.ndarray( N, x, 2, 1 );\n* // returns 5.0\n*/\n\n// MODULES //\n\nvar gnrm2 = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = gnrm2;\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {PositiveInteger} stride - index increment\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*/\nfunction gscal( N, alpha, x, stride ) {\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || stride <= 0|| alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i += 1 ) {\n\t\t\t\tx[ i ] *= alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tx[ i ] *= alpha;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gscal;\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ];\n*\n* gscal( 3, 5.0, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, -20.0, 25.0, -30.0 ]\n*/\nfunction gscal( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] *= alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] *= alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gscal;\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 multiply `x` by a constant.\n*\n* @module @stdlib/blas/base/gscal\n*\n* @example\n* var gscal = require( '@stdlib/blas/base/gscal' );\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*\n* @example\n* var gscal = require( '@stdlib/blas/base/gscal' );\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gscal.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.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", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* Interchanges vectors `x` and `y`.\n*\n* @private\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Object} x - first input array object\n* @param {Collection} x.data - first input array data\n* @param {Array} x.accessors - array element accessors\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Object} y - second input array object\n* @param {Collection} y.data - second input array array\n* @param {Array} y.accessors - array element accessors\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Object} `y`\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var reinterpret64 = require( '@stdlib/strided/base/reinterpret-complex64' );\n*\n* function setter( data, idx, value ) {\n* data.set( value, idx );\n* }\n*\n* function getter( data, idx ) {\n* return data.get( idx );\n* }\n*\n* var x = {\n* 'data': new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] ),\n* 'accessors': [ getter, setter ]\n* };\n*\n* var y = {\n* 'data': new Complex64Array( [ 5.0, 6.0, 7.0, 8.0 ] ),\n* 'accessors': [ getter, setter ]\n* };\n*\n* gswap( x.data.length, x, 1, 0, y, 1, 0 );\n*\n* var viewX = reinterpret64( x.data, 0 );\n* // viewX => [ 5.0, 6.0, 7.0, 8.0 ]\n*\n* var viewY = reinterpret64( y.data, 0 );\n* // viewY => [ 1.0, 2.0, 3.0, 4.0 ]\n*/\nfunction gswap( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar set;\n\tvar get;\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\t// Cache references to array data:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache a reference to the element accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\tix = offsetX;\n\tiy = offsetY;\n\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = get( xbuf, ix );\n\t\tset( xbuf, ix, get( ybuf, iy ) );\n\t\tset( ybuf, iy, tmp );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gswap;\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 arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Interchanges vectors `x` and `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Collection} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {Collection} `y`\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gswap( x.length, x, 1, y, 1 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction gswap( N, x, strideX, y, strideY ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar ox;\n\tvar oy;\n\tvar m;\n\tvar i;\n\tvar j;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tox = arraylike2object( x );\n\toy = arraylike2object( y );\n\tif ( ox.accessorProtocol || oy.accessorProtocol ) {\n\t\tif ( strideX < 0 ) {\n\t\t\tix = (1-N) * strideX;\n\t\t} else {\n\t\t\tix = 0;\n\t\t}\n\t\tif ( strideY < 0 ) {\n\t\t\tiy = (1-N) * strideY;\n\t\t} else {\n\t\t\tiy = 0;\n\t\t}\n\t\taccessors( N, ox, strideX, ix, oy, strideY, iy );\n\t\treturn oy.data;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ i ];\n\t\t\t\tx[ i ] = y[ i ];\n\t\t\t\ty[ i ] = tmp;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ttmp = x[ i ];\n\t\t\tx[ i ] = y[ i ];\n\t\t\ty[ i ] = tmp;\n\n\t\t\tj = i + 1;\n\t\t\ttmp = x[ j ];\n\t\t\tx[ j ] = y[ j ];\n\t\t\ty[ j ] = tmp;\n\n\t\t\tj += 1;\n\t\t\ttmp = x[ j ];\n\t\t\tx[ j ] = y[ j ];\n\t\t\ty[ j ] = tmp;\n\t\t}\n\t\treturn y;\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\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = y[ iy ];\n\t\ty[ iy ] = tmp;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gswap;\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 arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Interchanges vectors `x` and `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Collection} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Collection} `y`\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gswap( x.length, x, 1, 0, y, 1, 0 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction gswap( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar ox;\n\tvar oy;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tox = arraylike2object( x );\n\toy = arraylike2object( y );\n\tif ( ox.accessorProtocol || oy.accessorProtocol ) {\n\t\taccessors( N, ox, strideX, offsetX, oy, strideY, offsetY );\n\t\treturn oy.data;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = y[ iy ];\n\t\t\t\ty[ iy ] = tmp;\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = y[ iy ];\n\t\t\ty[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = y[ iy+1 ];\n\t\t\ty[ iy+1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = y[ iy+2 ];\n\t\t\ty[ iy+2 ] = tmp;\n\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = y[ iy ];\n\t\ty[ iy ] = tmp;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gswap;\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 interchange vectors `x` and `y`.\n*\n* @module @stdlib/blas/base/gswap\n*\n* @example\n* var gswap = require( '@stdlib/blas/base/gswap' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gswap( x.length, x, 1, y, 1 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* var gswap = require( '@stdlib/blas/base/gswap' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gswap.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.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", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 abs = require( '@stdlib/math/base/special/abs' );\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {PositiveInteger} stride - `x` stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = sasum( x.length, x, 1 );\n* // returns 15.0\n*/\nfunction sasum( N, x, stride ) {\n\tvar sum;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn sum;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tsum = float64ToFloat32( sum + abs( x[i] ) );\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 abs = require( '@stdlib/math/base/special/abs' );\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - `x` stride length\n* @param {NonNegativeInteger} offset - starting `x` index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = sasum( x.length, x, 1, 0 );\n* // returns 15.0\n*/\nfunction sasum( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tix = offset;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum = float64ToFloat32( sum + abs( x[ix] ) );\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 sasum = require( './sasum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sasum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 compute the sum of absolute values.\n*\n* @module @stdlib/blas/base/sasum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sasum = require( '@stdlib/blas/base/sasum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = sasum( x.length, x, 1 );\n* // returns 15.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sasum = require( '@stdlib/blas/base/sasum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = sasum.ndarray( x.length, x, 1, 0 );\n* // returns 15.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 sasum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsasum = main;\n} else {\n\tsasum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sasum;\n\n// exports: { \"ndarray\": \"sasum.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// VARIABLES //\n\nvar M = 4;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a constant and adds the result to `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* saxpy( x.length, alpha, x, 1, y, 1 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\nfunction saxpy( N, alpha, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] += float64ToFloat32( alpha * x[ i ] );\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] += float64ToFloat32( alpha * x[ i ] );\n\t\t\ty[ i+1 ] += float64ToFloat32( alpha * x[ i+1 ] );\n\t\t\ty[ i+2 ] += float64ToFloat32( alpha * x[ i+2 ] );\n\t\t\ty[ i+3 ] += float64ToFloat32( alpha * x[ i+3 ] );\n\t\t}\n\t\treturn y;\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\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] += float64ToFloat32( alpha * x[ ix ] );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = saxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// VARIABLES //\n\nvar M = 4;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a constant and adds the result to `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* saxpy( x.length, alpha, x, 1, 0, y, 1, 0 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\nfunction saxpy( N, alpha, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] += float64ToFloat32( alpha * x[ ix ] );\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] += float64ToFloat32( alpha * x[ ix ] );\n\t\t\ty[ iy+1 ] += float64ToFloat32( alpha * x[ ix+1 ] );\n\t\t\ty[ iy+2 ] += float64ToFloat32( alpha * x[ ix+2 ] );\n\t\t\ty[ iy+3 ] += float64ToFloat32( alpha * x[ ix+3 ] );\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] += float64ToFloat32( alpha * x[ ix ] );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = saxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 saxpy = require( './saxpy.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( saxpy, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = saxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 multiply a vector `x` and a constant and add the result to `y`.\n*\n* @module @stdlib/blas/base/saxpy\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var saxpy = require( '@stdlib/blas/base/saxpy' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* saxpy( x.length, alpha, x, 1, y, 1 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var saxpy = require( '@stdlib/blas/base/saxpy' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* saxpy.ndarray( x.length, alpha, x, 1, 0, y, 1, 0 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.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 saxpy;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsaxpy = main;\n} else {\n\tsaxpy = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = saxpy;\n\n// exports: { \"ndarray\": \"saxpy.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* scopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction scopy( N, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] = x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] = x[ i ];\n\t\t\ty[ i+1 ] = x[ i+1 ];\n\t\t\ty[ i+2 ] = x[ i+2 ];\n\t\t\ty[ i+3 ] = x[ i+3 ];\n\t\t\ty[ i+4 ] = x[ i+4 ];\n\t\t\ty[ i+5 ] = x[ i+5 ];\n\t\t\ty[ i+6 ] = x[ i+6 ];\n\t\t\ty[ i+7 ] = x[ i+7 ];\n\t\t}\n\t\treturn y;\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\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* scopy( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction scopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] = x[ ix ];\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] = x[ ix ];\n\t\t\ty[ iy+1 ] = x[ ix+1 ];\n\t\t\ty[ iy+2 ] = x[ ix+2 ];\n\t\t\ty[ iy+3 ] = x[ ix+3 ];\n\t\t\ty[ iy+4 ] = x[ ix+4 ];\n\t\t\ty[ iy+5 ] = x[ ix+5 ];\n\t\t\ty[ iy+6 ] = x[ ix+6 ];\n\t\t\ty[ iy+7 ] = x[ ix+7 ];\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 scopy = require( './scopy.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( scopy, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = scopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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 `x` into `y`.\n*\n* @module @stdlib/blas/base/scopy\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var scopy = require( '@stdlib/blas/base/scopy' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* scopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var scopy = require( '@stdlib/blas/base/scopy' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* scopy.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.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 scopy;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tscopy = main;\n} else {\n\tscopy = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scopy;\n\n// exports: { \"ndarray\": \"scopy.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {number} dot product\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*/\nfunction sdot( N, x, strideX, y, strideY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\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\tfor ( i = 0; i < N; i++ ) {\n\t\tdot = float64ToFloat32( dot + float64ToFloat32( x[ ix ] * y[ iy ] ) );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y`.\n*\n* @param {integer} N - number of indexed elements\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {number} dot product\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdot( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.0\n*/\nfunction sdot( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot = float64ToFloat32( dot + float64ToFloat32( x[ ix ] * y[ iy ] ) );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 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 sdot = require( './sdot.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sdot, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 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 compute the dot product of two single-precision floating-point vectors.\n*\n* @module @stdlib/blas/base/sdot\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdot = require( '@stdlib/blas/base/sdot' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdot = require( '@stdlib/blas/base/sdot' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdot.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.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 sdot;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsdot = main;\n} else {\n\tsdot = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdot;\n\n// exports: { \"ndarray\": \"sdot.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of two single-precision floating-point vectors with extended accumulation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} scalar - scalar constant to add to dot product\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {number} dot product\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdsdot( x.length, 0.0, x, 1, y, 1 );\n* // returns -5.0\n*/\nfunction sdsdot( N, scalar, x, strideX, y, strideY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = scalar;\n\tif ( N <= 0 ) {\n\t\treturn float64ToFloat32( dot );\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += x[ i ] * y[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn float64ToFloat32( dot );\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[i]*y[i] ) + ( x[i+1]*y[i+1] ) + ( x[i+2]*y[i+2] ) + ( x[i+3]*y[i+3] ) + ( x[i+4]*y[i+4] ); // eslint-disable-line max-len\n\t\t}\n\t\treturn float64ToFloat32( dot );\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\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += x[ ix ] * y[ iy ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn float64ToFloat32( dot );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of two single-precision floating-point vectors with extended accumulation.\n*\n* @param {integer} N - number of indexed elements\n* @param {number} scalar - scalar constant to add to dot product\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {number} dot product\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdsdot( x.length, 0.0, x, 1, 0, y, 1, 0 );\n* // returns -5.0\n*/\nfunction sdsdot( N, scalar, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = scalar;\n\tif ( N <= 0 ) {\n\t\treturn float64ToFloat32( dot );\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += x[ ix ] * y[ iy ];\n\t\t\t\tix += 1;\n\t\t\t\tiy += 1;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn float64ToFloat32( dot );\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[ix]*y[iy] ) + ( x[ix+1]*y[iy+1] ) + ( x[ix+2]*y[iy+2] ) + ( x[ix+3]*y[iy+3] ) + ( x[ix+4]*y[iy+4] ); // eslint-disable-line max-len\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn float64ToFloat32( dot );\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += x[ ix ] * y[ iy ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn float64ToFloat32( dot );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsdot;\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 sdsdot = require( './sdsdot.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sdsdot, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sdsdot;\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 compute the dot product of two single-precision floating-point vectors with extended accumulation.\n*\n* @module @stdlib/blas/base/sdsdot\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdsdot = require( '@stdlib/blas/base/sdsdot' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdsdot( x.length, 0.0, x, 1, y, 1 );\n* // returns -12.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdsdot = require( '@stdlib/blas/base/sdsdot' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdsdot.ndarray( x.length, 0.0, x, 1, 0, y, 1, 0 );\n* // returns -12.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 sdsdot;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsdsdot = main;\n} else {\n\tsdsdot = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsdot;\n\n// exports: { \"ndarray\": \"sdsdot.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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 sqrt = require( '@stdlib/math/base/special/sqrt' );\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar pow = require( '@stdlib/math/base/special/pow' );\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the L2-norm of a single-precision floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {PositiveInteger} stride - stride length\n* @returns {number} L2-norm\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = 3;\n*\n* var z = snrm2( N, x, 1 );\n* // returns 3.0\n*/\nfunction snrm2( N, x, stride ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar i;\n\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn abs( x[ 0 ] );\n\t}\n\tscale = 0.0;\n\tssq = 1.0;\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tif ( x[ i ] !== 0.0 ) {\n\t\t\tax = abs( x[ i ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tssq = float64ToFloat32( 1.0 + ( ssq * pow( scale/ax, 2 ) ) );\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tssq = float64ToFloat32( ssq + pow( ax/scale, 2 ) );\n\t\t\t}\n\t\t}\n\t}\n\treturn float64ToFloat32( scale * sqrt( ssq ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = snrm2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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 sqrt = require( '@stdlib/math/base/special/sqrt' );\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar pow = require( '@stdlib/math/base/special/pow' );\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the L2-norm of a single-precision floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} L2-norm\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n*\n* var z = snrm2( 4, x, 2, 1 );\n* // returns 5.0\n*/\nfunction snrm2( N, x, stride, offset ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar ix;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn abs( x[ offset ] );\n\t}\n\tix = offset;\n\tscale = 0.0;\n\tssq = 1.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( x[ ix ] !== 0.0 ) {\n\t\t\tax = abs( x[ ix ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tssq = float64ToFloat32( 1.0 + ( ssq * pow( scale/ax, 2 ) ) );\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tssq = float64ToFloat32( ssq + pow( ax/scale, 2 ) );\n\t\t\t}\n\t\t}\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( scale * sqrt( ssq ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = snrm2;\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 snrm2 = require( './snrm2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( snrm2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = snrm2;\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* Compute the L2-norm of a single-precision floating-point vector.\n*\n* @module @stdlib/blas/base/snrm2\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var snrm2 = require( '@stdlib/blas/base/snrm2' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = 3;\n*\n* var z = snrm2( N, x, 1 );\n* // returns 3.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var snrm2 = require( '@stdlib/blas/base/snrm2' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var z = snrm2.ndarray( N, x, 2, 1 );\n* // returns 5.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 snrm2;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsnrm2 = main;\n} else {\n\tsnrm2 = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = snrm2;\n\n// exports: { \"ndarray\": \"snrm2.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar absf = require( '@stdlib/math/base/special/absf' );\nvar sqrtf = require( '@stdlib/math/base/special/sqrtf' );\nvar abs2f = require( '@stdlib/math/base/special/abs2f' );\nvar copysignf = require( '@stdlib/math/base/special/copysignf' );\n\n\n// MAIN //\n\n/**\n* Constructs a Givens plane rotation.\n*\n* @param {number} a - rotational elimination parameter\n* @param {number} b - rotational elimination parameter\n* @param {Float32Array} out - output array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var out = srotg( 0.0, 2.0, new Float32Array( 4 ), 1, 0 );\n* // returns [ 2.0, 1.0, 0.0, 1.0 ]\n*/\nfunction srotg( a, b, out, stride, offset ) {\n\tvar scale;\n\tvar sign;\n\tvar aa;\n\tvar ab;\n\tvar r;\n\tvar c;\n\tvar s;\n\tvar z;\n\n\taa = absf( a );\n\tab = absf( b );\n\tif ( aa > ab ) {\n\t\tsign = copysignf( 1.0, a );\n\t} else {\n\t\tsign = copysignf( 1.0, b );\n\t}\n\tscale = float64ToFloat32( aa + ab );\n\tif ( scale === 0.0 ) {\n\t\tc = 1.0;\n\t\ts = 0.0;\n\t\tr = 0.0;\n\t\tz = 0.0;\n\t} else {\n\t\tr = float64ToFloat32( scale * sqrtf( float64ToFloat32( abs2f( float64ToFloat32( a/scale ) ) + abs2f( float64ToFloat32( b/scale ) ) ) ) ); // eslint-disable-line max-len\n\t\tr = float64ToFloat32( r * sign );\n\t\tc = float64ToFloat32( a / r );\n\t\ts = float64ToFloat32( b / r );\n\t\tz = 1.0;\n\t\tif ( aa > ab ) {\n\t\t\tz = s;\n\t\t} else if ( c !== 0.0 ) {\n\t\t\tz = float64ToFloat32( 1.0 / c );\n\t\t}\n\t}\n\ta = r;\n\tb = z;\n\tout[ offset ] = a;\n\tout[ offset + stride ] = b;\n\tout[ offset + ( 2 * stride ) ] = c;\n\tout[ offset + ( 3 * stride ) ] = s;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = srotg;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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 Float32Array = require( '@stdlib/array/float32' );\nvar fcn = require( './assign.js' );\n\n\n// MAIN //\n\n/**\n* Constructs a Givens plane rotation.\n*\n* @param {number} a - rotational elimination parameter\n* @param {number} b - rotational elimination parameter\n* @returns {Float32Array} output array\n*\n* @example\n* var out = srotg( 0.0, 2.0 );\n* // returns [ 2.0, 1.0, 0.0, 1.0 ]\n*/\nfunction srotg( a, b ) {\n\tvar out = new Float32Array( 4 );\n\treturn fcn( a, b, out, 1, 0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = srotg;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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* Construct a Givens plane rotation.\n*\n* @module @stdlib/blas/base/srotg\n*\n* @example\n* var srotg = require( '@stdlib/blas/base/srotg' );\n*\n* var out = srotg( 0.0, 2.0 );\n* // returns [ 2.0, 1.0, 0.0, 1.0 ]\n*\n* out = srotg( 6.0, -8.0 );\n* // returns [ 10.0, ~-1.666, -0.6, 0.8 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var srotg = require( '@stdlib/blas/base/srotg' );\n*\n* var out = new Float32Array( 4 );\n*\n* var y = srotg.assign( 0.0, 2.0, out, 1, 0 );\n* // returns [ 2.0, 1.0, 0.0, 1.0 ]\n*\n* var bool = ( y === out );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n\n// exports: { \"assign\": \"main.assign\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float32Array} x - input array\n* @param {PositiveInteger} stride - index increment\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* sscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*/\nfunction sscal( N, alpha, x, stride ) {\n\tvar i;\n\tvar m;\n\n\tif ( N <= 0 || stride <= 0|| alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ i ] *= alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tx[ i ] *= alpha;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sscal;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );\n* var alpha = 5.0;\n*\n* sscal( 3, alpha, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, -20.0, 25.0, -30.0 ]\n*/\nfunction sscal( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar i;\n\tvar m;\n\n\tif ( N <= 0 || alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] *= alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t\tix += M;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] *= alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sscal;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 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 sscal = require( './sscal.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sscal, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sscal;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 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 multiply a single-precision floating-point vector by a constant.\n*\n* @module @stdlib/blas/base/sscal\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sscal = require( '@stdlib/blas/base/sscal' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* sscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sscal = require( '@stdlib/blas/base/sscal' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* sscal.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.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 sscal;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsscal = main;\n} else {\n\tsscal = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sscal;\n\n// exports: { \"ndarray\": \"sscal.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Interchanges two single-precision floating-point vectors.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {Float32Array} `y`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* sswap( x.length, x, 1, y, 1 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction sswap( N, x, strideX, y, strideY ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tvar j;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ i ];\n\t\t\t\tx[ i ] = y[ i ];\n\t\t\t\ty[ i ] = tmp;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ttmp = x[ i ];\n\t\t\tx[ i ] = y[ i ];\n\t\t\ty[ i ] = tmp;\n\n\t\t\tj = i + 1;\n\t\t\ttmp = x[ j ];\n\t\t\tx[ j ] = y[ j ];\n\t\t\ty[ j ] = tmp;\n\n\t\t\tj += 1;\n\t\t\ttmp = x[ j ];\n\t\t\tx[ j ] = y[ j ];\n\t\t\ty[ j ] = tmp;\n\t\t}\n\t\treturn y;\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\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = y[ iy ];\n\t\ty[ iy ] = tmp;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sswap;\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// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Interchanges two single-precision floating-point vectors.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Float32Array} `y`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* sswap( x.length, x, 1, 0, y, 1, 0 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction sswap( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = y[ iy ];\n\t\t\t\ty[ iy ] = tmp;\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = y[ iy ];\n\t\t\ty[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = y[ iy+1 ];\n\t\t\ty[ iy+1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = y[ iy+2 ];\n\t\t\ty[ iy+2 ] = tmp;\n\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = y[ iy ];\n\t\ty[ iy ] = tmp;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sswap;\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 sswap = require( './sswap.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sswap, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sswap;\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 interchange two single-precision floating-point vectors.\n*\n* @module @stdlib/blas/base/sswap\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sswap = require( '@stdlib/blas/base/sswap' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* sswap( x.length, x, 1, y, 1 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sswap = require( '@stdlib/blas/base/sswap' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* sswap.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.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 sswap;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsswap = main;\n} else {\n\tsswap = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sswap;\n\n// exports: { \"ndarray\": \"sswap.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace blas\n*/\nvar blas = {};\n\n/**\n* @name ccopy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/ccopy}\n*/\nsetReadOnly( blas, 'ccopy', require( './../../base/ccopy' ) );\n\n/**\n* @name cswap\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/cswap}\n*/\nsetReadOnly( blas, 'cswap', require( './../../base/cswap' ) );\n\n/**\n* @name dasum\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/dasum}\n*/\nsetReadOnly( blas, 'dasum', require( './../../base/dasum' ) );\n\n/**\n* @name daxpy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/daxpy}\n*/\nsetReadOnly( blas, 'daxpy', require( './../../base/daxpy' ) );\n\n/**\n* @name dcopy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/dcopy}\n*/\nsetReadOnly( blas, 'dcopy', require( './../../base/dcopy' ) );\n\n/**\n* @name ddot\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/ddot}\n*/\nsetReadOnly( blas, 'ddot', require( './../../base/ddot' ) );\n\n/**\n* @name dnrm2\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/dnrm2}\n*/\nsetReadOnly( blas, 'dnrm2', require( './../../base/dnrm2' ) );\n\n/**\n* @name dscal\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/dscal}\n*/\nsetReadOnly( blas, 'dscal', require( './../../base/dscal' ) );\n\n/**\n* @name dsdot\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/dsdot}\n*/\nsetReadOnly( blas, 'dsdot', require( './../../base/dsdot' ) );\n\n/**\n* @name dswap\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/dswap}\n*/\nsetReadOnly( blas, 'dswap', require( './../../base/dswap' ) );\n\n/**\n* @name gasum\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gasum}\n*/\nsetReadOnly( blas, 'gasum', require( './../../base/gasum' ) );\n\n/**\n* @name gaxpy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gaxpy}\n*/\nsetReadOnly( blas, 'gaxpy', require( './../../base/gaxpy' ) );\n\n/**\n* @name gcopy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gcopy}\n*/\nsetReadOnly( blas, 'gcopy', require( './../../base/gcopy' ) );\n\n/**\n* @name gdot\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gdot}\n*/\nsetReadOnly( blas, 'gdot', require( './../../base/gdot' ) );\n\n/**\n* @name gnrm2\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gnrm2}\n*/\nsetReadOnly( blas, 'gnrm2', require( './../../base/gnrm2' ) );\n\n/**\n* @name gscal\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gscal}\n*/\nsetReadOnly( blas, 'gscal', require( './../../base/gscal' ) );\n\n/**\n* @name gswap\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gswap}\n*/\nsetReadOnly( blas, 'gswap', require( './../../base/gswap' ) );\n\n/**\n* @name sasum\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/sasum}\n*/\nsetReadOnly( blas, 'sasum', require( './../../base/sasum' ) );\n\n/**\n* @name saxpy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/saxpy}\n*/\nsetReadOnly( blas, 'saxpy', require( './../../base/saxpy' ) );\n\n/**\n* @name scopy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/scopy}\n*/\nsetReadOnly( blas, 'scopy', require( './../../base/scopy' ) );\n\n/**\n* @name sdot\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/sdot}\n*/\nsetReadOnly( blas, 'sdot', require( './../../base/sdot' ) );\n\n/**\n* @name sdsdot\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/sdsdot}\n*/\nsetReadOnly( blas, 'sdsdot', require( './../../base/sdsdot' ) );\n\n/**\n* @name snrm2\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/snrm2}\n*/\nsetReadOnly( blas, 'snrm2', require( './../../base/snrm2' ) );\n\n/**\n* @name srotg\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/srotg}\n*/\nsetReadOnly( blas, 'srotg', require( './../../base/srotg' ) );\n\n/**\n* @name sscal\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/sscal}\n*/\nsetReadOnly( blas, 'sscal', require( './../../base/sscal' ) );\n\n/**\n* @name sswap\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/sswap}\n*/\nsetReadOnly( blas, 'sswap', require( './../../base/sswap' ) );\n\n\n// EXPORTS //\n\nmodule.exports = blas;\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 isFloat64VectorLike = require( '@stdlib/assert/is-float64vector-like' );\nvar format = require( '@stdlib/string/format' );\nvar dot = require( './../../base/ddot' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of two double-precision floating-point vectors.\n*\n* @param {VectorLike} x - first input array\n* @param {VectorLike} y - second input array\n* @throws {TypeError} first argument must be a 1-dimensional ndarray containing double-precision floating-point numbers\n* @throws {TypeError} second argument must be a 1-dimensional ndarray containing double-precision floating-point numbers\n* @throws {RangeError} input arrays must be the same length\n* @returns {number} dot product\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );\n* var y = array( new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );\n*\n* var z = ddot( x, y );\n* // returns -5.0\n*/\nfunction ddot( x, y ) {\n\tif ( !isFloat64VectorLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a one-dimensional ndarray containing double-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float64Array). Value: `%s`.', x ) );\n\t}\n\tif ( !isFloat64VectorLike( y ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a one-dimensional ndarray containing double-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float64Array). Value: `%s`.', y ) );\n\t}\n\tif ( x.length !== y.length ) {\n\t\tthrow new RangeError( format( 'invalid argument. Arrays must be the same length. First argument length: `%u`. Second argument length: `%u`.', x.length, y.length ) );\n\t}\n\treturn dot( x.length, x.data, x.strides[ 0 ], x.offset, y.data, y.strides[ 0 ], y.offset ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = ddot;\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 compute the dot product of two double-precision floating-point vectors.\n*\n* @module @stdlib/blas/ddot\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var array = require( '@stdlib/ndarray/array' );\n* var ddot = require( '@stdlib/blas/ddot' );\n*\n* var x = array( new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );\n* var y = array( new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );\n*\n* var z = ddot( x, y );\n* // returns -5.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\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 isFloat64VectorLike = require( '@stdlib/assert/is-float64vector-like' );\nvar format = require( '@stdlib/string/format' );\nvar swap = require( './../../base/dswap' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Interchanges two double-precision floating-point vectors.\n*\n* @param {VectorLike} x - first input array\n* @param {VectorLike} y - second input array\n* @throws {TypeError} first argument must be a 1-dimensional ndarray containing double-precision floating-point numbers\n* @throws {TypeError} second argument must be a 1-dimensional ndarray containing double-precision floating-point numbers\n* @throws {RangeError} input arrays must be the same length\n* @returns {VectorLike} `y`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );\n* var y = array( new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );\n*\n* dswap( x, y );\n*\n* var xbuf = x.data;\n* // returns [ 2.0, 6.0, -1.0, -4.0, 8.0 ]\n*\n* var ybuf = y.data;\n* // returns [ 4.0, 2.0, -3.0, 5.0, -1.0 ]\n*/\nfunction dswap( x, y ) {\n\tif ( !isFloat64VectorLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a one-dimensional ndarray containing double-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float64Array). Value: `%s`.', x ) );\n\t}\n\tif ( !isFloat64VectorLike( y ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a one-dimensional ndarray containing double-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float64Array). Value: `%s`.', y ) );\n\t}\n\tif ( x.length !== y.length ) {\n\t\tthrow new RangeError( format( 'invalid argument. Arrays must be the same length. First argument length: `%u`. Second argument length: `%u`.', x.length, y.length ) );\n\t}\n\tswap( x.length, x.data, x.strides[ 0 ], x.offset, y.data, y.strides[ 0 ], y.offset ); // eslint-disable-line max-len\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dswap;\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 interchange two double-precision floating-point vectors.\n*\n* @module @stdlib/blas/dswap\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var array = require( '@stdlib/ndarray/array' );\n* var dswap = require( '@stdlib/blas/dswap' );\n*\n* var x = array( new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );\n* var y = array( new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );\n*\n* dswap( x, y );\n*\n* var xbuf = x.data;\n* // returns [ 2.0, 6.0, -1.0, -4.0, 8.0 ]\n*\n* var ybuf = y.data;\n* // returns [ 4.0, 2.0, -3.0, 5.0, -1.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each element in a double-precision floating-point strided array.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dapx( x.length, 5.0, x, 1 );\n* // x => [ 3.0, 6.0, 8.0, 0.0, 9.0, 5.0, 4.0, 2.0 ]\n*/\nfunction dapx( N, alpha, x, stride ) {\n\tvar ix;\n\tvar i;\n\tvar m;\n\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ i ] += alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] += alpha;\n\t\t\tx[ i+1 ] += alpha;\n\t\t\tx[ i+2 ] += alpha;\n\t\t\tx[ i+3 ] += alpha;\n\t\t\tx[ i+4 ] += alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] += alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapx;\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each element in a double-precision floating-point strided array.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );\n* var alpha = 5.0;\n*\n* dapx( 3, alpha, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, 1.0, 10.0, -1.0 ]\n*/\nfunction dapx( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] += alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ ix ] += alpha;\n\t\t\tx[ ix+1 ] += alpha;\n\t\t\tx[ ix+2 ] += alpha;\n\t\t\tx[ ix+3 ] += alpha;\n\t\t\tx[ ix+4 ] += alpha;\n\t\t\tix += M;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] += alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapx;\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 dapx = require( './dapx.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dapx, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dapx;\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* Add a constant to each element in a double-precision floating-point strided array.\n*\n* @module @stdlib/blas/ext/base/dapx\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dapx = require( '@stdlib/blas/ext/base/dapx' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dapx( x.length, 5.0, x, 1 );\n* // x => [ 3.0, 6.0, 8.0, 0.0, 9.0, 5.0, 4.0, 2.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dapx = require( '@stdlib/blas/ext/base/dapx' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dapx.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ 3.0, 6.0, 8.0, 0.0, 9.0, 5.0, 4.0, 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 dapx;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdapx = main;\n} else {\n\tdapx = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapx;\n\n// exports: { \"ndarray\": \"dapx.ndarray\" }\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each double-precision floating-point strided array element and computes the sum using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dapxsumkbn( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction dapxsumkbn( N, alpha, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = alpha + x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc += (sum-t) + v;\n\t\t} else {\n\t\t\tc += (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tix += stride;\n\t}\n\treturn sum + c;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumkbn;\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each double-precision floating-point strided array element and computes the sum using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dapxsumkbn( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction dapxsumkbn( N, alpha, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = alpha + x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc += (sum-t) + v;\n\t\t} else {\n\t\t\tc += (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tix += stride;\n\t}\n\treturn sum + c;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumkbn;\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 dapxsumkbn = require( './dapxsumkbn.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dapxsumkbn, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumkbn;\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* Add a constant to each double-precision floating-point strided array element and compute the sum using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/dapxsumkbn\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dapxsumkbn = require( '@stdlib/blas/ext/base/dapxsumkbn' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dapxsumkbn( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dapxsumkbn = require( '@stdlib/blas/ext/base/dapxsumkbn' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dapxsumkbn.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 dapxsumkbn;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdapxsumkbn = main;\n} else {\n\tdapxsumkbn = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumkbn;\n\n// exports: { \"ndarray\": \"dapxsumkbn.ndarray\" }\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 dapxsumkbn = require( './../../../../ext/base/dapxsumkbn' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each double-precision floating-point strided array element and computes the sum.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dapxsum( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction dapxsum( N, alpha, x, stride ) {\n\treturn dapxsumkbn( N, alpha, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsum;\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 dapxsumkbn = require( './../../../../ext/base/dapxsumkbn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each double-precision floating-point strided array element and computes the sum.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dapxsum( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction dapxsum( N, alpha, x, stride, offset ) {\n\treturn dapxsumkbn( N, alpha, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsum;\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 dapxsum = require( './dapxsum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dapxsum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dapxsum;\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* Add a constant to each double-precision floating-point strided array element and compute the sum.\n*\n* @module @stdlib/blas/ext/base/dapxsum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dapxsum = require( '@stdlib/blas/ext/base/dapxsum' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dapxsum( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dapxsum = require( '@stdlib/blas/ext/base/dapxsum' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dapxsum.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 dapxsum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdapxsum = main;\n} else {\n\tdapxsum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsum;\n\n// exports: { \"ndarray\": \"dapxsum.ndarray\" }\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each double-precision floating-point strided array element and computes the sum using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dapxsumkbn2( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction dapxsumkbn2( N, alpha, x, stride ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = alpha + x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = (sum-t) + v;\n\t\t} else {\n\t\t\tc = (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tt = cs + c;\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = (cs-t) + c;\n\t\t} else {\n\t\t\tcc = (c-t) + cs;\n\t\t}\n\t\tcs = t;\n\t\tccs += cc;\n\t\tix += stride;\n\t}\n\treturn sum + cs + ccs;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumkbn2;\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each double-precision floating-point strided array element and computes the sum using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dapxsumkbn2( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction dapxsumkbn2( N, alpha, x, stride, offset ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ 0 ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = alpha + x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = (sum-t) + v;\n\t\t} else {\n\t\t\tc = (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tt = cs + c;\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = (cs-t) + c;\n\t\t} else {\n\t\t\tcc = (c-t) + cs;\n\t\t}\n\t\tcs = t;\n\t\tccs += cc;\n\t\tix += stride;\n\t}\n\treturn sum + cs + ccs;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumkbn2;\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 dapxsumkbn2 = require( './dapxsumkbn2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dapxsumkbn2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumkbn2;\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* Add a constant to each double-precision floating-point strided array element and compute the sum using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/dapxsumkbn2\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dapxsumkbn2 = require( '@stdlib/blas/ext/base/dapxsumkbn2' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dapxsumkbn2( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dapxsumkbn2 = require( '@stdlib/blas/ext/base/dapxsumkbn2' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dapxsumkbn2.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 dapxsumkbn2;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdapxsumkbn2 = main;\n} else {\n\tdapxsumkbn2 = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumkbn2;\n\n// exports: { \"ndarray\": \"dapxsumkbn2.ndarray\" }\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// MAIN //\n\n/**\n* Adds a constant to each double-precision floating-point strided array element and computes the sum using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dapxsumors( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction dapxsumors( N, alpha, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += alpha + x[ ix ];\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumors;\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// MAIN //\n\n/**\n* Adds a constant to each double-precision floating-point strided array element and computes the sum using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dapxsumors( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction dapxsumors( N, alpha, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ 0 ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += alpha + x[ ix ];\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumors;\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 dapxsumors = require( './dapxsumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dapxsumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumors;\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* Add a constant to each double-precision floating-point strided array element and compute the sum using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/dapxsumors\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dapxsumors = require( '@stdlib/blas/ext/base/dapxsumors' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dapxsumors( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dapxsumors = require( '@stdlib/blas/ext/base/dapxsumors' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dapxsumors.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 dapxsumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdapxsumors = main;\n} else {\n\tdapxsumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumors;\n\n// exports: { \"ndarray\": \"dapxsumors.ndarray\" }\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 floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each double-precision floating-point strided array element and computes the sum using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dapxsumpw( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction dapxsumpw( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ offset ];\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += alpha + x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = alpha + x[ ix ];\n\t\ts1 = alpha + x[ ix+stride ];\n\t\ts2 = alpha + x[ ix+(2*stride) ];\n\t\ts3 = alpha + x[ ix+(3*stride) ];\n\t\ts4 = alpha + x[ ix+(4*stride) ];\n\t\ts5 = alpha + x[ ix+(5*stride) ];\n\t\ts6 = alpha + x[ ix+(6*stride) ];\n\t\ts7 = alpha + x[ ix+(7*stride) ];\n\t\tix += 8 * stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += alpha + x[ ix ];\n\t\t\ts1 += alpha + x[ ix+stride ];\n\t\t\ts2 += alpha + x[ ix+(2*stride) ];\n\t\t\ts3 += alpha + x[ ix+(3*stride) ];\n\t\t\ts4 += alpha + x[ ix+(4*stride) ];\n\t\t\ts5 += alpha + x[ ix+(5*stride) ];\n\t\t\ts6 += alpha + x[ ix+(6*stride) ];\n\t\t\ts7 += alpha + x[ ix+(7*stride) ];\n\t\t\tix += 8 * stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\ts += alpha + x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn dapxsumpw( n, alpha, x, stride, ix ) + dapxsumpw( N-n, alpha, x, stride, ix+(n*stride) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumpw;\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 sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each double-precision floating-point strided array element and computes the sum using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dapxsumpw( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction dapxsumpw( N, alpha, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += alpha + x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, alpha, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumpw;\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 dapxsumpw = require( './dapxsumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dapxsumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumpw;\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* Add a constant to each double-precision floating-point strided array element and compute the sum using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/dapxsumpw\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dapxsumpw = require( '@stdlib/blas/ext/base/dapxsumpw' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dapxsumpw( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dapxsumpw = require( '@stdlib/blas/ext/base/dapxsumpw' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dapxsumpw.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 dapxsumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdapxsumpw = main;\n} else {\n\tdapxsumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapxsumpw;\n\n// exports: { \"ndarray\": \"dapxsumpw.ndarray\" }\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 floor = require( '@stdlib/math/base/special/floor' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values (L1 norm) of double-precision floating-point strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dasumpw( N, x, 2, 1 );\n* // returns 9.0\n*/\nfunction dasumpw( N, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn abs( x[ offset ] );\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += abs( x[ ix ] );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = abs( x[ ix ] );\n\t\ts1 = abs( x[ ix+stride ] );\n\t\ts2 = abs( x[ ix+(2*stride) ] );\n\t\ts3 = abs( x[ ix+(3*stride) ] );\n\t\ts4 = abs( x[ ix+(4*stride) ] );\n\t\ts5 = abs( x[ ix+(5*stride) ] );\n\t\ts6 = abs( x[ ix+(6*stride) ] );\n\t\ts7 = abs( x[ ix+(7*stride) ] );\n\t\tix += 8 * stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += abs( x[ ix ] );\n\t\t\ts1 += abs( x[ ix+stride ] );\n\t\t\ts2 += abs( x[ ix+(2*stride) ] );\n\t\t\ts3 += abs( x[ ix+(3*stride) ] );\n\t\t\ts4 += abs( x[ ix+(4*stride) ] );\n\t\t\ts5 += abs( x[ ix+(5*stride) ] );\n\t\t\ts6 += abs( x[ ix+(6*stride) ] );\n\t\t\ts7 += abs( x[ ix+(7*stride) ] );\n\t\t\tix += 8 * stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\ts += abs( x[ ix ] );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn dasumpw( n, x, stride, ix ) + dasumpw( N-n, x, stride, ix+(n*stride) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = dasumpw;\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 abs = require( '@stdlib/math/base/special/abs' );\nvar sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values (L1 norm) of double-precision floating-point strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dasumpw( N, x, 1 );\n* // returns 5.0\n*/\nfunction dasumpw( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn abs( x[ 0 ] );\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += abs( x[ ix ] );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dasumpw;\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 dasumpw = require( './dasumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dasumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dasumpw;\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* Compute the sum of absolute values (L1 norm) of double-precision floating-point strided array elements using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/dasumpw\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dasumpw = require( '@stdlib/blas/ext/base/dasumpw' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dasumpw( N, x, 1 );\n* // returns 5.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dasumpw = require( '@stdlib/blas/ext/base/dasumpw' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dasumpw.ndarray( N, x, 2, 1 );\n* // returns 9.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 dasumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdasumpw = main;\n} else {\n\tdasumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dasumpw;\n\n// exports: { \"ndarray\": \"dasumpw.ndarray\" }\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of double-precision floating-point strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float64Array( x.length );\n* var N = x.length;\n*\n* var v = dcusumkbn( N, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction dcusumkbn( N, sum, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar s;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\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\ts = sum;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = s + v;\n\t\tif ( abs( s ) >= abs( v ) ) {\n\t\t\tc += (s-t) + v;\n\t\t} else {\n\t\t\tc += (v-t) + s;\n\t\t}\n\t\ts = t;\n\t\ty[ iy ] = s + c;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusumkbn;\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of double-precision floating-point strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float64Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* var v = dcusumkbn( N, 0.0, x, 2, 1, y, 1, 0 );\n* // returns [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction dcusumkbn( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar s;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\ts = sum;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = s + v;\n\t\tif ( abs( s ) >= abs( v ) ) {\n\t\t\tc += (s-t) + v;\n\t\t} else {\n\t\t\tc += (v-t) + s;\n\t\t}\n\t\ts = t;\n\t\ty[ iy ] = s + c;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusumkbn;\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 dcusumkbn = require( './dcusumkbn.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dcusumkbn, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dcusumkbn;\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* Compute the cumulative sum of double-precision floating-point strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/dcusumkbn\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dcusumkbn = require( '@stdlib/blas/ext/base/dcusumkbn' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float64Array( x.length );\n* var N = x.length;\n*\n* dcusumkbn( N, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dcusumkbn = require( '@stdlib/blas/ext/base/dcusumkbn' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float64Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* dcusumkbn.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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 dcusumkbn;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdcusumkbn = main;\n} else {\n\tdcusumkbn = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusumkbn;\n\n// exports: { \"ndarray\": \"dcusumkbn.ndarray\" }\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 dcusumkbn = require( './../../../../ext/base/dcusumkbn' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of double-precision floating-point strided array elements.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float64Array( x.length );\n* var N = x.length;\n*\n* var v = dcusum( N, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction dcusum( N, sum, x, strideX, y, strideY ) {\n\treturn dcusumkbn( N, sum, x, strideX, y, strideY );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusum;\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 dcusumkbn = require( './../../../../ext/base/dcusumkbn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of double-precision floating-point strided array elements.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float64Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* var v = dcusum( N, 0.0, x, 2, 1, y, 1, 0 );\n* // returns [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction dcusum( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\treturn dcusumkbn( N, sum, x, strideX, offsetX, y, strideY, offsetY );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusum;\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 dcusum = require( './dcusum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dcusum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dcusum;\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* Compute the cumulative sum of double-precision floating-point strided array elements.\n*\n* @module @stdlib/blas/ext/base/dcusum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dcusum = require( '@stdlib/blas/ext/base/dcusum' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float64Array( x.length );\n* var N = x.length;\n*\n* dcusum( N, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dcusum = require( '@stdlib/blas/ext/base/dcusum' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float64Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* dcusum.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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 dcusum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdcusum = main;\n} else {\n\tdcusum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusum;\n\n// exports: { \"ndarray\": \"dcusum.ndarray\" }\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of double-precision floating-point strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float64Array( x.length );\n* var N = x.length;\n*\n* var v = dcusumkbn2( N, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction dcusumkbn2( N, sum, x, strideX, y, strideY ) {\n\tvar ccs;\n\tvar ix;\n\tvar iy;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\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\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = (sum-t) + v;\n\t\t} else {\n\t\t\tc = (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tt = cs + c;\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = (cs-t) + c;\n\t\t} else {\n\t\t\tcc = (c-t) + cs;\n\t\t}\n\t\tcs = t;\n\t\tccs += cc;\n\n\t\ty[ iy ] = sum + cs + ccs;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusumkbn2;\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of double-precision floating-point strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float64Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* var v = dcusumkbn2( N, 0.0, x, 2, 1, y, 1, 0 );\n* // returns [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction dcusumkbn2( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ccs;\n\tvar ix;\n\tvar iy;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = (sum-t) + v;\n\t\t} else {\n\t\t\tc = (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tt = cs + c;\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = (cs-t) + c;\n\t\t} else {\n\t\t\tcc = (c-t) + cs;\n\t\t}\n\t\tcs = t;\n\t\tccs += cc;\n\n\t\ty[ iy ] = sum + cs + ccs;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusumkbn2;\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 dcusumkbn2 = require( './dcusumkbn2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dcusumkbn2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dcusumkbn2;\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* Compute the cumulative sum of double-precision floating-point strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/dcusumkbn2\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dcusumkbn2 = require( '@stdlib/blas/ext/base/dcusumkbn2' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float64Array( x.length );\n* var N = x.length;\n*\n* dcusumkbn2( N, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dcusumkbn2 = require( '@stdlib/blas/ext/base/dcusumkbn2' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float64Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* dcusumkbn2.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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 dcusumkbn2;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdcusumkbn2 = main;\n} else {\n\tdcusumkbn2 = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusumkbn2;\n\n// exports: { \"ndarray\": \"dcusumkbn2.ndarray\" }\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// MAIN //\n\n/**\n* Computes the cumulative sum of double-precision floating-point strided array elements using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float64Array( x.length );\n* var N = x.length;\n*\n* var v = dcusumors( N, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction dcusumors( N, sum, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\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\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += x[ ix ];\n\t\ty[ iy ] = sum;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusumors;\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// MAIN //\n\n/**\n* Computes the cumulative sum of double-precision floating-point strided array elements using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float64Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* var v = dcusumors( N, 0.0, x, 2, 1, y, 1, 0 );\n* // returns [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction dcusumors( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += x[ ix ];\n\t\ty[ iy ] = sum;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusumors;\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 dcusumors = require( './dcusumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dcusumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dcusumors;\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* Compute the cumulative sum of double-precision floating-point strided array elements using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/dcusumors\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dcusumors = require( '@stdlib/blas/ext/base/dcusumors' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float64Array( x.length );\n* var N = x.length;\n*\n* dcusumors( N, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dcusumors = require( '@stdlib/blas/ext/base/dcusumors' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float64Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* dcusumors.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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 dcusumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdcusumors = main;\n} else {\n\tdcusumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusumors;\n\n// exports: { \"ndarray\": \"dcusumors.ndarray\" }\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 floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation:\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of double-precision floating-point strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float64Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* var v = dcusumpw( N, 0.0, x, 2, 1, y, 1, 0 );\n* // returns [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction dcusumpw( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\tif ( N <= BLOCKSIZE ) {\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\ty[ iy ] = sum + s;\n\t\t\tix += strideX;\n\t\t\tiy += strideY;\n\t\t}\n\t\treturn y;\n\t}\n\tn = floor( N/2 );\n\tdcusumpw( n, sum, x, strideX, ix, y, strideY, iy );\n\tiy += (n-1) * strideY;\n\tdcusumpw( N-n, y[ iy ], x, strideX, ix+(n*strideX), y, strideY, iy+strideY ); // eslint-disable-line max-len\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusumpw;\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 cusum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of double-precision floating-point strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float64Array( x.length );\n* var N = x.length;\n*\n* var v = dcusumpw( N, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction dcusumpw( N, sum, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\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\treturn cusum( N, sum, x, strideX, ix, y, strideY, iy );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusumpw;\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 dcusumpw = require( './dcusumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dcusumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dcusumpw;\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* Compute the cumulative sum of double-precision floating-point strided array elements using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/dcusumpw\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dcusumpw = require( '@stdlib/blas/ext/base/dcusumpw' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float64Array( x.length );\n* var N = x.length;\n*\n* dcusumpw( N, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dcusumpw = require( '@stdlib/blas/ext/base/dcusumpw' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float64Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* dcusumpw.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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 dcusumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdcusumpw = main;\n} else {\n\tdcusumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcusumpw;\n\n// exports: { \"ndarray\": \"dcusumpw.ndarray\" }\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// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Fills a double-precision floating-point strided array with a specified scalar constant.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dfill( x.length, 5.0, x, 1 );\n* // x => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 ]\n*/\nfunction dfill( N, alpha, x, stride ) {\n\tvar ix;\n\tvar i;\n\tvar m;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ i ] = alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] = alpha;\n\t\t\tx[ i+1 ] = alpha;\n\t\t\tx[ i+2 ] = alpha;\n\t\t\tx[ i+3 ] = alpha;\n\t\t\tx[ i+4 ] = alpha;\n\t\t\tx[ i+5 ] = alpha;\n\t\t\tx[ i+6 ] = alpha;\n\t\t\tx[ i+7 ] = alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] = alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dfill;\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// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Fills a double-precision floating-point strided array with a specified scalar constant.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );\n*\n* dfill( 3, 5.0, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, 5.0, 5.0, 5.0 ]\n*/\nfunction dfill( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] = alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ ix ] = alpha;\n\t\t\tx[ ix+1 ] = alpha;\n\t\t\tx[ ix+2 ] = alpha;\n\t\t\tx[ ix+3 ] = alpha;\n\t\t\tx[ ix+4 ] = alpha;\n\t\t\tx[ ix+5 ] = alpha;\n\t\t\tx[ ix+6 ] = alpha;\n\t\t\tx[ ix+7 ] = alpha;\n\t\t\tix += M;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] = alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dfill;\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 dfill = require( './dfill.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dfill, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dfill;\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* Fill a double-precision floating-point strided array with a specified scalar constant.\n*\n* @module @stdlib/blas/ext/base/dfill\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dfill = require( '@stdlib/blas/ext/base/dfill' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dfill( x.length, 5.0, x, 1 );\n* // x => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dfill = require( '@stdlib/blas/ext/base/dfill' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dfill.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.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 dfill;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdfill = main;\n} else {\n\tdfill = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dfill;\n\n// exports: { \"ndarray\": \"dfill.ndarray\" }\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values (L1 norm) of double-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnanasumors( N, x, 1 );\n* // returns 5.0\n*/\nfunction dnanasumors( N, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ 0 ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn abs( x[ 0 ] );\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tsum += abs( v );\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnanasumors;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values (L1 norm) of double-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnanasumors( N, x, 2, 1 );\n* // returns 9.0\n*/\nfunction dnanasumors( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ offset ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn abs( x[ offset ] );\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tsum += abs( v );\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnanasumors;\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 dnanasumors = require( './dnanasumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnanasumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnanasumors;\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* Compute the sum of absolute values (L1 norm) of double-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/dnanasumors\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnanasumors = require( '@stdlib/blas/ext/base/dnanasumors' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnanasumors( N, x, 1 );\n* // returns 5.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnanasumors = require( '@stdlib/blas/ext/base/dnanasumors' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnanasumors.ndarray( N, x, 2, 1 );\n* // returns 9.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 dnanasumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnanasumors = main;\n} else {\n\tdnanasumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnanasumors;\n\n// exports: { \"ndarray\": \"dnanasumors.ndarray\" }\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 dnanasumors = require( './../../../../ext/base/dnanasumors' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values (L1 norm) of double-precision floating-point strided array elements, ignoring `NaN` values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnanasum( N, x, 1 );\n* // returns 5.0\n*/\nfunction dnanasum( N, x, stride ) {\n\treturn dnanasumors( N, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnanasum;\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 dnanasumors = require( './../../../../ext/base/dnanasumors' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values (L1 norm) of double-precision floating-point strided array elements, ignoring `NaN` values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnanasum( N, x, 2, 1 );\n* // returns 9.0\n*/\nfunction dnanasum( N, x, stride, offset ) {\n\treturn dnanasumors( N, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnanasum;\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 dnanasum = require( './dnanasum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnanasum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnanasum;\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* Compute the sum of absolute values (L1 norm) of double-precision floating-point strided array elements, ignoring `NaN` values.\n*\n* @module @stdlib/blas/ext/base/dnanasum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnanasum = require( '@stdlib/blas/ext/base/dnanasum' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnanasum( N, x, 1 );\n* // returns 5.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnanasum = require( '@stdlib/blas/ext/base/dnanasum' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnanasum.ndarray( N, x, 2, 1 );\n* // returns 9.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 dnanasum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnanasum = main;\n} else {\n\tdnanasum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnanasum;\n\n// exports: { \"ndarray\": \"dnanasum.ndarray\" }\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} out - output array\n* @param {integer} strideOut - `out` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var out = new Float64Array( 2 );\n*\n* var v = dnannsumkbn( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*/\nfunction dnannsumkbn( N, x, strideX, out, strideOut ) {\n\tvar sum;\n\tvar ix;\n\tvar io;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar n;\n\tvar i;\n\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideOut < 0 ) {\n\t\tio = -strideOut;\n\t} else {\n\t\tio = 0;\n\t}\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\tout[ io ] = sum;\n\t\tout[ io+strideOut ] = 0;\n\t\treturn out;\n\t}\n\tif ( N === 1 || strideX === 0 ) {\n\t\tif ( isnan( x[ ix ] ) ) {\n\t\t\tout[ io ] = sum;\n\t\t\tout[ io+strideOut ] = 0;\n\t\t\treturn out;\n\t\t}\n\t\tout[ io ] = x[ ix ];\n\t\tout[ io+strideOut ] = 1;\n\t\treturn out;\n\t}\n\tc = 0.0;\n\tn = 0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc += (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc += (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t\tn += 1;\n\t\t}\n\t\tix += strideX;\n\t}\n\tout[ io ] = sum + c;\n\tout[ io+strideOut ] = n;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumkbn;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float64Array} out - output array\n* @param {integer} strideOut - `out` stride length\n* @param {NonNegativeInteger} offsetOut - `out` starting index\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dnannsumkbn( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\n*/\nfunction dnannsumkbn( N, x, strideX, offsetX, out, strideOut, offsetOut ) {\n\tvar sum;\n\tvar ix;\n\tvar io;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar n;\n\tvar i;\n\n\tix = offsetX;\n\tio = offsetOut;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\tout[ io ] = sum;\n\t\tout[ io+strideOut ] = 0;\n\t\treturn out;\n\t}\n\tif ( N === 1 || strideX === 0 ) {\n\t\tif ( isnan( x[ ix ] ) ) {\n\t\t\tout[ io ] = sum;\n\t\t\tout[ io+strideOut ] = 0;\n\t\t\treturn out;\n\t\t}\n\t\tout[ io ] = x[ ix ];\n\t\tout[ io+strideOut ] = 1;\n\t\treturn out;\n\t}\n\tc = 0.0;\n\tn = 0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc += (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc += (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t\tn += 1;\n\t\t}\n\t\tix += strideX;\n\t}\n\tout[ io ] = sum + c;\n\tout[ io+strideOut ] = n;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumkbn;\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 dnannsumkbn = require( './dnannsumkbn.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnannsumkbn, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumkbn;\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* Compute the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/dnannsumkbn\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnannsumkbn = require( '@stdlib/blas/ext/base/dnannsumkbn' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var out = new Float64Array( 2 );\n*\n* var v = dnannsumkbn( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnannsumkbn = require( '@stdlib/blas/ext/base/dnannsumkbn' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dnannsumkbn.ndarray( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\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 dnannsumkbn;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnannsumkbn = main;\n} else {\n\tdnannsumkbn = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumkbn;\n\n// exports: { \"ndarray\": \"dnannsumkbn.ndarray\" }\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 dnannsumkbn = require( './../../../../ext/base/dnannsumkbn' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} out - output array\n* @param {integer} strideOut - `out` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var out = new Float64Array( 2 );\n*\n* var v = dnannsum( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*/\nfunction dnannsum( N, x, strideX, out, strideOut ) {\n\treturn dnannsumkbn( N, x, strideX, out, strideOut );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsum;\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 dnannsumkbn = require( './../../../../ext/base/dnannsumkbn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float64Array} out - output array\n* @param {integer} strideOut - `out` stride length\n* @param {NonNegativeInteger} offsetOut - `out` starting index\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dnannsum( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\n*/\nfunction dnannsum( N, x, strideX, offsetX, out, strideOut, offsetOut ) {\n\treturn dnannsumkbn( N, x, strideX, offsetX, out, strideOut, offsetOut );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsum;\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 dnannsum = require( './dnannsum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnannsum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnannsum;\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* Compute the sum of double-precision floating-point strided array elements, ignoring `NaN` values.\n*\n* @module @stdlib/blas/ext/base/dnannsum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnannsum = require( '@stdlib/blas/ext/base/dnannsum' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var out = new Float64Array( 2 );\n*\n* var v = dnannsum( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnannsum = require( '@stdlib/blas/ext/base/dnannsum' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dnannsum.ndarray( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\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 dnannsum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnannsum = main;\n} else {\n\tdnannsum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsum;\n\n// exports: { \"ndarray\": \"dnannsum.ndarray\" }\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} out - output array\n* @param {integer} strideOut - `out` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var out = new Float64Array( 2 );\n*\n* var v = dnannsumkbn2( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*/\nfunction dnannsumkbn2( N, x, strideX, out, strideOut ) {\n\tvar sum;\n\tvar ccs;\n\tvar cs;\n\tvar cc;\n\tvar ix;\n\tvar io;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar n;\n\tvar i;\n\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideOut < 0 ) {\n\t\tio = -strideOut;\n\t} else {\n\t\tio = 0;\n\t}\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\tout[ io ] = sum;\n\t\tout[ io+strideOut ] = 0;\n\t\treturn out;\n\t}\n\tif ( N === 1 || strideX === 0 ) {\n\t\tif ( isnan( x[ ix ] ) ) {\n\t\t\tout[ io ] = sum;\n\t\t\tout[ io+strideOut ] = 0;\n\t\t\treturn out;\n\t\t}\n\t\tout[ io ] = x[ ix ];\n\t\tout[ io+strideOut ] = 1;\n\t\treturn out;\n\t}\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tn = 0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc = (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc = (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t\tt = cs + c;\n\t\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\t\tcc = (cs-t) + c;\n\t\t\t} else {\n\t\t\t\tcc = (c-t) + cs;\n\t\t\t}\n\t\t\tcs = t;\n\t\t\tccs += cc;\n\t\t\tn += 1;\n\t\t}\n\t\tix += strideX;\n\t}\n\tout[ io ] = sum + cs + ccs;\n\tout[ io+strideOut ] = n;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumkbn2;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float64Array} out - output array\n* @param {integer} strideOut - `out` stride length\n* @param {NonNegativeInteger} offsetOut - `out` starting index\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dnannsumkbn2( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\n*/\nfunction dnannsumkbn2( N, x, strideX, offsetX, out, strideOut, offsetOut ) {\n\tvar sum;\n\tvar ccs;\n\tvar cs;\n\tvar cc;\n\tvar ix;\n\tvar io;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar n;\n\tvar i;\n\n\tix = offsetX;\n\tio = offsetOut;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\tout[ io ] = sum;\n\t\tout[ io+strideOut ] = 0;\n\t\treturn out;\n\t}\n\tif ( N === 1 || strideX === 0 ) {\n\t\tif ( isnan( x[ ix ] ) ) {\n\t\t\tout[ io ] = sum;\n\t\t\tout[ io+strideOut ] = 0;\n\t\t\treturn out;\n\t\t}\n\t\tout[ io ] = x[ ix ];\n\t\tout[ io+strideOut ] = 1;\n\t\treturn out;\n\t}\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tn = 0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc = (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc = (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t\tt = cs + c;\n\t\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\t\tcc = (cs-t) + c;\n\t\t\t} else {\n\t\t\t\tcc = (c-t) + cs;\n\t\t\t}\n\t\t\tcs = t;\n\t\t\tccs += cc;\n\t\t\tn += 1;\n\t\t}\n\t\tix += strideX;\n\t}\n\tout[ io ] = sum + cs + ccs;\n\tout[ io+strideOut ] = n;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumkbn2;\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 dnannsumkbn2 = require( './dnannsumkbn2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnannsumkbn2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumkbn2;\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* Compute the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/dnannsumkbn2\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnannsumkbn2 = require( '@stdlib/blas/ext/base/dnannsumkbn2' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var out = new Float64Array( 2 );\n*\n* var v = dnannsumkbn2( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnannsumkbn2 = require( '@stdlib/blas/ext/base/dnannsumkbn2' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dnannsumkbn2.ndarray( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\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 dnannsumkbn2;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnannsumkbn2 = main;\n} else {\n\tdnannsumkbn2 = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumkbn2;\n\n// exports: { \"ndarray\": \"dnannsumkbn2.ndarray\" }\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} out - output array\n* @param {integer} strideOut - `out` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var out = new Float64Array( 2 );\n*\n* var v = dnannsumors( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*/\nfunction dnannsumors( N, x, strideX, out, strideOut ) {\n\tvar sum;\n\tvar ix;\n\tvar io;\n\tvar n;\n\tvar i;\n\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideOut < 0 ) {\n\t\tio = -strideOut;\n\t} else {\n\t\tio = 0;\n\t}\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\tout[ io ] = sum;\n\t\tout[ io+strideOut ] = 0;\n\t\treturn out;\n\t}\n\tif ( N === 1 || strideX === 0 ) {\n\t\tif ( isnan( x[ ix ] ) ) {\n\t\t\tout[ io ] = sum;\n\t\t\tout[ io+strideOut ] = 0;\n\t\t\treturn out;\n\t\t}\n\t\tout[ io ] = x[ ix ];\n\t\tout[ io+strideOut ] = 1;\n\t\treturn out;\n\t}\n\tn = 0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\tsum += x[ ix ];\n\t\t\tn += 1;\n\t\t}\n\t\tix += strideX;\n\t}\n\tout[ io ] = sum;\n\tout[ io+strideOut ] = n;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumors;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float64Array} out - output array\n* @param {integer} strideOut - `out` stride length\n* @param {NonNegativeInteger} offsetOut - `out` starting index\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dnannsumors( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\n*/\nfunction dnannsumors( N, x, strideX, offsetX, out, strideOut, offsetOut ) {\n\tvar sum;\n\tvar ix;\n\tvar io;\n\tvar n;\n\tvar i;\n\n\tix = offsetX;\n\tio = offsetOut;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\tout[ io ] = sum;\n\t\tout[ io+strideOut ] = 0;\n\t\treturn out;\n\t}\n\tif ( N === 1 || strideX === 0 ) {\n\t\tif ( isnan( x[ ix ] ) ) {\n\t\t\tout[ io ] = sum;\n\t\t\tout[ io+strideOut ] = 0;\n\t\t\treturn out;\n\t\t}\n\t\tout[ io ] = x[ ix ];\n\t\tout[ io+strideOut ] = 1;\n\t\treturn out;\n\t}\n\tn = 0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\tsum += x[ ix ];\n\t\t\tn += 1;\n\t\t}\n\t\tix += strideX;\n\t}\n\tout[ io ] = sum;\n\tout[ io+strideOut ] = n;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumors;\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 dnannsumors = require( './dnannsumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnannsumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumors;\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* Compute the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/dnannsumors\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnannsumors = require( '@stdlib/blas/ext/base/dnannsumors' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var out = new Float64Array( 2 );\n*\n* var v = dnannsumors( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnannsumors = require( '@stdlib/blas/ext/base/dnannsumors' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dnannsumors.ndarray( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\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 dnannsumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnannsumors = main;\n} else {\n\tdnannsumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumors;\n\n// exports: { \"ndarray\": \"dnannsumors.ndarray\" }\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of a double-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @private\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float64Array} out - two-element output array whose first element is the accumulated sum and whose second element is the accumulated number of summed values\n* @param {integer} strideOut - `out` stride length\n* @param {NonNegativeInteger} offsetOut - `out` starting index\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var out = new Float64Array( [ 0.0, 0 ] );\n* var v = sumpw( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\n*/\nfunction sumpw( N, x, strideX, offsetX, out, strideOut, offsetOut ) {\n\tvar ix;\n\tvar io;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar v;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn out;\n\t}\n\tix = offsetX;\n\tio = offsetOut;\n\tif ( N === 1 || strideX === 0 ) {\n\t\tif ( isnan( x[ ix ] ) ) {\n\t\t\treturn out;\n\t\t}\n\t\tout[ io ] += x[ ix ];\n\t\tout[ io+strideOut ] += 1;\n\t\treturn out;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tn = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = x[ ix ];\n\t\t\tif ( v === v ) {\n\t\t\t\ts += v;\n\t\t\t\tn += 1;\n\t\t\t}\n\t\t\tix += strideX;\n\t\t}\n\t\tout[ io ] += s;\n\t\tout[ io+strideOut ] += n;\n\t\treturn out;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = 0.0;\n\t\ts1 = 0.0;\n\t\ts2 = 0.0;\n\t\ts3 = 0.0;\n\t\ts4 = 0.0;\n\t\ts5 = 0.0;\n\t\ts6 = 0.0;\n\t\ts7 = 0.0;\n\t\tn = 0;\n\n\t\tM = N % 8;\n\t\tfor ( i = 0; i < N-M; i += 8 ) {\n\t\t\tv = x[ ix ];\n\t\t\tif ( v === v ) {\n\t\t\t\ts0 += v;\n\t\t\t\tn += 1;\n\t\t\t}\n\t\t\tix += strideX;\n\t\t\tv = x[ ix ];\n\t\t\tif ( v === v ) {\n\t\t\t\ts1 += v;\n\t\t\t\tn += 1;\n\t\t\t}\n\t\t\tix += strideX;\n\t\t\tv = x[ ix ];\n\t\t\tif ( v === v ) {\n\t\t\t\ts2 += v;\n\t\t\t\tn += 1;\n\t\t\t}\n\t\t\tix += strideX;\n\t\t\tv = x[ ix ];\n\t\t\tif ( v === v ) {\n\t\t\t\ts3 += v;\n\t\t\t\tn += 1;\n\t\t\t}\n\t\t\tix += strideX;\n\t\t\tv = x[ ix ];\n\t\t\tif ( v === v ) {\n\t\t\t\ts4 += v;\n\t\t\t\tn += 1;\n\t\t\t}\n\t\t\tix += strideX;\n\t\t\tv = x[ ix ];\n\t\t\tif ( v === v ) {\n\t\t\t\ts5 += v;\n\t\t\t\tn += 1;\n\t\t\t}\n\t\t\tix += strideX;\n\t\t\tv = x[ ix ];\n\t\t\tif ( v === v ) {\n\t\t\t\ts6 += v;\n\t\t\t\tn += 1;\n\t\t\t}\n\t\t\tix += strideX;\n\t\t\tv = x[ ix ];\n\t\t\tif ( v === v ) {\n\t\t\t\ts7 += v;\n\t\t\t\tn += 1;\n\t\t\t}\n\t\t\tix += strideX;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\tv = x[ ix ];\n\t\t\tif ( v === v ) {\n\t\t\t\ts += v;\n\t\t\t\tn += 1;\n\t\t\t}\n\t\t\tix += strideX;\n\t\t}\n\t\tout[ io ] += s;\n\t\tout[ io+strideOut ] += n;\n\t\treturn out;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\tsumpw( n, x, strideX, ix, out, strideOut, offsetOut );\n\tsumpw( N-n, x, strideX, ix+(n*strideX), out, strideOut, offsetOut );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sumpw;\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 sumpw = require( './sumpw.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} out - output array\n* @param {integer} strideOut - `out` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var out = new Float64Array( 2 );\n*\n* var v = dnannsumpw( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*/\nfunction dnannsumpw( N, x, strideX, out, strideOut ) {\n\tvar ix;\n\tvar io;\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideOut < 0 ) {\n\t\tio = -strideOut;\n\t} else {\n\t\tio = 0;\n\t}\n\tout[ io ] = 0.0;\n\tout[ io+strideOut ] = 0;\n\tsumpw( N, x, strideX, ix, out, strideOut, io );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumpw;\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 sumpw = require( './sumpw.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float64Array} out - output array\n* @param {integer} strideOut - `out` stride length\n* @param {NonNegativeInteger} offsetOut - `out` starting index\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dnannsumpw( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\n*/\nfunction dnannsumpw( N, x, strideX, offsetX, out, strideOut, offsetOut ) {\n\tout[ offsetOut ] = 0.0;\n\tout[ offsetOut+strideOut ] = 0;\n\tsumpw( N, x, strideX, offsetX, out, strideOut, offsetOut );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumpw;\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 dnannsumpw = require( './dnannsumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnannsumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumpw;\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* Compute the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/dnannsumpw\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnannsumpw = require( '@stdlib/blas/ext/base/dnannsumpw' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var out = new Float64Array( 2 );\n*\n* var v = dnannsumpw( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnannsumpw = require( '@stdlib/blas/ext/base/dnannsumpw' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dnannsumpw.ndarray( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\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 dnannsumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnannsumpw = main;\n} else {\n\tdnannsumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumpw;\n\n// exports: { \"ndarray\": \"dnannsumpw.ndarray\" }\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnansumkbn( N, x, 1 );\n* // returns 1.0\n*/\nfunction dnansumkbn( N, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ 0 ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc += (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc += (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum + c;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansumkbn;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnansumkbn( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dnansumkbn( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ offset ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc += (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc += (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum + c;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansumkbn;\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 dnansumkbn = require( './dnansumkbn.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnansumkbn, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnansumkbn;\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* Compute the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/dnansumkbn\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnansumkbn = require( '@stdlib/blas/ext/base/dnansumkbn' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnansumkbn( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnansumkbn = require( '@stdlib/blas/ext/base/dnansumkbn' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnansumkbn.ndarray( N, x, 2, 1 );\n* // returns 5.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 dnansumkbn;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnansumkbn = main;\n} else {\n\tdnansumkbn = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansumkbn;\n\n// exports: { \"ndarray\": \"dnansumkbn.ndarray\" }\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 dnansumkbn = require( './../../../../ext/base/dnansumkbn' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnansum( N, x, 1 );\n* // returns 1.0\n*/\nfunction dnansum( N, x, stride ) {\n\treturn dnansumkbn( N, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansum;\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 dnansumkbn = require( './../../../../ext/base/dnansumkbn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnansum( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dnansum( N, x, stride, offset ) {\n\treturn dnansumkbn( N, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansum;\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 dnansum = require( './dnansum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnansum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnansum;\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* Compute the sum of double-precision floating-point strided array elements, ignoring `NaN` values.\n*\n* @module @stdlib/blas/ext/base/dnansum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnansum = require( '@stdlib/blas/ext/base/dnansum' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnansum( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnansum = require( '@stdlib/blas/ext/base/dnansum' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnansum.ndarray( N, x, 2, 1 );\n* // returns 5.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 dnansum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnansum = main;\n} else {\n\tdnansum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansum;\n\n// exports: { \"ndarray\": \"dnansum.ndarray\" }\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnansumkbn2( N, x, 1 );\n* // returns 1.0\n*/\nfunction dnansumkbn2( N, x, stride ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ 0 ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc = (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc = (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t\tt = cs + c;\n\t\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\t\tcc = (cs-t) + c;\n\t\t\t} else {\n\t\t\t\tcc = (c-t) + cs;\n\t\t\t}\n\t\t\tcs = t;\n\t\t\tccs += cc;\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum + cs + ccs;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansumkbn2;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnansumkbn2( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dnansumkbn2( N, x, stride, offset ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ offset ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc = (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc = (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t\tt = cs + c;\n\t\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\t\tcc = (cs-t) + c;\n\t\t\t} else {\n\t\t\t\tcc = (c-t) + cs;\n\t\t\t}\n\t\t\tcs = t;\n\t\t\tccs += cc;\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum + cs + ccs;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansumkbn2;\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 dnansumkbn2 = require( './dnansumkbn2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnansumkbn2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnansumkbn2;\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* Compute the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/dnansumkbn2\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnansumkbn2 = require( '@stdlib/blas/ext/base/dnansumkbn2' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnansumkbn2( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnansumkbn2 = require( '@stdlib/blas/ext/base/dnansumkbn2' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnansumkbn2.ndarray( N, x, 2, 1 );\n* // returns 5.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 dnansumkbn2;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnansumkbn2 = main;\n} else {\n\tdnansumkbn2 = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansumkbn2;\n\n// exports: { \"ndarray\": \"dnansumkbn2.ndarray\" }\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnansumors( N, x, 1 );\n* // returns 1.0\n*/\nfunction dnansumors( N, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ 0 ] ) ) {\n\t\t\treturn sum;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\tsum += x[ ix ];\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansumors;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnansumors( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dnansumors( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ offset ] ) ) {\n\t\t\treturn sum;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\tsum += x[ ix ];\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansumors;\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 dnansumors = require( './dnansumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnansumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnansumors;\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* Compute the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/dnansumors\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnansumors = require( '@stdlib/blas/ext/base/dnansumors' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnansumors( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnansumors = require( '@stdlib/blas/ext/base/dnansumors' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnansumors.ndarray( N, x, 2, 1 );\n* // returns 5.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 dnansumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnansumors = main;\n} else {\n\tdnansumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansumors;\n\n// exports: { \"ndarray\": \"dnansumors.ndarray\" }\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnansumpw( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dnansumpw( N, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ offset ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\t\ts += x[ ix ];\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts1 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts2 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts3 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts4 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts5 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts6 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts7 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts1 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts2 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts3 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts4 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts5 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts6 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts7 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\t\ts += x[ ix ];\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn dnansumpw( n, x, stride, ix ) + dnansumpw( N-n, x, stride, ix+(n*stride) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansumpw;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnansumpw( N, x, 1 );\n* // returns 1.0\n*/\nfunction dnansumpw( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ 0 ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\t\ts += x[ ix ];\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansumpw;\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 dnansumpw = require( './dnansumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnansumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnansumpw;\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* Compute the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/dnansumpw\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnansumpw = require( '@stdlib/blas/ext/base/dnansumpw' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dnansumpw( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnansumpw = require( '@stdlib/blas/ext/base/dnansumpw' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dnansumpw.ndarray( N, x, 2, 1 );\n* // returns 5.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 dnansumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnansumpw = main;\n} else {\n\tdnansumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnansumpw;\n\n// exports: { \"ndarray\": \"dnansumpw.ndarray\" }\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 floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Reverses a double-precision floating-point strided array in-place.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* drev( x.length, x, 1 );\n* // x => [ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.0 ]\n*/\nfunction drev( N, x, stride ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\tn = floor( N/2 );\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = n % M;\n\t\tiy = N - 1;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( ix = 0; ix < m; ix++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = x[ iy ];\n\t\t\t\tx[ iy ] = tmp;\n\t\t\t\tiy -= 1;\n\t\t\t}\n\t\t}\n\t\tif ( n < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( ix = m; ix < n; ix += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = x[ iy ];\n\t\t\tx[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = x[ iy-1 ];\n\t\t\tx[ iy-1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = x[ iy-2 ];\n\t\t\tx[ iy-2 ] = tmp;\n\n\t\t\tiy -= M;\n\t\t}\n\t\treturn x;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tiy = ix + ((N-1)*stride);\n\tfor ( i = 0; i < n; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = x[ iy ];\n\t\tx[ iy ] = tmp;\n\t\tix += stride;\n\t\tiy -= stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = drev;\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 floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Reverses a double-precision floating-point strided array in-place.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );\n*\n* drev( 3, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, -6.0, 5.0, -4.0 ]\n*/\nfunction drev( N, x, stride, offset ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\tn = floor( N/2 );\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = n % M;\n\t\tiy = ix + N - 1;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = x[ iy ];\n\t\t\t\tx[ iy ] = tmp;\n\t\t\t\tix += stride;\n\t\t\t\tiy -= stride;\n\t\t\t}\n\t\t}\n\t\tif ( n < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < n; i += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = x[ iy ];\n\t\t\tx[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = x[ iy-1 ];\n\t\t\tx[ iy-1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = x[ iy-2 ];\n\t\t\tx[ iy-2 ] = tmp;\n\n\t\t\tix += M;\n\t\t\tiy -= M;\n\t\t}\n\t\treturn x;\n\t}\n\tiy = ix + ((N-1)*stride);\n\tfor ( i = 0; i < n; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = x[ iy ];\n\t\tx[ iy ] = tmp;\n\t\tix += stride;\n\t\tiy -= stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = drev;\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 drev = require( './drev.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( drev, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = drev;\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* Reverse a double-precision floating-point strided array in-place.\n*\n* @module @stdlib/blas/ext/base/drev\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var drev = require( '@stdlib/blas/ext/base/drev' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* drev( x.length, x, 1 );\n* // x => [ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var drev = require( '@stdlib/blas/ext/base/drev' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* drev( x.length, x, 1, 0 );\n* // x => [ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -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 drev;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdrev = main;\n} else {\n\tdrev = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = drev;\n\n// exports: { \"ndarray\": \"drev.ndarray\" }\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 floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using pairwise summation with extended accumulation and returning an extended precision result.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsapxsumpw( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction dsapxsumpw( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ offset ];\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += alpha + x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = alpha + x[ ix ];\n\t\ts1 = alpha + x[ ix+stride ];\n\t\ts2 = alpha + x[ ix+(2*stride) ];\n\t\ts3 = alpha + x[ ix+(3*stride) ];\n\t\ts4 = alpha + x[ ix+(4*stride) ];\n\t\ts5 = alpha + x[ ix+(5*stride) ];\n\t\ts6 = alpha + x[ ix+(6*stride) ];\n\t\ts7 = alpha + x[ ix+(7*stride) ];\n\t\tix += 8 * stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += alpha + x[ ix ];\n\t\t\ts1 += alpha + x[ ix+stride ];\n\t\t\ts2 += alpha + x[ ix+(2*stride) ];\n\t\t\ts3 += alpha + x[ ix+(3*stride) ];\n\t\t\ts4 += alpha + x[ ix+(4*stride) ];\n\t\t\ts5 += alpha + x[ ix+(5*stride) ];\n\t\t\ts6 += alpha + x[ ix+(6*stride) ];\n\t\t\ts7 += alpha + x[ ix+(7*stride) ];\n\t\t\tix += 8 * stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\ts += alpha + x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn dsapxsumpw( n, alpha, x, stride, ix ) + dsapxsumpw( N-n, alpha, x, stride, ix+(n*stride) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsapxsumpw;\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 sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using pairwise summation with extended accumulation and returning an extended precision result.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsapxsumpw( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction dsapxsumpw( N, alpha, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += alpha + x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, alpha, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsapxsumpw;\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 dsapxsumpw = require( './dsapxsumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsapxsumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsapxsumpw;\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* Add a constant to each single-precision floating-point strided array element and compute the sum using pairwise summation with extended accumulation and returning an extended precision result.\n*\n* @module @stdlib/blas/ext/base/dsapxsumpw\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var dsapxsumpw = require( '@stdlib/blas/ext/base/dsapxsumpw' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsapxsumpw( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dsapxsumpw = require( '@stdlib/blas/ext/base/dsapxsumpw' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsapxsumpw.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 dsapxsumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsapxsumpw = main;\n} else {\n\tdsapxsumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsapxsumpw;\n\n// exports: { \"ndarray\": \"dsapxsumpw.ndarray\" }\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 dsapxsumpw = require( './../../../../ext/base/dsapxsumpw' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using extended accumulation and returning an extended precision result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsapxsum( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction dsapxsum( N, alpha, x, stride ) {\n\treturn dsapxsumpw( N, alpha, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsapxsum;\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 dsapxsumpw = require( './../../../../ext/base/dsapxsumpw' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using extended accumulation and returning an extended precision result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsapxsum( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction dsapxsum( N, alpha, x, stride, offset ) {\n\treturn dsapxsumpw( N, alpha, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsapxsum;\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 dsapxsum = require( './dsapxsum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsapxsum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsapxsum;\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* Add a constant to each single-precision floating-point strided array element and compute the sum using extended accumulation and returning an extended precision result.\n*\n* @module @stdlib/blas/ext/base/dsapxsum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var dsapxsum = require( '@stdlib/blas/ext/base/dsapxsum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsapxsum( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dsapxsum = require( '@stdlib/blas/ext/base/dsapxsum' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsapxsum.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 dsapxsum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsapxsum = main;\n} else {\n\tdsapxsum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsapxsum;\n\n// exports: { \"ndarray\": \"dsapxsum.ndarray\" }\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using ordinary recursive summation with extended accumulation, and returning an extended precision result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} out - output array\n* @param {integer} strideOut - `out` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var out = new Float64Array( 2 );\n*\n* var v = dsnannsumors( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*/\nfunction dsnannsumors( N, x, strideX, out, strideOut ) {\n\tvar sum;\n\tvar ix;\n\tvar io;\n\tvar n;\n\tvar i;\n\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideOut < 0 ) {\n\t\tio = -strideOut;\n\t} else {\n\t\tio = 0;\n\t}\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\tout[ io ] = sum;\n\t\tout[ io+strideOut ] = 0;\n\t\treturn out;\n\t}\n\tif ( N === 1 || strideX === 0 ) {\n\t\tif ( isnan( x[ ix ] ) ) {\n\t\t\tout[ io ] = sum;\n\t\t\tout[ io+strideOut ] = 0;\n\t\t\treturn out;\n\t\t}\n\t\tout[ io ] = x[ ix ];\n\t\tout[ io+strideOut ] = 1;\n\t\treturn out;\n\t}\n\tn = 0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\tsum += x[ ix ];\n\t\t\tn += 1;\n\t\t}\n\t\tix += strideX;\n\t}\n\tout[ io ] = sum;\n\tout[ io+strideOut ] = n;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsnannsumors;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using ordinary recursive summation with extended accumulation, and returning an extended precision result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float64Array} out - output array\n* @param {integer} strideOut - `out` stride length\n* @param {NonNegativeInteger} offsetOut - `out` starting index\n* @returns {Float64Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dsnannsumors( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\n*/\nfunction dsnannsumors( N, x, strideX, offsetX, out, strideOut, offsetOut ) {\n\tvar sum;\n\tvar ix;\n\tvar io;\n\tvar n;\n\tvar i;\n\n\tix = offsetX;\n\tio = offsetOut;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\tout[ io ] = sum;\n\t\tout[ io+strideOut ] = 0;\n\t\treturn out;\n\t}\n\tif ( N === 1 || strideX === 0 ) {\n\t\tif ( isnan( x[ ix ] ) ) {\n\t\t\tout[ io ] = sum;\n\t\t\tout[ io+strideOut ] = 0;\n\t\t\treturn out;\n\t\t}\n\t\tout[ io ] = x[ ix ];\n\t\tout[ io+strideOut ] = 1;\n\t\treturn out;\n\t}\n\tn = 0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\tsum += x[ ix ];\n\t\t\tn += 1;\n\t\t}\n\t\tix += strideX;\n\t}\n\tout[ io ] = sum;\n\tout[ io+strideOut ] = n;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsnannsumors;\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 dsnannsumors = require( './dsnannsumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsnannsumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsnannsumors;\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* Compute the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using ordinary recursive summation with extended accumulation, and returning an extended precision result.\n*\n* @module @stdlib/blas/ext/base/dsnannsumors\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsnannsumors = require( '@stdlib/blas/ext/base/dsnannsumors' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var out = new Float64Array( 2 );\n*\n* var v = dsnannsumors( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dsnannsumors = require( '@stdlib/blas/ext/base/dsnannsumors' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dsnannsumors.ndarray( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\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 dsnannsumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsnannsumors = main;\n} else {\n\tdsnannsumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsnannsumors;\n\n// exports: { \"ndarray\": \"dsnannsumors.ndarray\" }\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 isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using pairwise summation with extended accumulation, and returning an extended precision result.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsnansumpw( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dsnansumpw( N, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnanf( x[ offset ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( isnanf( x[ ix ] ) === false ) {\n\t\t\t\ts += x[ ix ];\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts1 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts2 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts3 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts4 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts5 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts6 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts7 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts1 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts2 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts3 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts4 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts5 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts6 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts7 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\tif ( isnanf( x[ ix ] ) === false ) {\n\t\t\t\ts += x[ ix ];\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn dsnansumpw( n, x, stride, ix ) + dsnansumpw( N-n, x, stride, ix+(n*stride) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsnansumpw;\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 isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using pairwise summation with extended accumulation, and returning an extended precision result.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsnansumpw( N, x, 1 );\n* // returns 1.0\n*/\nfunction dsnansumpw( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnanf( x[ 0 ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( isnanf( x[ ix ] ) === false ) {\n\t\t\t\ts += x[ ix ];\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsnansumpw;\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 dsnansumpw = require( './dsnansumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsnansumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsnansumpw;\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* Compute the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using pairwise summation with extended accumulation, and returning an extended precision result.\n*\n* @module @stdlib/blas/ext/base/dsnansumpw\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var dsnansumpw = require( '@stdlib/blas/ext/base/dsnansumpw' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsnansumpw( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dsnansumpw = require( '@stdlib/blas/ext/base/dsnansumpw' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsnansumpw.ndarray( N, x, 2, 1 );\n* // returns 5.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 dsnansumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsnansumpw = main;\n} else {\n\tdsnansumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsnansumpw;\n\n// exports: { \"ndarray\": \"dsnansumpw.ndarray\" }\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 dsnansumpw = require( './../../../../ext/base/dsnansumpw' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using extended accumulation, and returning an extended precision result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsnansum( N, x, 1 );\n* // returns 1.0\n*/\nfunction dsnansum( N, x, stride ) {\n\treturn dsnansumpw( N, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsnansum;\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 dsnansumpw = require( './../../../../ext/base/dsnansumpw' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using extended accumulation, and returning an extended precision result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsnansum( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dsnansum( N, x, stride, offset ) {\n\treturn dsnansumpw( N, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsnansum;\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 dsnansum = require( './dsnansum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsnansum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsnansum;\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* Compute the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using extended accumulation, and returning an extended precision result.\n*\n* @module @stdlib/blas/ext/base/dsnansum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var dsnansum = require( '@stdlib/blas/ext/base/dsnansum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsnansum( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dsnansum = require( '@stdlib/blas/ext/base/dsnansum' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsnansum.ndarray( N, x, 2, 1 );\n* // returns 5.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 dsnansum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsnansum = main;\n} else {\n\tdsnansum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsnansum;\n\n// exports: { \"ndarray\": \"dsnansum.ndarray\" }\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using ordinary recursive summation with extended accumulation, and returning an extended precision result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsnansumors( N, x, 1 );\n* // returns 1.0\n*/\nfunction dsnansumors( N, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ 0 ] ) ) {\n\t\t\treturn sum;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\tsum += x[ ix ];\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsnansumors;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using ordinary recursive summation with extended accumulation, and returning an extended precision result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsnansumors( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dsnansumors( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ offset ] ) ) {\n\t\t\treturn sum;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\tsum += x[ ix ];\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsnansumors;\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 dsnansumors = require( './dsnansumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsnansumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsnansumors;\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* Compute the sum of single-precision floating-point strided array elements, ignoring `NaN` values, using ordinary recursive summation with extended accumulation, and returning an extended precision result.\n*\n* @module @stdlib/blas/ext/base/dsnansumors\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var dsnansumors = require( '@stdlib/blas/ext/base/dsnansumors' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsnansumors( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dsnansumors = require( '@stdlib/blas/ext/base/dsnansumors' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsnansumors.ndarray( N, x, 2, 1 );\n* // returns 5.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 dsnansumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsnansumors = main;\n} else {\n\tdsnansumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsnansumors;\n\n// exports: { \"ndarray\": \"dsnansumors.ndarray\" }\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 isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array using heapsort.\n*\n* ## Notes\n*\n* - This implementation uses an in-place algorithm derived from the work of Floyd (1964).\n*\n* ## References\n*\n* - Williams, John William Joseph. 1964. \"Algorithm 232: Heapsort.\" _Communications of the ACM_ 7 (6). New York, NY, USA: Association for Computing Machinery: 347\u201349. doi:[10.1145/512274.512284](https://doi.org/10.1145/512274.512284).\n* - Floyd, Robert W. 1964. \"Algorithm 245: Treesort.\" _Communications of the ACM_ 7 (12). New York, NY, USA: Association for Computing Machinery: 701. doi:[10.1145/355588.365103](https://doi.org/10.1145/355588.365103).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` index increment\n* @returns {Float64Array} `x`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* dsort2hp( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction dsort2hp( N, order, x, strideX, y, strideY ) {\n\tvar offsetX;\n\tvar offsetY;\n\tvar parent;\n\tvar child;\n\tvar v1;\n\tvar v2;\n\tvar tx;\n\tvar ty;\n\tvar ix;\n\tvar iy;\n\tvar n;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t}\n\tif ( strideX < 0 ) {\n\t\toffsetX = (1-N) * strideX;\n\t} else {\n\t\toffsetX = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\toffsetY = (1-N) * strideY;\n\t} else {\n\t\toffsetY = 0;\n\t}\n\t// Set the initial heap size:\n\tn = N;\n\n\t// Specify an initial \"parent\" index for building the heap:\n\tparent = floor( N / 2 );\n\n\t// Continue looping until the array is sorted...\n\twhile ( true ) {\n\t\tif ( parent > 0 ) {\n\t\t\t// We need to build the heap...\n\t\t\tparent -= 1;\n\t\t\ttx = x[ offsetX+(parent*strideX) ];\n\t\t\tty = y[ offsetY+(parent*strideY) ];\n\t\t} else {\n\t\t\t// Reduce the heap size:\n\t\t\tn -= 1;\n\n\t\t\t// Check if the heap is empty, and, if so, we are finished sorting...\n\t\t\tif ( n === 0 ) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\t// Store the last heap value in a temporary variable in order to make room for the heap root being placed into its sorted position:\n\t\t\tix = offsetX + (n*strideX);\n\t\t\ttx = x[ ix ];\n\t\t\tiy = offsetY + (n*strideY);\n\t\t\tty = y[ iy ];\n\n\t\t\t// Move the heap root to its sorted position:\n\t\t\tx[ ix ] = x[ offsetX ];\n\t\t\ty[ iy ] = y[ offsetY ];\n\t\t}\n\t\t// We need to \"sift down\", pushing `t` down the heap to in order to replace the parent and satisfy the heap property...\n\n\t\t// Start at the parent index:\n\t\tj = parent;\n\n\t\t// Get the \"left\" child index:\n\t\tchild = (j*2) + 1;\n\n\t\twhile ( child < n ) {\n\t\t\t// Find the largest child...\n\t\t\tk = child + 1;\n\t\t\tif ( k < n ) {\n\t\t\t\tv1 = x[ offsetX+(k*strideX) ];\n\t\t\t\tv2 = x[ offsetX+(child*strideX) ];\n\n\t\t\t\t// Check if a \"right\" child exists and is \"bigger\"...\n\t\t\t\tif ( v1 > v2 || isnan( v1 ) || (v1 === v2 && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t\tchild += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if the largest child is bigger than `t`...\n\t\t\tv1 = x[ offsetX+(child*strideX) ];\n\t\t\tif ( v1 > tx || isnan( v1 ) || ( v1 === tx && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t// Insert the larger child value:\n\t\t\t\tx[ offsetX+(j*strideX) ] = v1;\n\t\t\t\ty[ offsetY+(j*strideY) ] = y[ offsetY+(child*strideY) ];\n\n\t\t\t\t// Update `j` to point to the child index:\n\t\t\t\tj = child;\n\n\t\t\t\t// Get the \"left\" child index and repeat...\n\t\t\t\tchild = (j*2) + 1;\n\t\t\t} else {\n\t\t\t\t// We've found `t`'s place in the heap...\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Insert `t` into the heap:\n\t\tx[ offsetX+(j*strideX) ] = tx;\n\t\ty[ offsetY+(j*strideY) ] = ty;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsort2hp;\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 isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array using heapsort.\n*\n* ## Notes\n*\n* - This implementation uses an in-place algorithm derived from the work of Floyd (1964).\n*\n* ## References\n*\n* - Williams, John William Joseph. 1964. \"Algorithm 232: Heapsort.\" _Communications of the ACM_ 7 (6). New York, NY, USA: Association for Computing Machinery: 347\u201349. doi:[10.1145/512274.512284](https://doi.org/10.1145/512274.512284).\n* - Floyd, Robert W. 1964. \"Algorithm 245: Treesort.\" _Communications of the ACM_ 7 (12). New York, NY, USA: Association for Computing Machinery: 701. doi:[10.1145/355588.365103](https://doi.org/10.1145/355588.365103).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` index increment\n* @param {NonNegativeInteger} offsetY - `y` starting index\n* @returns {Float64Array} `x`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* dsort2hp( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction dsort2hp( N, order, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar parent;\n\tvar child;\n\tvar v1;\n\tvar v2;\n\tvar tx;\n\tvar ty;\n\tvar ix;\n\tvar iy;\n\tvar n;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t\toffsetX -= (N-1) * strideX;\n\t\toffsetY -= (N-1) * strideY;\n\t}\n\t// Set the initial heap size:\n\tn = N;\n\n\t// Specify an initial \"parent\" index for building the heap:\n\tparent = floor( N / 2 );\n\n\t// Continue looping until the array is sorted...\n\twhile ( true ) {\n\t\tif ( parent > 0 ) {\n\t\t\t// We need to build the heap...\n\t\t\tparent -= 1;\n\t\t\ttx = x[ offsetX+(parent*strideX) ];\n\t\t\tty = y[ offsetY+(parent*strideY) ];\n\t\t} else {\n\t\t\t// Reduce the heap size:\n\t\t\tn -= 1;\n\n\t\t\t// Check if the heap is empty, and, if so, we are finished sorting...\n\t\t\tif ( n === 0 ) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\t// Store the last heap value in a temporary variable in order to make room for the heap root being placed into its sorted position:\n\t\t\tix = offsetX + (n*strideX);\n\t\t\ttx = x[ ix ];\n\t\t\tiy = offsetY + (n*strideY);\n\t\t\tty = y[ iy ];\n\n\t\t\t// Move the heap root to its sorted position:\n\t\t\tx[ ix ] = x[ offsetX ];\n\t\t\ty[ iy ] = y[ offsetY ];\n\t\t}\n\t\t// We need to \"sift down\", pushing `t` down the heap to in order to replace the parent and satisfy the heap property...\n\n\t\t// Start at the parent index:\n\t\tj = parent;\n\n\t\t// Get the \"left\" child index:\n\t\tchild = (j*2) + 1;\n\n\t\twhile ( child < n ) {\n\t\t\t// Find the largest child...\n\t\t\tk = child + 1;\n\t\t\tif ( k < n ) {\n\t\t\t\tv1 = x[ offsetX+(k*strideX) ];\n\t\t\t\tv2 = x[ offsetX+(child*strideX) ];\n\n\t\t\t\t// Check if a \"right\" child exists and is \"bigger\"...\n\t\t\t\tif ( v1 > v2 || isnan( v1 ) || (v1 === v2 && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t\tchild += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if the largest child is bigger than `t`...\n\t\t\tv1 = x[ offsetX+(child*strideX) ];\n\t\t\tif ( v1 > tx || isnan( v1 ) || ( v1 === tx && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t// Insert the larger child value:\n\t\t\t\tx[ offsetX+(j*strideX) ] = v1;\n\t\t\t\ty[ offsetY+(j*strideY) ] = y[ offsetY+(child*strideY) ];\n\n\t\t\t\t// Update `j` to point to the child index:\n\t\t\t\tj = child;\n\n\t\t\t\t// Get the \"left\" child index and repeat...\n\t\t\t\tchild = (j*2) + 1;\n\t\t\t} else {\n\t\t\t\t// We've found `t`'s place in the heap...\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Insert `t` into the heap:\n\t\tx[ offsetX+(j*strideX) ] = tx;\n\t\ty[ offsetY+(j*strideY) ] = ty;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsort2hp;\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 dsort2hp = require( './dsort2hp.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsort2hp, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsort2hp;\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* Simultaneously sort two double-precision floating-point strided arrays based on the sort order of the first array using heapsort.\n*\n* @module @stdlib/blas/ext/base/dsort2hp\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsort2hp = require( '@stdlib/blas/ext/base/dsort2hp' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* dsort2hp( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsort2hp = require( '@stdlib/blas/ext/base/dsort2hp' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* dsort2hp( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 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 dsort2hp;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsort2hp = main;\n} else {\n\tdsort2hp = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsort2hp;\n\n// exports: { \"ndarray\": \"dsort2hp.ndarray\" }\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array using insertion sort.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` index increment\n* @returns {Float64Array} `x`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* dsort2ins( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction dsort2ins( N, order, x, strideX, y, strideY ) {\n\tvar flg;\n\tvar ix;\n\tvar jx;\n\tvar fx;\n\tvar lx;\n\tvar iy;\n\tvar jy;\n\tvar fy;\n\tvar ly;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t}\n\tif ( strideY < 0 ) {\n\t\tfy = (1-N) * strideY;\n\t\tly = 0;\n\t} else {\n\t\tfy = 0;\n\t\tly = (N-1) * strideY;\n\t}\n\tiy = fy + strideY;\n\n\tif ( strideX < 0 ) {\n\t\t// Traverse the strided array from right-to-left...\n\t\tfx = (1-N) * strideX; // first index\n\t\tlx = 0; // last index\n\t\tix = fx + strideX;\n\n\t\t// Sort in increasing order...\n\t\tfor ( i = 1; i < N; i++ ) {\n\t\t\tvx = x[ ix ];\n\t\t\tvy = y[ iy ];\n\n\t\t\t// Sort `NaN` values to the end (i.e., the left)...\n\t\t\tif ( isnan( vx ) ) {\n\t\t\t\tjx = ix;\n\t\t\t\tjy = iy;\n\n\t\t\t\t// Shift all values (including NaNs) to the left of the current element to the right...\n\t\t\t\twhile ( jx > lx ) {\n\t\t\t\t\tx[ jx ] = x[ jx+strideX ];\n\t\t\t\t\ty[ jy ] = y[ jy+strideY ];\n\t\t\t\t\tjx += strideX;\n\t\t\t\t\tjy += strideY;\n\t\t\t\t}\n\t\t\t\tx[ lx ] = vx;\n\t\t\t\ty[ ly ] = vy;\n\t\t\t} else {\n\t\t\t\tflg = isNegativeZero( vx );\n\t\t\t\tjx = ix - strideX;\n\t\t\t\tjy = iy - strideY;\n\n\t\t\t\t// Shift all larger values to the right of the current element to the left...\n\t\t\t\twhile ( jx <= fx ) {\n\t\t\t\t\tux = x[ jx ];\n\t\t\t\t\tif ( ux <= vx && !(flg && ux === vx && isNegativeZero( ux ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when last element is NaN)) are sorted to the left\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tx[ jx+strideX ] = ux;\n\t\t\t\t\ty[ jy+strideY ] = y[ jy ];\n\t\t\t\t\tjx -= strideX;\n\t\t\t\t\tjy -= strideY;\n\t\t\t\t}\n\t\t\t\tx[ jx+strideX ] = vx;\n\t\t\t\ty[ jy+strideY ] = vy;\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// Traverse the strided array from left-to-right...\n\tfx = 0; // first index\n\tlx = (N-1) * strideX; // last index\n\tix = fx + strideX;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < N; i++ ) {\n\t\tvx = x[ ix ];\n\t\tvy = y[ iy ];\n\n\t\t// Sort `NaN` values to the end...\n\t\tif ( isnan( vx ) ) {\n\t\t\tjx = ix;\n\t\t\tjy = iy;\n\n\t\t\t// Shift all values (including NaNs) to the right of the current element to the left...\n\t\t\twhile ( jx < lx ) {\n\t\t\t\tx[ jx ] = x[ jx+strideX ];\n\t\t\t\ty[ jy ] = y[ jy+strideY ];\n\t\t\t\tjx += strideX;\n\t\t\t\tjy += strideY;\n\t\t\t}\n\t\t\tx[ lx ] = vx;\n\t\t\ty[ ly ] = vy;\n\t\t} else {\n\t\t\tflg = isNegativeZero( vx );\n\t\t\tjx = ix - strideX;\n\t\t\tjy = iy - strideY;\n\n\t\t\t// Shift all larger values to the left of the current element to the right...\n\t\t\twhile ( jx >= fx ) {\n\t\t\t\tux = x[ jx ];\n\t\t\t\tif ( ux <= vx && !(flg && ux === vx && isNegativeZero( ux ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when first element is NaN)) are sorted to the right\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ jx+strideX ] = ux;\n\t\t\t\ty[ jy+strideY ] = y[ jy ];\n\t\t\t\tjx -= strideX;\n\t\t\t\tjy -= strideY;\n\t\t\t}\n\t\t\tx[ jx+strideX ] = vx;\n\t\t\ty[ jy+strideY ] = vy;\n\t\t\tix += strideX;\n\t\t\tiy += strideY;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsort2ins;\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array using insertion sort.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` index increment\n* @param {NonNegativeInteger} offsetY - `y` starting index\n* @returns {Float64Array} `x`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* dsort2ins( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction dsort2ins( N, order, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar flg;\n\tvar ix;\n\tvar jx;\n\tvar fx;\n\tvar lx;\n\tvar iy;\n\tvar jy;\n\tvar fy;\n\tvar ly;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t\toffsetX -= (N-1) * strideX;\n\t\toffsetY -= (N-1) * strideY;\n\t}\n\tfx = offsetX; // first index\n\tlx = fx + ((N-1)*strideX); // last index\n\tix = fx + strideX;\n\n\tfy = offsetY; // first index\n\tly = fy + ((N-1)*strideY); // last index\n\tiy = fy + strideY;\n\n\tif ( strideX < 0 ) {\n\t\t// Traverse the strided array from right-to-left...\n\n\t\t// Sort in increasing order...\n\t\tfor ( i = 1; i < N; i++ ) {\n\t\t\tvx = x[ ix ];\n\t\t\tvy = y[ iy ];\n\n\t\t\t// Sort `NaN` values to the end (i.e., the left)...\n\t\t\tif ( isnan( vx ) ) {\n\t\t\t\tjx = ix;\n\t\t\t\tjy = iy;\n\n\t\t\t\t// Shift all values (including NaNs) to the left of the current element to the right...\n\t\t\t\twhile ( jx > lx ) {\n\t\t\t\t\tx[ jx ] = x[ jx+strideX ];\n\t\t\t\t\ty[ jy ] = y[ jy+strideY ];\n\t\t\t\t\tjx += strideX;\n\t\t\t\t\tjy += strideY;\n\t\t\t\t}\n\t\t\t\tx[ lx ] = vx;\n\t\t\t\ty[ ly ] = vy;\n\t\t\t} else {\n\t\t\t\tflg = isNegativeZero( vx );\n\t\t\t\tjx = ix - strideX;\n\t\t\t\tjy = iy - strideY;\n\n\t\t\t\t// Shift all larger values to the right of the current element to the left...\n\t\t\t\twhile ( jx <= fx ) {\n\t\t\t\t\tux = x[ jx ];\n\t\t\t\t\tif ( ux <= vx && !(flg && ux === vx && isNegativeZero( ux ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when last element is NaN)) are sorted to the left\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tx[ jx+strideX ] = ux;\n\t\t\t\t\ty[ jy+strideY ] = y[ jy ];\n\t\t\t\t\tjx -= strideX;\n\t\t\t\t\tjy -= strideY;\n\t\t\t\t}\n\t\t\t\tx[ jx+strideX ] = vx;\n\t\t\t\ty[ jy+strideY ] = vy;\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// Traverse the strided array from left-to-right...\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < N; i++ ) {\n\t\tvx = x[ ix ];\n\t\tvy = y[ iy ];\n\n\t\t// Sort `NaN` values to the end...\n\t\tif ( isnan( vx ) ) {\n\t\t\tjx = ix;\n\t\t\tjy = iy;\n\n\t\t\t// Shift all values (including NaNs) to the right of the current element to the left...\n\t\t\twhile ( jx < lx ) {\n\t\t\t\tx[ jx ] = x[ jx+strideX ];\n\t\t\t\ty[ jy ] = y[ jy+strideY ];\n\t\t\t\tjx += strideX;\n\t\t\t\tjy += strideY;\n\t\t\t}\n\t\t\tx[ lx ] = vx;\n\t\t\ty[ ly ] = vy;\n\t\t} else {\n\t\t\tflg = isNegativeZero( vx );\n\t\t\tjx = ix - strideX;\n\t\t\tjy = iy - strideY;\n\n\t\t\t// Shift all larger values to the left of the current element to the right...\n\t\t\twhile ( jx >= fx ) {\n\t\t\t\tux = x[ jx ];\n\t\t\t\tif ( ux <= vx && !(flg && ux === vx && isNegativeZero( ux ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when first element is NaN)) are sorted to the right\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ jx+strideX ] = ux;\n\t\t\t\ty[ jy+strideY ] = y[ jy ];\n\t\t\t\tjx -= strideX;\n\t\t\t\tjy -= strideY;\n\t\t\t}\n\t\t\tx[ jx+strideX ] = vx;\n\t\t\ty[ jy+strideY ] = vy;\n\t\t\tix += strideX;\n\t\t\tiy += strideY;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsort2ins;\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 dsort2ins = require( './dsort2ins.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsort2ins, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsort2ins;\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* Simultaneously sort two double-precision floating-point strided arrays based on the sort order of the first array using insertion sort.\n*\n* @module @stdlib/blas/ext/base/dsort2ins\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsort2ins = require( '@stdlib/blas/ext/base/dsort2ins' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* dsort2ins( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsort2ins = require( '@stdlib/blas/ext/base/dsort2ins' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* dsort2ins( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 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 dsort2ins;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsort2ins = main;\n} else {\n\tdsort2ins = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsort2ins;\n\n// exports: { \"ndarray\": \"dsort2ins.ndarray\" }\n", "[701,301,132,57,23,10,4,1]\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar GAPS = require( './gaps.json' );\n\n\n// VARIABLES //\n\nvar NGAPS = GAPS.length;\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array using Shellsort.\n*\n* ## Notes\n*\n* - This implementation uses the gap sequence proposed by Ciura (2001).\n*\n* ## References\n*\n* - Shell, Donald L. 1959. \"A High-Speed Sorting Procedure.\" _Communications of the ACM_ 2 (7). Association for Computing Machinery: 30\u201332. doi:[10.1145/368370.368387](https://doi.org/10.1145/368370.368387).\n* - Ciura, Marcin. 2001. \"Best Increments for the Average Case of Shellsort.\" In _Fundamentals of Computation Theory_, 106\u201317. Springer Berlin Heidelberg. doi:[10.1007/3-540-44669-9\\_12](https://doi.org/10.1007/3-540-44669-9_12).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` index increment\n* @returns {Float64Array} `x`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* dsort2sh( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction dsort2sh( N, order, x, strideX, y, strideY ) {\n\tvar offsetX;\n\tvar offsetY;\n\tvar flg;\n\tvar gap;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t}\n\tif ( strideX < 0 ) {\n\t\toffsetX = (1-N) * strideX;\n\t} else {\n\t\toffsetX = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\toffsetY = (1-N) * strideY;\n\t} else {\n\t\toffsetY = 0;\n\t}\n\tfor ( i = 0; i < NGAPS; i++ ) {\n\t\tgap = GAPS[ i ];\n\t\tfor ( j = gap; j < N; j++ ) {\n\t\t\tvx = x[ offsetX+(j*strideX) ];\n\n\t\t\t// If `NaN`, the current value is already sorted to its place...\n\t\t\tif ( isnan( vx ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvy = y[ offsetY+(j*strideY) ];\n\n\t\t\t// Perform insertion sort on the \"gapped\" subarray...\n\t\t\tflg = isNegativeZero( vx );\n\t\t\tfor ( k = j; k >= gap; k -= gap ) {\n\t\t\t\tux = x[ offsetX+((k-gap)*strideX) ];\n\t\t\t\tif ( ux <= vx && !(flg && ux === vx) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ offsetX+(k*strideX) ] = ux;\n\t\t\t\ty[ offsetY+(k*strideY) ] = y[ offsetY+((k-gap)*strideY) ];\n\t\t\t}\n\t\t\tx[ offsetX+(k*strideX) ] = vx;\n\t\t\ty[ offsetY+(k*strideY) ] = vy;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsort2sh;\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar GAPS = require( './gaps.json' );\n\n\n// VARIABLES //\n\nvar NGAPS = GAPS.length;\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array using Shellsort.\n*\n* ## Notes\n*\n* - This implementation uses the gap sequence proposed by Ciura (2001).\n*\n* ## References\n*\n* - Shell, Donald L. 1959. \"A High-Speed Sorting Procedure.\" _Communications of the ACM_ 2 (7). Association for Computing Machinery: 30\u201332. doi:[10.1145/368370.368387](https://doi.org/10.1145/368370.368387).\n* - Ciura, Marcin. 2001. \"Best Increments for the Average Case of Shellsort.\" In _Fundamentals of Computation Theory_, 106\u201317. Springer Berlin Heidelberg. doi:[10.1007/3-540-44669-9\\_12](https://doi.org/10.1007/3-540-44669-9_12).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` index increment\n* @param {NonNegativeInteger} offsetY - `y` starting index\n* @returns {Float64Array} `x`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* dsort2sh( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction dsort2sh( N, order, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar flg;\n\tvar gap;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t\toffsetX -= (N-1) * strideX;\n\t\toffsetY -= (N-1) * strideY;\n\t}\n\tfor ( i = 0; i < NGAPS; i++ ) {\n\t\tgap = GAPS[ i ];\n\t\tfor ( j = gap; j < N; j++ ) {\n\t\t\tvx = x[ offsetX+(j*strideX) ];\n\n\t\t\t// If `NaN`, the current value is already sorted to its place...\n\t\t\tif ( isnan( vx ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvy = y[ offsetY+(j*strideY) ];\n\n\t\t\t// Perform insertion sort on the \"gapped\" subarray...\n\t\t\tflg = isNegativeZero( vx );\n\t\t\tfor ( k = j; k >= gap; k -= gap ) {\n\t\t\t\tux = x[ offsetX+((k-gap)*strideX) ];\n\t\t\t\tif ( ux <= vx && !(flg && ux === vx) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ offsetX+(k*strideX) ] = ux;\n\t\t\t\ty[ offsetY+(k*strideY) ] = y[ offsetY+((k-gap)*strideY) ];\n\t\t\t}\n\t\t\tx[ offsetX+(k*strideX) ] = vx;\n\t\t\ty[ offsetY+(k*strideY) ] = vy;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsort2sh;\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 dsort2sh = require( './dsort2sh.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsort2sh, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsort2sh;\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* Simultaneously sort two double-precision floating-point strided arrays based on the sort order of the first array using Shellsort.\n*\n* @module @stdlib/blas/ext/base/dsort2sh\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsort2sh = require( '@stdlib/blas/ext/base/dsort2sh' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* dsort2sh( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsort2sh = require( '@stdlib/blas/ext/base/dsort2sh' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* dsort2sh( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 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 dsort2sh;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsort2sh = main;\n} else {\n\tdsort2sh = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsort2sh;\n\n// exports: { \"ndarray\": \"dsort2sh.ndarray\" }\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 isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// MAIN //\n\n/**\n* Sorts a double-precision floating-point strided array using heapsort.\n*\n* ## Notes\n*\n* - This implementation uses an in-place algorithm derived from the work of Floyd (1964).\n*\n* ## References\n*\n* - Williams, John William Joseph. 1964. \"Algorithm 232: Heapsort.\" _Communications of the ACM_ 7 (6). New York, NY, USA: Association for Computing Machinery: 347\u201349. doi:[10.1145/512274.512284](https://doi.org/10.1145/512274.512284).\n* - Floyd, Robert W. 1964. \"Algorithm 245: Treesort.\" _Communications of the ACM_ 7 (12). New York, NY, USA: Association for Computing Machinery: 701. doi:[10.1145/355588.365103](https://doi.org/10.1145/355588.365103).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* dsorthp( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction dsorthp( N, order, x, stride ) {\n\tvar offset;\n\tvar parent;\n\tvar child;\n\tvar v1;\n\tvar v2;\n\tvar n;\n\tvar t;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t}\n\tif ( stride < 0 ) {\n\t\toffset = (1-N) * stride;\n\t} else {\n\t\toffset = 0;\n\t}\n\t// Set the initial heap size:\n\tn = N;\n\n\t// Specify an initial \"parent\" index for building the heap:\n\tparent = floor( N / 2 );\n\n\t// Continue looping until the array is sorted...\n\twhile ( true ) {\n\t\tif ( parent > 0 ) {\n\t\t\t// We need to build the heap...\n\t\t\tparent -= 1;\n\t\t\tt = x[ offset+(parent*stride) ];\n\t\t} else {\n\t\t\t// Reduce the heap size:\n\t\t\tn -= 1;\n\n\t\t\t// Check if the heap is empty, and, if so, we are finished sorting...\n\t\t\tif ( n === 0 ) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\t// Store the last heap value in a temporary variable in order to make room for the heap root being placed into its sorted position:\n\t\t\ti = offset + (n*stride);\n\t\t\tt = x[ i ];\n\n\t\t\t// Move the heap root to its sorted position:\n\t\t\tx[ i ] = x[ offset ];\n\t\t}\n\t\t// We need to \"sift down\", pushing `t` down the heap to in order to replace the parent and satisfy the heap property...\n\n\t\t// Start at the parent index:\n\t\tj = parent;\n\n\t\t// Get the \"left\" child index:\n\t\tchild = (j*2) + 1;\n\n\t\twhile ( child < n ) {\n\t\t\t// Find the largest child...\n\t\t\tk = child + 1;\n\t\t\tif ( k < n ) {\n\t\t\t\tv1 = x[ offset+(k*stride) ];\n\t\t\t\tv2 = x[ offset+(child*stride) ];\n\n\t\t\t\t// Check if a \"right\" child exists and is \"bigger\"...\n\t\t\t\tif ( v1 > v2 || isnan( v1 ) || (v1 === v2 && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t\tchild += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if the largest child is bigger than `t`...\n\t\t\tv1 = x[ offset+(child*stride) ];\n\t\t\tif ( v1 > t || isnan( v1 ) || ( v1 === t && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t// Insert the larger child value:\n\t\t\t\tx[ offset+(j*stride) ] = v1;\n\n\t\t\t\t// Update `j` to point to the child index:\n\t\t\t\tj = child;\n\n\t\t\t\t// Get the \"left\" child index and repeat...\n\t\t\t\tchild = (j*2) + 1;\n\t\t\t} else {\n\t\t\t\t// We've found `t`'s place in the heap...\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Insert `t` into the heap:\n\t\tx[ offset+(j*stride) ] = t;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsorthp;\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 isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// MAIN //\n\n/**\n* Sorts a double-precision floating-point strided array using heapsort.\n*\n* ## Notes\n*\n* - This implementation uses an in-place algorithm derived from the work of Floyd (1964).\n*\n* ## References\n*\n* - Williams, John William Joseph. 1964. \"Algorithm 232: Heapsort.\" _Communications of the ACM_ 7 (6). New York, NY, USA: Association for Computing Machinery: 347\u201349. doi:[10.1145/512274.512284](https://doi.org/10.1145/512274.512284).\n* - Floyd, Robert W. 1964. \"Algorithm 245: Treesort.\" _Communications of the ACM_ 7 (12). New York, NY, USA: Association for Computing Machinery: 701. doi:[10.1145/355588.365103](https://doi.org/10.1145/355588.365103).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* dsorthp( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction dsorthp( N, order, x, stride, offset ) {\n\tvar parent;\n\tvar child;\n\tvar v1;\n\tvar v2;\n\tvar n;\n\tvar t;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t\toffset -= (N-1) * stride;\n\t}\n\t// Set the initial heap size:\n\tn = N;\n\n\t// Specify an initial \"parent\" index for building the heap:\n\tparent = floor( N / 2 );\n\n\t// Continue looping until the array is sorted...\n\twhile ( true ) {\n\t\tif ( parent > 0 ) {\n\t\t\t// We need to build the heap...\n\t\t\tparent -= 1;\n\t\t\tt = x[ offset+(parent*stride) ];\n\t\t} else {\n\t\t\t// Reduce the heap size:\n\t\t\tn -= 1;\n\n\t\t\t// Check if the heap is empty, and, if so, we are finished sorting...\n\t\t\tif ( n === 0 ) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\t// Store the last heap value in a temporary variable in order to make room for the heap root being placed into its sorted position:\n\t\t\ti = offset + (n*stride);\n\t\t\tt = x[ i ];\n\n\t\t\t// Move the heap root to its sorted position:\n\t\t\tx[ i ] = x[ offset ];\n\t\t}\n\t\t// We need to \"sift down\", pushing `t` down the heap to in order to replace the parent and satisfy the heap property...\n\n\t\t// Start at the parent index:\n\t\tj = parent;\n\n\t\t// Get the \"left\" child index:\n\t\tchild = (j*2) + 1;\n\n\t\twhile ( child < n ) {\n\t\t\t// Find the largest child...\n\t\t\tk = child + 1;\n\t\t\tif ( k < n ) {\n\t\t\t\tv1 = x[ offset+(k*stride) ];\n\t\t\t\tv2 = x[ offset+(child*stride) ];\n\n\t\t\t\t// Check if a \"right\" child exists and is \"bigger\"...\n\t\t\t\tif ( v1 > v2 || isnan( v1 ) || (v1 === v2 && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t\tchild += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if the largest child is bigger than `t`...\n\t\t\tv1 = x[ offset+(child*stride) ];\n\t\t\tif ( v1 > t || isnan( v1 ) || ( v1 === t && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t// Insert the larger child value:\n\t\t\t\tx[ offset+(j*stride) ] = v1;\n\n\t\t\t\t// Update `j` to point to the child index:\n\t\t\t\tj = child;\n\n\t\t\t\t// Get the \"left\" child index and repeat...\n\t\t\t\tchild = (j*2) + 1;\n\t\t\t} else {\n\t\t\t\t// We've found `t`'s place in the heap...\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Insert `t` into the heap:\n\t\tx[ offset+(j*stride) ] = t;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsorthp;\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 dsorthp = require( './dsorthp.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsorthp, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsorthp;\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* Sort a double-precision floating-point strided array using heapsort.\n*\n* @module @stdlib/blas/ext/base/dsorthp\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsorthp = require( '@stdlib/blas/ext/base/dsorthp' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* dsorthp( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsorthp = require( '@stdlib/blas/ext/base/dsorthp' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* dsorthp.ndarray( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.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 dsorthp;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsorthp = main;\n} else {\n\tdsorthp = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsorthp;\n\n// exports: { \"ndarray\": \"dsorthp.ndarray\" }\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Sorts a double-precision floating-point strided array using insertion sort.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* dsortins( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction dsortins( N, order, x, stride ) {\n\tvar flg;\n\tvar ix;\n\tvar jx;\n\tvar fx;\n\tvar lx;\n\tvar v;\n\tvar u;\n\tvar i;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t}\n\tif ( stride < 0 ) {\n\t\t// Traverse the strided array from right-to-left...\n\t\tfx = (1-N) * stride; // first index\n\t\tlx = 0; // last index\n\t\tix = fx + stride;\n\n\t\t// Sort in increasing order...\n\t\tfor ( i = 1; i < N; i++ ) {\n\t\t\tv = x[ ix ];\n\n\t\t\t// Sort `NaN` values to the end (i.e., the left)...\n\t\t\tif ( isnan( v ) ) {\n\t\t\t\tjx = ix;\n\n\t\t\t\t// Shift all values (including NaNs) to the left of the current element to the right...\n\t\t\t\twhile ( jx > lx ) {\n\t\t\t\t\tx[ jx ] = x[ jx+stride ];\n\t\t\t\t\tjx += stride;\n\t\t\t\t}\n\t\t\t\tx[ lx ] = v;\n\t\t\t} else {\n\t\t\t\tflg = isNegativeZero( v );\n\t\t\t\tjx = ix - stride;\n\n\t\t\t\t// Shift all larger values to the right of the current element to the left...\n\t\t\t\twhile ( jx <= fx ) {\n\t\t\t\t\tu = x[ jx ];\n\t\t\t\t\tif ( u <= v && !(flg && u === v && isNegativeZero( u ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when last element is NaN)) are sorted to the left\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tx[ jx+stride ] = u;\n\t\t\t\t\tjx -= stride;\n\t\t\t\t}\n\t\t\t\tx[ jx+stride ] = v;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// Traverse the strided array from left-to-right...\n\tfx = 0; // first index\n\tlx = (N-1) * stride; // last index\n\tix = fx + stride;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < N; i++ ) {\n\t\tv = x[ ix ];\n\n\t\t// Sort `NaN` values to the end...\n\t\tif ( isnan( v ) ) {\n\t\t\tjx = ix;\n\n\t\t\t// Shift all values (including NaNs) to the right of the current element to the left...\n\t\t\twhile ( jx < lx ) {\n\t\t\t\tx[ jx ] = x[ jx+stride ];\n\t\t\t\tjx += stride;\n\t\t\t}\n\t\t\tx[ lx ] = v;\n\t\t} else {\n\t\t\tflg = isNegativeZero( v );\n\t\t\tjx = ix - stride;\n\n\t\t\t// Shift all larger values to the left of the current element to the right...\n\t\t\twhile ( jx >= fx ) {\n\t\t\t\tu = x[ jx ];\n\t\t\t\tif ( u <= v && !(flg && u === v && isNegativeZero( u ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when first element is NaN)) are sorted to the right\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ jx+stride ] = u;\n\t\t\t\tjx -= stride;\n\t\t\t}\n\t\t\tx[ jx+stride ] = v;\n\t\t\tix += stride;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsortins;\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Sorts a double-precision floating-point strided array using insertion sort.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* dsortins( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction dsortins( N, order, x, stride, offset ) {\n\tvar flg;\n\tvar ix;\n\tvar jx;\n\tvar fx;\n\tvar lx;\n\tvar v;\n\tvar u;\n\tvar i;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t\toffset -= (N-1) * stride;\n\t}\n\tfx = offset; // first index\n\tlx = fx + ((N-1)*stride); // last index\n\tix = fx + stride;\n\n\tif ( stride < 0 ) {\n\t\t// Traverse the strided array from right-to-left...\n\n\t\t// Sort in increasing order...\n\t\tfor ( i = 1; i < N; i++ ) {\n\t\t\tv = x[ ix ];\n\n\t\t\t// Sort `NaN` values to the end (i.e., the left)...\n\t\t\tif ( isnan( v ) ) {\n\t\t\t\tjx = ix;\n\n\t\t\t\t// Shift all values (including NaNs) to the left of the current element to the right...\n\t\t\t\twhile ( jx > lx ) {\n\t\t\t\t\tx[ jx ] = x[ jx+stride ];\n\t\t\t\t\tjx += stride;\n\t\t\t\t}\n\t\t\t\tx[ lx ] = v;\n\t\t\t} else {\n\t\t\t\tflg = isNegativeZero( v );\n\t\t\t\tjx = ix - stride;\n\n\t\t\t\t// Shift all larger values to the right of the current element to the left...\n\t\t\t\twhile ( jx <= fx ) {\n\t\t\t\t\tu = x[ jx ];\n\t\t\t\t\tif ( u <= v && !(flg && u === v && isNegativeZero( u ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when last element is NaN)) are sorted to the left\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tx[ jx+stride ] = u;\n\t\t\t\t\tjx -= stride;\n\t\t\t\t}\n\t\t\t\tx[ jx+stride ] = v;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// Traverse the strided array from left-to-right...\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < N; i++ ) {\n\t\tv = x[ ix ];\n\n\t\t// Sort `NaN` values to the end...\n\t\tif ( isnan( v ) ) {\n\t\t\tjx = ix;\n\n\t\t\t// Shift all values (including NaNs) to the right of the current element to the left...\n\t\t\twhile ( jx < lx ) {\n\t\t\t\tx[ jx ] = x[ jx+stride ];\n\t\t\t\tjx += stride;\n\t\t\t}\n\t\t\tx[ lx ] = v;\n\t\t} else {\n\t\t\tflg = isNegativeZero( v );\n\t\t\tjx = ix - stride;\n\n\t\t\t// Shift all larger values to the left of the current element to the right...\n\t\t\twhile ( jx >= fx ) {\n\t\t\t\tu = x[ jx ];\n\t\t\t\tif ( u <= v && !(flg && u === v && isNegativeZero( u ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when first element is NaN)) are sorted to the right\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ jx+stride ] = u;\n\t\t\t\tjx -= stride;\n\t\t\t}\n\t\t\tx[ jx+stride ] = v;\n\t\t\tix += stride;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsortins;\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 dsortins = require( './dsortins.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsortins, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsortins;\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* Sort a double-precision floating-point strided array using insertion sort.\n*\n* @module @stdlib/blas/ext/base/dsortins\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsortins = require( '@stdlib/blas/ext/base/dsortins' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* dsortins( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsortins = require( '@stdlib/blas/ext/base/dsortins' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* dsortins.ndarray( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.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 dsortins;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsortins = main;\n} else {\n\tdsortins = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsortins;\n\n// exports: { \"ndarray\": \"dsortins.ndarray\" }\n", "[701,301,132,57,23,10,4,1]\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar GAPS = require( './gaps.json' );\n\n\n// VARIABLES //\n\nvar NGAPS = GAPS.length;\n\n\n// MAIN //\n\n/**\n* Sorts a double-precision floating-point strided array using Shellsort.\n*\n* ## Notes\n*\n* - This implementation uses the gap sequence proposed by Ciura (2001).\n*\n* ## References\n*\n* - Shell, Donald L. 1959. \"A High-Speed Sorting Procedure.\" _Communications of the ACM_ 2 (7). Association for Computing Machinery: 30\u201332. doi:[10.1145/368370.368387](https://doi.org/10.1145/368370.368387).\n* - Ciura, Marcin. 2001. \"Best Increments for the Average Case of Shellsort.\" In _Fundamentals of Computation Theory_, 106\u201317. Springer Berlin Heidelberg. doi:[10.1007/3-540-44669-9\\_12](https://doi.org/10.1007/3-540-44669-9_12).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* dsortsh( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction dsortsh( N, order, x, stride ) {\n\tvar offset;\n\tvar flg;\n\tvar gap;\n\tvar v;\n\tvar u;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t}\n\tif ( stride < 0 ) {\n\t\toffset = (1-N) * stride;\n\t} else {\n\t\toffset = 0;\n\t}\n\tfor ( i = 0; i < NGAPS; i++ ) {\n\t\tgap = GAPS[ i ];\n\t\tfor ( j = gap; j < N; j++ ) {\n\t\t\tv = x[ offset+(j*stride) ];\n\n\t\t\t// If `NaN`, the current value is already sorted to its place...\n\t\t\tif ( isnan( v ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Perform insertion sort on the \"gapped\" subarray...\n\t\t\tflg = isNegativeZero( v );\n\t\t\tfor ( k = j; k >= gap; k -= gap ) {\n\t\t\t\tu = x[ offset+((k-gap)*stride) ];\n\t\t\t\tif ( u <= v && !(flg && u === v) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ offset+(k*stride) ] = u;\n\t\t\t}\n\t\t\tx[ offset+(k*stride) ] = v;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsortsh;\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar GAPS = require( './gaps.json' );\n\n\n// VARIABLES //\n\nvar NGAPS = GAPS.length;\n\n\n// MAIN //\n\n/**\n* Sorts a double-precision floating-point strided array using Shellsort.\n*\n* ## Notes\n*\n* - This implementation uses the gap sequence proposed by Ciura (2001).\n*\n* ## References\n*\n* - Shell, Donald L. 1959. \"A High-Speed Sorting Procedure.\" _Communications of the ACM_ 2 (7). Association for Computing Machinery: 30\u201332. doi:[10.1145/368370.368387](https://doi.org/10.1145/368370.368387).\n* - Ciura, Marcin. 2001. \"Best Increments for the Average Case of Shellsort.\" In _Fundamentals of Computation Theory_, 106\u201317. Springer Berlin Heidelberg. doi:[10.1007/3-540-44669-9\\_12](https://doi.org/10.1007/3-540-44669-9_12).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* dsortsh( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction dsortsh( N, order, x, stride, offset ) {\n\tvar flg;\n\tvar gap;\n\tvar v;\n\tvar u;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t\toffset -= (N-1) * stride;\n\t}\n\tfor ( i = 0; i < NGAPS; i++ ) {\n\t\tgap = GAPS[ i ];\n\t\tfor ( j = gap; j < N; j++ ) {\n\t\t\tv = x[ offset+(j*stride) ];\n\n\t\t\t// If `NaN`, the current value is already sorted to its place...\n\t\t\tif ( isnan( v ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Perform insertion sort on the \"gapped\" subarray...\n\t\t\tflg = isNegativeZero( v );\n\t\t\tfor ( k = j; k >= gap; k -= gap ) {\n\t\t\t\tu = x[ offset+((k-gap)*stride) ];\n\t\t\t\tif ( u <= v && !(flg && u === v) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ offset+(k*stride) ] = u;\n\t\t\t}\n\t\t\tx[ offset+(k*stride) ] = v;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsortsh;\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 dsortsh = require( './dsortsh.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsortsh, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsortsh;\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* Sort a double-precision floating-point strided array using Shellsort.\n*\n* @module @stdlib/blas/ext/base/dsortsh\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsortsh = require( '@stdlib/blas/ext/base/dsortsh' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* dsortsh( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsortsh = require( '@stdlib/blas/ext/base/dsortsh' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* dsortsh.ndarray( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.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 dsortsh;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsortsh = main;\n} else {\n\tdsortsh = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsortsh;\n\n// exports: { \"ndarray\": \"dsortsh.ndarray\" }\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 floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using pairwise summation with extended accumulation and returning an extended precision result.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dssumpw( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dssumpw( N, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = x[ ix ];\n\t\ts1 = x[ ix+stride ];\n\t\ts2 = x[ ix+(2*stride) ];\n\t\ts3 = x[ ix+(3*stride) ];\n\t\ts4 = x[ ix+(4*stride) ];\n\t\ts5 = x[ ix+(5*stride) ];\n\t\ts6 = x[ ix+(6*stride) ];\n\t\ts7 = x[ ix+(7*stride) ];\n\t\tix += 8 * stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += x[ ix ];\n\t\t\ts1 += x[ ix+stride ];\n\t\t\ts2 += x[ ix+(2*stride) ];\n\t\t\ts3 += x[ ix+(3*stride) ];\n\t\t\ts4 += x[ ix+(4*stride) ];\n\t\t\ts5 += x[ ix+(5*stride) ];\n\t\t\ts6 += x[ ix+(6*stride) ];\n\t\t\ts7 += x[ ix+(7*stride) ];\n\t\t\tix += 8 * stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn dssumpw( n, x, stride, ix ) + dssumpw( N-n, x, stride, ix+(n*stride) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = dssumpw;\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 sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using pairwise summation with extended accumulation and returning an extended precision result.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dssumpw( N, x, 1 );\n* // returns 1.0\n*/\nfunction dssumpw( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dssumpw;\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 dssumpw = require( './dssumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dssumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dssumpw;\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* Compute the sum of single-precision floating-point strided array elements using pairwise summation with extended accumulation and returning an extended precision result.\n*\n* @module @stdlib/blas/ext/base/dssumpw\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var dssumpw = require( '@stdlib/blas/ext/base/dssumpw' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dssumpw( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dssumpw = require( '@stdlib/blas/ext/base/dssumpw' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dssumpw.ndarray( N, x, 2, 1 );\n* // returns 5.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 dssumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdssumpw = main;\n} else {\n\tdssumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dssumpw;\n\n// exports: { \"ndarray\": \"dssumpw.ndarray\" }\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 dssumpw = require( './../../../../ext/base/dssumpw' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using extended accumulation and returning an extended precision result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dssum( N, x, 1 );\n* // returns 1.0\n*/\nfunction dssum( N, x, stride ) {\n\treturn dssumpw( N, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dssum;\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 dssumpw = require( './../../../../ext/base/dssumpw' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using extended accumulation and returning an extended precision result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dssum( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dssum( N, x, stride, offset ) {\n\treturn dssumpw( N, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dssum;\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 dssum = require( './dssum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dssum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dssum;\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* Compute the sum of single-precision floating-point strided array elements using extended accumulation and returning an extended precision result.\n*\n* @module @stdlib/blas/ext/base/dssum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var dssum = require( '@stdlib/blas/ext/base/dssum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dssum( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dssum = require( '@stdlib/blas/ext/base/dssum' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dssum.ndarray( N, x, 2, 1 );\n* // returns 5.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 dssum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdssum = main;\n} else {\n\tdssum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dssum;\n\n// exports: { \"ndarray\": \"dssum.ndarray\" }\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// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using ordinary recursive summation with extended accumulation and returning an extended precision result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dssumors( N, x, 1 );\n* // returns 1.0\n*/\nfunction dssumors( N, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\t// If the stride is equal to `1`, use unrolled loops...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tsum += x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn sum;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tsum += x[i] + x[i+1] + x[i+2] + x[i+3] + x[i+4] + x[i+5];\n\t\t}\n\t\treturn sum;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += x[ ix ];\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dssumors;\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// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using ordinary recursive summation with extended accumulation and returning an extended precision result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dssumors( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dssumors( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\n\t// If the stride is equal to `1`, use unrolled loops...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tsum += x[ ix ];\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn sum;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tsum += x[ix] + x[ix+1] + x[ix+2] + x[ix+3] + x[ix+4] + x[ix+5];\n\t\t\tix += M;\n\t\t}\n\t\treturn sum;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += x[ ix ];\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dssumors;\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 dssumors = require( './dssumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dssumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dssumors;\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* Compute the sum of single-precision floating-point strided array elements using ordinary recursive summation with extended accumulation and returning an extended precision result.\n*\n* @module @stdlib/blas/ext/base/dssumors\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var dssumors = require( '@stdlib/blas/ext/base/dssumors' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dssumors( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dssumors = require( '@stdlib/blas/ext/base/dssumors' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dssumors.ndarray( N, x, 2, 1 );\n* // returns 5.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 dssumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdssumors = main;\n} else {\n\tdssumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dssumors;\n\n// exports: { \"ndarray\": \"dssumors.ndarray\" }\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsumkbn( N, x, 1 );\n* // returns 1.0\n*/\nfunction dsumkbn( N, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc += (sum-t) + v;\n\t\t} else {\n\t\t\tc += (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tix += stride;\n\t}\n\treturn sum + c;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsumkbn;\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsumkbn( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dsumkbn( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc += (sum-t) + v;\n\t\t} else {\n\t\t\tc += (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tix += stride;\n\t}\n\treturn sum + c;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsumkbn;\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 dsumkbn = require( './dsumkbn.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsumkbn, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsumkbn;\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* Compute the sum of double-precision floating-point strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/dsumkbn\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsumkbn = require( '@stdlib/blas/ext/base/dsumkbn' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsumkbn( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dsumkbn = require( '@stdlib/blas/ext/base/dsumkbn' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsumkbn.ndarray( N, x, 2, 1 );\n* // returns 5.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 dsumkbn;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsumkbn = main;\n} else {\n\tdsumkbn = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsumkbn;\n\n// exports: { \"ndarray\": \"dsumkbn.ndarray\" }\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 dsumkbn = require( './../../../../ext/base/dsumkbn' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsum( N, x, 1 );\n* // returns 1.0\n*/\nfunction dsum( N, x, stride ) {\n\treturn dsumkbn( N, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsum;\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 dsumkbn = require( './../../../../ext/base/dsumkbn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsum( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dsum( N, x, stride, offset ) {\n\treturn dsumkbn( N, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsum;\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 dsum = require( './dsum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsum;\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* Compute the sum of double-precision floating-point strided array elements.\n*\n* @module @stdlib/blas/ext/base/dsum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsum = require( '@stdlib/blas/ext/base/dsum' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsum( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dsum = require( '@stdlib/blas/ext/base/dsum' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsum.ndarray( N, x, 2, 1 );\n* // returns 5.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 dsum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsum = main;\n} else {\n\tdsum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsum;\n\n// exports: { \"ndarray\": \"dsum.ndarray\" }\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsumkbn2( N, x, 1 );\n* // returns 1.0\n*/\nfunction dsumkbn2( N, x, stride ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = (sum-t) + v;\n\t\t} else {\n\t\t\tc = (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tt = cs + c;\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = (cs-t) + c;\n\t\t} else {\n\t\t\tcc = (c-t) + cs;\n\t\t}\n\t\tcs = t;\n\t\tccs += cc;\n\t\tix += stride;\n\t}\n\treturn sum + cs + ccs;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsumkbn2;\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsumkbn2( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dsumkbn2( N, x, stride, offset ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = (sum-t) + v;\n\t\t} else {\n\t\t\tc = (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tt = cs + c;\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = (cs-t) + c;\n\t\t} else {\n\t\t\tcc = (c-t) + cs;\n\t\t}\n\t\tcs = t;\n\t\tccs += cc;\n\t\tix += stride;\n\t}\n\treturn sum + cs + ccs;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsumkbn2;\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 dsumkbn2 = require( './dsumkbn2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsumkbn2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsumkbn2;\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* Compute the sum of double-precision floating-point strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/dsumkbn2\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsumkbn2 = require( '@stdlib/blas/ext/base/dsumkbn2' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsumkbn2( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dsumkbn2 = require( '@stdlib/blas/ext/base/dsumkbn2' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsumkbn2.ndarray( N, x, 2, 1 );\n* // returns 5.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 dsumkbn2;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsumkbn2 = main;\n} else {\n\tdsumkbn2 = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsumkbn2;\n\n// exports: { \"ndarray\": \"dsumkbn2.ndarray\" }\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// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsumors( N, x, 1 );\n* // returns 1.0\n*/\nfunction dsumors( N, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\t// If the stride is equal to `1`, use unrolled loops...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tsum += x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn sum;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tsum += x[i] + x[i+1] + x[i+2] + x[i+3] + x[i+4] + x[i+5];\n\t\t}\n\t\treturn sum;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += x[ ix ];\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsumors;\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// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsumors( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dsumors( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\n\t// If the stride is equal to `1`, use unrolled loops...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tsum += x[ ix ];\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn sum;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tsum += x[ix] + x[ix+1] + x[ix+2] + x[ix+3] + x[ix+4] + x[ix+5];\n\t\t\tix += M;\n\t\t}\n\t\treturn sum;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += x[ ix ];\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsumors;\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 dsumors = require( './dsumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsumors;\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* Compute the sum of double-precision floating-point strided array elements using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/dsumors\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsumors = require( '@stdlib/blas/ext/base/dsumors' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsumors( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dsumors = require( '@stdlib/blas/ext/base/dsumors' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsumors.ndarray( N, x, 2, 1 );\n* // returns 5.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 dsumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsumors = main;\n} else {\n\tdsumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsumors;\n\n// exports: { \"ndarray\": \"dsumors.ndarray\" }\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 floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsumpw( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dsumpw( N, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = x[ ix ];\n\t\ts1 = x[ ix+stride ];\n\t\ts2 = x[ ix+(2*stride) ];\n\t\ts3 = x[ ix+(3*stride) ];\n\t\ts4 = x[ ix+(4*stride) ];\n\t\ts5 = x[ ix+(5*stride) ];\n\t\ts6 = x[ ix+(6*stride) ];\n\t\ts7 = x[ ix+(7*stride) ];\n\t\tix += 8 * stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += x[ ix ];\n\t\t\ts1 += x[ ix+stride ];\n\t\t\ts2 += x[ ix+(2*stride) ];\n\t\t\ts3 += x[ ix+(3*stride) ];\n\t\t\ts4 += x[ ix+(4*stride) ];\n\t\t\ts5 += x[ ix+(5*stride) ];\n\t\t\ts6 += x[ ix+(6*stride) ];\n\t\t\ts7 += x[ ix+(7*stride) ];\n\t\t\tix += 8 * stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn dsumpw( n, x, stride, ix ) + dsumpw( N-n, x, stride, ix+(n*stride) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsumpw;\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 sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsumpw( N, x, 1 );\n* // returns 1.0\n*/\nfunction dsumpw( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsumpw;\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 dsumpw = require( './dsumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsumpw;\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* Compute the sum of double-precision floating-point strided array elements using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/dsumpw\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dsumpw = require( '@stdlib/blas/ext/base/dsumpw' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = dsumpw( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dsumpw = require( '@stdlib/blas/ext/base/dsumpw' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = dsumpw.ndarray( N, x, 2, 1 );\n* // returns 5.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 dsumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsumpw = main;\n} else {\n\tdsumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsumpw;\n\n// exports: { \"ndarray\": \"dsumpw.ndarray\" }\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each element in a strided array.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gapx( x.length, 5.0, x, 1 );\n* // x => [ 3.0, 6.0, 8.0, 0.0, 9.0, 5.0, 4.0, 2.0 ]\n*/\nfunction gapx( N, alpha, x, stride ) {\n\tvar ix;\n\tvar i;\n\tvar m;\n\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ i ] += alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] += alpha;\n\t\t\tx[ i+1 ] += alpha;\n\t\t\tx[ i+2 ] += alpha;\n\t\t\tx[ i+3 ] += alpha;\n\t\t\tx[ i+4 ] += alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] += alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gapx;\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each element in a strided array.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ];\n* var alpha = 5.0;\n*\n* gapx( 3, alpha, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, 1.0, 10.0, -1.0 ]\n*/\nfunction gapx( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] += alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ ix ] += alpha;\n\t\t\tx[ ix+1 ] += alpha;\n\t\t\tx[ ix+2 ] += alpha;\n\t\t\tx[ ix+3 ] += alpha;\n\t\t\tx[ ix+4 ] += alpha;\n\t\t\tix += M;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] += alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gapx;\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* Add a constant to each element in a strided array.\n*\n* @module @stdlib/blas/ext/base/gapx\n*\n* @example\n* var gapx = require( '@stdlib/blas/ext/base/gapx' );\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gapx( x.length, 5.0, x, 1 );\n* // x => [ 3.0, 6.0, 8.0, 0.0, 9.0, 5.0, 4.0, 2.0 ]\n*\n* @example\n* var gapx = require( '@stdlib/blas/ext/base/gapx' );\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gapx.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ 3.0, 6.0, 8.0, 0.0, 9.0, 5.0, 4.0, 2.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", "/**\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each strided array element and computes the sum using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gapxsumkbn( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction gapxsumkbn( N, alpha, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = alpha + x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc += (sum-t) + v;\n\t\t} else {\n\t\t\tc += (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tix += stride;\n\t}\n\treturn sum + c;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gapxsumkbn;\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each strided array element and computes the sum using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gapxsumkbn( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction gapxsumkbn( N, alpha, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = alpha + x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc += (sum-t) + v;\n\t\t} else {\n\t\t\tc += (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tix += stride;\n\t}\n\treturn sum + c;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gapxsumkbn;\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* Add a constant to each strided array element and compute the sum using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/gapxsumkbn\n*\n* @example\n* var gapxsumkbn = require( '@stdlib/blas/ext/base/gapxsumkbn' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gapxsumkbn( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gapxsumkbn = require( '@stdlib/blas/ext/base/gapxsumkbn' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gapxsumkbn.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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", "/**\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 gapxsumkbn = require( './../../../../ext/base/gapxsumkbn' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each strided array element and computes the sum.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gapxsum( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction gapxsum( N, alpha, x, stride ) {\n\treturn gapxsumkbn( N, alpha, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gapxsum;\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 gapxsumkbn = require( './../../../../ext/base/gapxsumkbn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each strided array element and computes the sum.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gapxsum( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction gapxsum( N, alpha, x, stride, offset ) {\n\treturn gapxsumkbn( N, alpha, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gapxsum;\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* Add a constant to each strided array element and compute the sum.\n*\n* @module @stdlib/blas/ext/base/gapxsum\n*\n* @example\n* var gapxsum = require( '@stdlib/blas/ext/base/gapxsum' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gapxsum( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gapxsum = require( '@stdlib/blas/ext/base/gapxsum' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gapxsum.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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", "/**\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each strided array element and computes the sum using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gapxsumkbn2( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction gapxsumkbn2( N, alpha, x, stride ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = alpha + x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = (sum-t) + v;\n\t\t} else {\n\t\t\tc = (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tt = cs + c;\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = (cs-t) + c;\n\t\t} else {\n\t\t\tcc = (c-t) + cs;\n\t\t}\n\t\tcs = t;\n\t\tccs += cc;\n\t\tix += stride;\n\t}\n\treturn sum + cs + ccs;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gapxsumkbn2;\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each strided array element and computes the sum using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gapxsumkbn2( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction gapxsumkbn2( N, alpha, x, stride, offset ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ 0 ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = alpha + x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = (sum-t) + v;\n\t\t} else {\n\t\t\tc = (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tt = cs + c;\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = (cs-t) + c;\n\t\t} else {\n\t\t\tcc = (c-t) + cs;\n\t\t}\n\t\tcs = t;\n\t\tccs += cc;\n\t\tix += stride;\n\t}\n\treturn sum + cs + ccs;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gapxsumkbn2;\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* Add a constant to each strided array element and compute the sum using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/gapxsumkbn2\n*\n* @example\n* var gapxsumkbn2 = require( '@stdlib/blas/ext/base/gapxsumkbn2' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gapxsumkbn2( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gapxsumkbn2 = require( '@stdlib/blas/ext/base/gapxsumkbn2' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gapxsumkbn2.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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", "/**\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// MAIN //\n\n/**\n* Adds a constant to each strided array element and computes the sum using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gapxsumors( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction gapxsumors( N, alpha, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += alpha + x[ ix ];\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gapxsumors;\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// MAIN //\n\n/**\n* Adds a constant to each strided array element and computes the sum using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gapxsumors( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction gapxsumors( N, alpha, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += alpha + x[ ix ];\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gapxsumors;\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* Add a constant to each strided array element and compute the sum using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/gapxsumors\n*\n* @example\n* var gapxsumors = require( '@stdlib/blas/ext/base/gapxsumors' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gapxsumors( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gapxsumors = require( '@stdlib/blas/ext/base/gapxsumors' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gapxsumors.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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", "/**\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 floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each strided array element and computes the sum using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gapxsumpw( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction gapxsumpw( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ offset ];\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += alpha + x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = alpha + x[ ix ];\n\t\ts1 = alpha + x[ ix+stride ];\n\t\ts2 = alpha + x[ ix+(2*stride) ];\n\t\ts3 = alpha + x[ ix+(3*stride) ];\n\t\ts4 = alpha + x[ ix+(4*stride) ];\n\t\ts5 = alpha + x[ ix+(5*stride) ];\n\t\ts6 = alpha + x[ ix+(6*stride) ];\n\t\ts7 = alpha + x[ ix+(7*stride) ];\n\t\tix += 8 * stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += alpha + x[ ix ];\n\t\t\ts1 += alpha + x[ ix+stride ];\n\t\t\ts2 += alpha + x[ ix+(2*stride) ];\n\t\t\ts3 += alpha + x[ ix+(3*stride) ];\n\t\t\ts4 += alpha + x[ ix+(4*stride) ];\n\t\t\ts5 += alpha + x[ ix+(5*stride) ];\n\t\t\ts6 += alpha + x[ ix+(6*stride) ];\n\t\t\ts7 += alpha + x[ ix+(7*stride) ];\n\t\t\tix += 8 * stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\ts += alpha + x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn gapxsumpw( n, alpha, x, stride, ix ) + gapxsumpw( N-n, alpha, x, stride, ix+(n*stride) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = gapxsumpw;\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 sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each strided array element and computes the sum using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gapxsumpw( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction gapxsumpw( N, alpha, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn alpha + x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += alpha + x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, alpha, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gapxsumpw;\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* Add a constant to each strided array element and compute the sum using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/gapxsumpw\n*\n* @example\n* var gapxsumpw = require( '@stdlib/blas/ext/base/gapxsumpw' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gapxsumpw( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gapxsumpw = require( '@stdlib/blas/ext/base/gapxsumpw' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gapxsumpw.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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", "/**\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 floor = require( '@stdlib/math/base/special/floor' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values (L1 norm) of strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gasumpw( N, x, 2, 1 );\n* // returns 9.0\n*/\nfunction gasumpw( N, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn abs( x[ offset ] );\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += abs( x[ ix ] );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = abs( x[ ix ] );\n\t\ts1 = abs( x[ ix+stride ] );\n\t\ts2 = abs( x[ ix+(2*stride) ] );\n\t\ts3 = abs( x[ ix+(3*stride) ] );\n\t\ts4 = abs( x[ ix+(4*stride) ] );\n\t\ts5 = abs( x[ ix+(5*stride) ] );\n\t\ts6 = abs( x[ ix+(6*stride) ] );\n\t\ts7 = abs( x[ ix+(7*stride) ] );\n\t\tix += 8 * stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += abs( x[ ix ] );\n\t\t\ts1 += abs( x[ ix+stride ] );\n\t\t\ts2 += abs( x[ ix+(2*stride) ] );\n\t\t\ts3 += abs( x[ ix+(3*stride) ] );\n\t\t\ts4 += abs( x[ ix+(4*stride) ] );\n\t\t\ts5 += abs( x[ ix+(5*stride) ] );\n\t\t\ts6 += abs( x[ ix+(6*stride) ] );\n\t\t\ts7 += abs( x[ ix+(7*stride) ] );\n\t\t\tix += 8 * stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\ts += abs( x[ ix ] );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn gasumpw( n, x, stride, ix ) + gasumpw( N-n, x, stride, ix+(n*stride) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = gasumpw;\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 abs = require( '@stdlib/math/base/special/abs' );\nvar sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values (L1 norm) of strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n*\n* var v = gasumpw( x.length, x, 1 );\n* // returns 5.0\n*/\nfunction gasumpw( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn abs( x[ 0 ] );\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += abs( x[ ix ] );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gasumpw;\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* Compute the sum of absolute values (L1 norm) of strided array elements using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/gasumpw\n*\n* @example\n* var gasumpw = require( '@stdlib/blas/ext/base/gasumpw' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n*\n* var v = gasumpw( x.length, x, 1 );\n* // returns 5.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gasumpw = require( '@stdlib/blas/ext/base/gasumpw' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gasumpw.ndarray( N, x, 2, 1 );\n* // returns 9.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", "/**\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NumericArray} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {NumericArray} output array\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var y = [ 0.0, 0.0, 0.0 ];\n*\n* var v = gcusumkbn( x.length, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction gcusumkbn( N, sum, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar s;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\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\ts = sum;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = s + v;\n\t\tif ( abs( s ) >= abs( v ) ) {\n\t\t\tc += (s-t) + v;\n\t\t} else {\n\t\t\tc += (v-t) + s;\n\t\t}\n\t\ts = t;\n\t\ty[ iy ] = s + c;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcusumkbn;\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {NumericArray} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {NumericArray} output array\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];\n* var N = floor( x.length / 2 );\n*\n* gcusumkbn( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction gcusumkbn( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar s;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\ts = sum;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = s + v;\n\t\tif ( abs( s ) >= abs( v ) ) {\n\t\t\tc += (s-t) + v;\n\t\t} else {\n\t\t\tc += (v-t) + s;\n\t\t}\n\t\ts = t;\n\t\ty[ iy ] = s + c;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcusumkbn;\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* Compute the cumulative sum of strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/gcusumkbn\n*\n* @example\n* var gcusumkbn = require( '@stdlib/blas/ext/base/gcusumkbn' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var y = [ 0.0, 0.0, 0.0 ];\n*\n* gcusumkbn( x.length, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gcusumkbn = require( '@stdlib/blas/ext/base/gcusumkbn' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];\n* var N = floor( x.length / 2 );\n*\n* gcusumkbn.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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", "/**\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 gcusumkbn = require( './../../../../ext/base/gcusumkbn' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of strided array elements.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NumericArray} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {NumericArray} output array\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var y = [ 0.0, 0.0, 0.0 ];\n*\n* var v = gcusum( x.length, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction gcusum( N, sum, x, strideX, y, strideY ) {\n\treturn gcusumkbn( N, sum, x, strideX, y, strideY );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcusum;\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 gcusumkbn = require( './../../../../ext/base/gcusumkbn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of strided array elements.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {NumericArray} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {NumericArray} output array\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];\n* var N = floor( x.length / 2 );\n*\n* gcusum( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction gcusum( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\treturn gcusumkbn( N, sum, x, strideX, offsetX, y, strideY, offsetY );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcusum;\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* Compute the cumulative sum of strided array elements.\n*\n* @module @stdlib/blas/ext/base/gcusum\n*\n* @example\n* var gcusum = require( '@stdlib/blas/ext/base/gcusum' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var y = [ 0.0, 0.0, 0.0 ];\n*\n* gcusum( x.length, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gcusum = require( '@stdlib/blas/ext/base/gcusum' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];\n* var N = floor( x.length / 2 );\n*\n* gcusum.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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", "/**\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NumericArray} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {NumericArray} output array\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var y = [ 0.0, 0.0, 0.0 ];\n*\n* var v = gcusumkbn2( x.length, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction gcusumkbn2( N, sum, x, strideX, y, strideY ) {\n\tvar ccs;\n\tvar ix;\n\tvar iy;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\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\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = (sum-t) + v;\n\t\t} else {\n\t\t\tc = (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tt = cs + c;\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = (cs-t) + c;\n\t\t} else {\n\t\t\tcc = (c-t) + cs;\n\t\t}\n\t\tcs = t;\n\t\tccs += cc;\n\n\t\ty[ iy ] = sum + cs + ccs;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcusumkbn2;\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {NumericArray} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {NumericArray} output array\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];\n* var N = floor( x.length / 2 );\n*\n* gcusumkbn2( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction gcusumkbn2( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ccs;\n\tvar ix;\n\tvar iy;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = (sum-t) + v;\n\t\t} else {\n\t\t\tc = (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tt = cs + c;\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = (cs-t) + c;\n\t\t} else {\n\t\t\tcc = (c-t) + cs;\n\t\t}\n\t\tcs = t;\n\t\tccs += cc;\n\n\t\ty[ iy ] = sum + cs + ccs;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcusumkbn2;\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* Compute the cumulative sum of strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/gcusumkbn2\n*\n* @example\n* var gcusumkbn2 = require( '@stdlib/blas/ext/base/gcusumkbn2' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var y = [ 0.0, 0.0, 0.0 ];\n*\n* gcusumkbn2( x.length, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gcusumkbn2 = require( '@stdlib/blas/ext/base/gcusumkbn2' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];\n* var N = floor( x.length / 2 );\n*\n* gcusumkbn2.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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", "/**\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// MAIN //\n\n/**\n* Computes the cumulative sum of strided array elements using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NumericArray} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {NumericArray} output array\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var y = [ 0.0, 0.0, 0.0 ];\n*\n* var v = gcusumors( x.length, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction gcusumors( N, sum, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\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\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += x[ ix ];\n\t\ty[ iy ] = sum;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcusumors;\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// MAIN //\n\n/**\n* Computes the cumulative sum of strided array elements using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {NumericArray} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {NumericArray} output array\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];\n* var N = floor( x.length / 2 );\n*\n* gcusumors( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction gcusumors( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += x[ ix ];\n\t\ty[ iy ] = sum;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcusumors;\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* Compute the cumulative sum of strided array elements using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/gcusumors\n*\n* @example\n* var gcusumors = require( '@stdlib/blas/ext/base/gcusumors' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var y = [ 0.0, 0.0, 0.0 ];\n*\n* gcusumors( x.length, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gcusumors = require( '@stdlib/blas/ext/base/gcusumors' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];\n* var N = floor( x.length / 2 );\n*\n* gcusumors.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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", "/**\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 floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation:\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {NumericArray} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {NumericArray} output array\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];\n* var N = floor( x.length / 2 );\n*\n* gcusumpw( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction gcusumpw( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\tif ( N <= BLOCKSIZE ) {\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\ty[ iy ] = sum + s;\n\t\t\tix += strideX;\n\t\t\tiy += strideY;\n\t\t}\n\t\treturn y;\n\t}\n\tn = floor( N/2 );\n\tgcusumpw( n, sum, x, strideX, ix, y, strideY, iy );\n\tiy += (n-1) * strideY;\n\tgcusumpw( N-n, y[ iy ], x, strideX, ix+(n*strideX), y, strideY, iy+strideY ); // eslint-disable-line max-len\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcusumpw;\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 cusum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NumericArray} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {NumericArray} output array\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var y = [ 0.0, 0.0, 0.0 ];\n*\n* var v = gcusumpw( x.length, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction gcusumpw( N, sum, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\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\treturn cusum( N, sum, x, strideX, ix, y, strideY, iy );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcusumpw;\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* Compute the cumulative sum of strided array elements using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/gcusumpw\n*\n* @example\n* var gcusumpw = require( '@stdlib/blas/ext/base/gcusumpw' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var y = [ 0.0, 0.0, 0.0 ];\n*\n* gcusumpw( x.length, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gcusumpw = require( '@stdlib/blas/ext/base/gcusumpw' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];\n* var N = floor( x.length / 2 );\n*\n* gcusumpw.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* Fills a strided array with a specified scalar constant.\n*\n* @private\n* @param {PositiveInteger} N - number of indexed elements\n* @param {*} alpha - scalar\n* @param {Object} x - input array object\n* @param {Collection} x.data - input array data\n* @param {Array} x.accessors - array element accessors\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Object} input array object\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var reinterpret64 = require( '@stdlib/strided/base/reinterpret-complex64' );\n*\n* function setter( data, idx, value ) {\n* data.set( value, idx );\n* }\n*\n* var data = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* var x = {\n* 'data': data,\n* 'accessors': [ null, setter ]\n* };\n*\n* var alpha = new Complex64( 5.0, 5.0 );\n*\n* gfill( data.length, alpha, x, 1, 0 );\n*\n* var view = reinterpret64( x.data, 0 );\n* // view => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 ]\n*/\nfunction gfill( N, alpha, x, stride, offset ) {\n\tvar xbuf;\n\tvar set;\n\tvar ix;\n\tvar i;\n\n\t// Cache reference to array data:\n\txbuf = x.data;\n\n\t// Cache a reference to the element accessor:\n\tset = x.accessors[ 1 ];\n\n\tix = offset;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tset( xbuf, ix, alpha );\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gfill;\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 arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Fills a strided array with a specified scalar constant.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {*} alpha - scalar\n* @param {Collection} x - input array\n* @param {integer} stride - index increment\n* @returns {Collection} input array\n*\n* @example\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gfill( x.length, 5.0, x, 1 );\n* // x => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 ]\n*/\nfunction gfill( N, alpha, x, stride ) {\n\tvar ix;\n\tvar i;\n\tvar m;\n\tvar o;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\to = arraylike2object( x );\n\tif ( o.accessorProtocol ) {\n\t\tif ( stride < 0 ) {\n\t\t\tix = (1-N) * stride;\n\t\t} else {\n\t\t\tix = 0;\n\t\t}\n\t\taccessors( N, alpha, o, stride, ix );\n\t\treturn o.data;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ i ] = alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] = alpha;\n\t\t\tx[ i+1 ] = alpha;\n\t\t\tx[ i+2 ] = alpha;\n\t\t\tx[ i+3 ] = alpha;\n\t\t\tx[ i+4 ] = alpha;\n\t\t\tx[ i+5 ] = alpha;\n\t\t\tx[ i+6 ] = alpha;\n\t\t\tx[ i+7 ] = alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] = alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gfill;\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 arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Fills a strided array with a specified scalar constant.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {*} alpha - scalar\n* @param {Collection} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Collection} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ];\n*\n* gfill( 3, 5.0, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, 5.0, 5.0, 5.0 ]\n*/\nfunction gfill( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar o;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\to = arraylike2object( x );\n\tif ( o.accessorProtocol ) {\n\t\taccessors( N, alpha, o, stride, offset );\n\t\treturn o.data;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] = alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ ix ] = alpha;\n\t\t\tx[ ix+1 ] = alpha;\n\t\t\tx[ ix+2 ] = alpha;\n\t\t\tx[ ix+3 ] = alpha;\n\t\t\tx[ ix+4 ] = alpha;\n\t\t\tx[ ix+5 ] = alpha;\n\t\t\tx[ ix+6 ] = alpha;\n\t\t\tx[ ix+7 ] = alpha;\n\t\t\tix += M;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] = alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gfill;\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* Fill a strided array with a specified scalar constant.\n*\n* @module @stdlib/blas/ext/base/gfill\n*\n* @example\n* var gfill = require( '@stdlib/blas/ext/base/gfill' );\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gfill( x.length, 5.0, x, 1 );\n* // x => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 ]\n*\n* @example\n* var gfill = require( '@stdlib/blas/ext/base/gfill' );\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gfill.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.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", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* Fills a strided array according to a provided callback function.\n*\n* @private\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Object} x - input array object\n* @param {Collection} x.data - input array data\n* @param {Array} x.accessors - array element accessors\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @param {Callback} clbk - callback\n* @param {*} thisArg - execution context\n* @returns {Object} input array object\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var reinterpret64 = require( '@stdlib/strided/base/reinterpret-complex64' );\n*\n* function setter( data, idx, value ) {\n* data.set( value, idx );\n* }\n*\n* function getter( data, idx ) {\n* return data.get( idx );\n* }\n*\n* var data = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* var x = {\n* 'data': data,\n* 'accessors': [ getter, setter ]\n* };\n*\n* function clbk() {\n* return new Complex64( 5.0, 5.0 );\n* }\n*\n* gfillBy( data.length, x, 1, 0, clbk, void 0 );\n*\n* var view = reinterpret64( x.data, 0 );\n* // view => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 ]\n*/\nfunction gfillBy( N, x, stride, offset, clbk, thisArg ) {\n\tvar xbuf;\n\tvar set;\n\tvar get;\n\tvar ix;\n\tvar i;\n\n\t// Cache reference to array data:\n\txbuf = x.data;\n\n\t// Cache a reference to the element accessors:\n\tget = x.accessors[ 0 ];\n\tset = x.accessors[ 1 ];\n\n\tix = offset;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tset( xbuf, ix, clbk.call( thisArg, get( xbuf, ix ), i, ix, x ) );\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gfillBy;\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 arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// MAIN //\n\n/**\n* Fills a strided array according to a provided callback function.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - input array\n* @param {integer} stride - index increment\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - execution context\n* @returns {Collection} input array\n*\n* @example\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* function fill() {\n* return 5.0;\n* }\n*\n* gfillBy( x.length, x, 1, fill );\n* // x => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 ]\n*/\nfunction gfillBy( N, x, stride, clbk, thisArg ) {\n\tvar ix;\n\tvar o;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\to = arraylike2object( x );\n\tif ( o.accessorProtocol ) {\n\t\taccessors( N, o, stride, ix, clbk, thisArg );\n\t\treturn o.data;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] = clbk.call( thisArg, x[ ix ], i, ix, x );\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gfillBy;\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 arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// MAIN //\n\n/**\n* Fills a strided array according to a provided callback function.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - execution context\n* @returns {Collection} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ];\n*\n* function fill() {\n* return 5.0;\n* }\n*\n* gfillBy( 3, x, 1, x.length-3, fill );\n* // x => [ 1.0, -2.0, 3.0, 5.0, 5.0, 5.0 ]\n*/\nfunction gfillBy( N, x, stride, offset, clbk, thisArg ) {\n\tvar ix;\n\tvar o;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\to = arraylike2object( x );\n\tif ( o.accessorProtocol ) {\n\t\taccessors( N, o, stride, offset, clbk, thisArg );\n\t\treturn o.data;\n\t}\n\tix = offset;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] = clbk.call( thisArg, x[ ix ], i, ix, x );\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gfillBy;\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* Fill a strided array according to a provided callback function.\n*\n* @module @stdlib/blas/ext/base/gfill-by\n*\n* @example\n* var gfillBy = require( '@stdlib/blas/ext/base/gfill-by' );\n*\n* function fill() {\n* return 5.0;\n* }\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gfillBy( x.length, x, 1, fill );\n* // x => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 ]\n*\n* @example\n* var gfillBy = require( '@stdlib/blas/ext/base/gfill-by' );\n*\n* function fill() {\n* return 5.0;\n* }\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gfillBy.ndarray( x.length, x, 1, 0, fill );\n* // x => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.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", "/**\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NumericArray} out - output array\n* @param {integer} strideOut - `out` stride length\n* @returns {NumericArray} output array\n*\n* @example\n* var x = [ 1.0, -2.0, NaN, 2.0 ];\n* var out = [ 0.0, 0 ];\n*\n* var v = gnannsumkbn( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*/\nfunction gnannsumkbn( N, x, strideX, out, strideOut ) {\n\tvar sum;\n\tvar ix;\n\tvar io;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar n;\n\tvar i;\n\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideOut < 0 ) {\n\t\tio = -strideOut;\n\t} else {\n\t\tio = 0;\n\t}\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\tout[ io ] = sum;\n\t\tout[ io+strideOut ] = 0;\n\t\treturn out;\n\t}\n\tif ( N === 1 || strideX === 0 ) {\n\t\tif ( isnan( x[ ix ] ) ) {\n\t\t\tout[ io ] = sum;\n\t\t\tout[ io+strideOut ] = 0;\n\t\t\treturn out;\n\t\t}\n\t\tout[ io ] = x[ ix ];\n\t\tout[ io+strideOut ] = 1;\n\t\treturn out;\n\t}\n\tc = 0.0;\n\tn = 0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc += (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc += (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t\tn += 1;\n\t\t}\n\t\tix += strideX;\n\t}\n\tout[ io ] = sum + c;\n\tout[ io+strideOut ] = n;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnannsumkbn;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {NumericArray} out - output array\n* @param {integer} strideOut - `out` stride length\n* @param {NonNegativeInteger} offsetOut - `out` starting index\n* @returns {NumericArray} output array\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ];\n* var out = [ 0.0, 0 ];\n*\n* var N = floor( x.length / 2 );\n*\n* var v = gnannsumkbn( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\n*/\nfunction gnannsumkbn( N, x, strideX, offsetX, out, strideOut, offsetOut ) {\n\tvar sum;\n\tvar ix;\n\tvar io;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar n;\n\tvar i;\n\n\tix = offsetX;\n\tio = offsetOut;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\tout[ io ] = sum;\n\t\tout[ io+strideOut ] = 0;\n\t\treturn out;\n\t}\n\tif ( N === 1 || strideX === 0 ) {\n\t\tif ( isnan( x[ ix ] ) ) {\n\t\t\tout[ io ] = sum;\n\t\t\tout[ io+strideOut ] = 0;\n\t\t\treturn out;\n\t\t}\n\t\tout[ io ] = x[ ix ];\n\t\tout[ io+strideOut ] = 1;\n\t\treturn out;\n\t}\n\tc = 0.0;\n\tn = 0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc += (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc += (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t\tn += 1;\n\t\t}\n\t\tix += strideX;\n\t}\n\tout[ io ] = sum + c;\n\tout[ io+strideOut ] = n;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnannsumkbn;\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* Compute the sum of strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/gnannsumkbn\n*\n* @example\n* var gnannsumkbn = require( '@stdlib/blas/ext/base/gnannsumkbn' );\n*\n* var x = [ 1.0, -2.0, NaN, 2.0 ];\n* var out = [ 0.0, 0 ];\n*\n* var v = gnannsumkbn( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gnannsumkbn = require( '@stdlib/blas/ext/base/gnannsumkbn' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ];\n* var out = [ 0.0, 0 ];\n*\n* var N = floor( x.length / 2 );\n*\n* var v = gnannsumkbn.ndarray( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\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", "/**\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, NaN, 2.0 ];\n* var N = x.length;\n*\n* var v = gnansumkbn( N, x, 1 );\n* // returns 1.0\n*/\nfunction gnansumkbn( N, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ 0 ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc += (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc += (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum + c;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnansumkbn;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gnansumkbn( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction gnansumkbn( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ offset ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc += (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc += (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum + c;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnansumkbn;\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* Compute the sum of strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/gnansumkbn\n*\n* @example\n* var gnansumkbn = require( '@stdlib/blas/ext/base/gnansumkbn' );\n*\n* var x = [ 1.0, -2.0, NaN, 2.0 ];\n* var N = x.length;\n*\n* var v = gnansumkbn( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gnansumkbn = require( '@stdlib/blas/ext/base/gnansumkbn' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ];\n* var N = floor( x.length / 2 );\n*\n* var v = gnansumkbn.ndarray( N, x, 2, 1 );\n* // returns 5.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", "/**\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 gnansumkbn = require( './../../../../ext/base/gnansumkbn' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements, ignoring `NaN` values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, NaN, 2.0 ];\n* var N = x.length;\n*\n* var v = gnansum( N, x, 1 );\n* // returns 1.0\n*/\nfunction gnansum( N, x, stride ) {\n\treturn gnansumkbn( N, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnansum;\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 gnansumkbn = require( './../../../../ext/base/gnansumkbn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements, ignoring `NaN` values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gnansum( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction gnansum( N, x, stride, offset ) {\n\treturn gnansumkbn( N, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnansum;\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* Compute the sum of strided array elements, ignoring `NaN` values.\n*\n* @module @stdlib/blas/ext/base/gnansum\n*\n* @example\n* var gnansum = require( '@stdlib/blas/ext/base/gnansum' );\n*\n* var x = [ 1.0, -2.0, NaN, 2.0 ];\n* var N = x.length;\n*\n* var v = gnansum( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gnansum = require( '@stdlib/blas/ext/base/gnansum' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ];\n* var N = floor( x.length / 2 );\n*\n* var v = gnansum.ndarray( N, x, 2, 1 );\n* // returns 5.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", "/**\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements, ignoring `NaN` values and using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, NaN, 2.0 ];\n* var N = x.length;\n*\n* var v = gnansumkbn2( N, x, 1 );\n* // returns 1.0\n*/\nfunction gnansumkbn2( N, x, stride ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ 0 ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc = (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc = (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t\tt = cs + c;\n\t\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\t\tcc = (cs-t) + c;\n\t\t\t} else {\n\t\t\t\tcc = (c-t) + cs;\n\t\t\t}\n\t\t\tcs = t;\n\t\t\tccs += cc;\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum + cs + ccs;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnansumkbn2;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements, ignoring `NaN` values and using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gnansumkbn2( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction gnansumkbn2( N, x, stride, offset ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ offset ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnan( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc = (sum-t) + v;\n\t\t\t} else {\n\t\t\t\tc = (v-t) + sum;\n\t\t\t}\n\t\t\tsum = t;\n\t\t\tt = cs + c;\n\t\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\t\tcc = (cs-t) + c;\n\t\t\t} else {\n\t\t\t\tcc = (c-t) + cs;\n\t\t\t}\n\t\t\tcs = t;\n\t\t\tccs += cc;\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum + cs + ccs;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnansumkbn2;\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* Compute the sum of strided array elements, ignoring `NaN` values and using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/gnansumkbn2\n*\n* @example\n* var gnansumkbn2 = require( '@stdlib/blas/ext/base/gnansumkbn2' );\n*\n* var x = [ 1.0, -2.0, NaN, 2.0 ];\n* var N = x.length;\n*\n* var v = gnansumkbn2( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gnansumkbn2 = require( '@stdlib/blas/ext/base/gnansumkbn2' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ];\n* var N = floor( x.length / 2 );\n*\n* var v = gnansumkbn2.ndarray( N, x, 2, 1 );\n* // returns 5.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", "/**\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, NaN, 2.0 ];\n* var N = x.length;\n*\n* var v = gnansumors( N, x, 1 );\n* // returns 1.0\n*/\nfunction gnansumors( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\ts = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn s;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ 0 ] ) ) {\n\t\t\treturn s;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\ts += x[ ix ];\n\t\t}\n\t\tix += stride;\n\t}\n\treturn s;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnansumors;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gnansumors( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction gnansumors( N, x, stride, offset ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\ts = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn s;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ offset ] ) ) {\n\t\t\treturn s;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\ts += x[ ix ];\n\t\t}\n\t\tix += stride;\n\t}\n\treturn s;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnansumors;\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* Compute the sum of strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/gnansumors\n*\n* @example\n* var gnansumors = require( '@stdlib/blas/ext/base/gnansumors' );\n*\n* var x = [ 1.0, -2.0, NaN, 2.0 ];\n* var N = x.length;\n*\n* var v = gnansumors( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gnansumors = require( '@stdlib/blas/ext/base/gnansumors' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ];\n* var N = floor( x.length / 2 );\n*\n* var v = gnansumors.ndarray( N, x, 2, 1 );\n* // returns 5.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", "/**\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements, ignoring `NaN` values and using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gnansumpw( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction gnansumpw( N, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ offset ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\t\ts += x[ ix ];\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts1 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts2 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts3 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts4 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts5 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts6 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts7 = ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts1 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts2 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts3 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts4 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts5 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts6 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts7 += ( isnan( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\t\ts += x[ ix ];\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn gnansumpw( n, x, stride, ix ) + gnansumpw( N-n, x, stride, ix+(n*stride) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnansumpw;\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 isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements, ignoring `NaN` values and using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, NaN, 2.0 ];\n* var N = x.length;\n*\n* var v = gnansumpw( N, x, 1 );\n* // returns 1.0\n*/\nfunction gnansumpw( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnan( x[ 0 ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\t\ts += x[ ix ];\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnansumpw;\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* Compute the sum of strided array elements, ignoring `NaN` values and using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/gnansumpw\n*\n* @example\n* var gnansumpw = require( '@stdlib/blas/ext/base/gnansumpw' );\n*\n* var x = [ 1.0, -2.0, NaN, 2.0 ];\n* var N = x.length;\n*\n* var v = gnansumpw( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gnansumpw = require( '@stdlib/blas/ext/base/gnansumpw' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ];\n* var N = floor( x.length / 2 );\n*\n* var v = gnansumpw.ndarray( N, x, 2, 1 );\n* // returns 5.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", "\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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 floor = require( '@stdlib/math/base/special/floor' );\n\n\n// MAIN //\n\n/**\n* Reverses a strided array in-place.\n*\n* @private\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Object} x - input array object\n* @param {Collection} x.data - input array data\n* @param {Array} x.accessors - array element accessors\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Object} input array object\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var reinterpret64 = require( '@stdlib/strided/base/reinterpret-complex64' );\n*\n* function setter( data, idx, value ) {\n* data.set( value, idx );\n* }\n*\n* function getter( data, idx ) {\n* return data.get( idx );\n* }\n*\n* var data = new Complex64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* var x = {\n* 'data': data,\n* 'accessors': [ getter, setter ]\n* };\n*\n* grev( data.length, x, 1, 0 );\n*\n* var view = reinterpret64( x.data, 0 );\n* // view => [ -1.0, -3.0, 4.0, 0.0, 3.0, -5.0, -2.0, 1.0 ]\n*/\nfunction grev( N, x, stride, offset ) {\n\tvar xbuf;\n\tvar set;\n\tvar get;\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar n;\n\tvar i;\n\n\t// Cache reference to array data:\n\txbuf = x.data;\n\n\t// Cache a reference to the element accessors:\n\tget = x.accessors[ 0 ];\n\tset = x.accessors[ 1 ];\n\n\tn = floor( N/2 );\n\tix = offset;\n\tiy = ix + ((N-1)*stride);\n\tfor ( i = 0; i < n; i++ ) {\n\t\ttmp = get( xbuf, ix );\n\t\tset( xbuf, ix, get( xbuf, iy ) );\n\t\tset( xbuf, iy, tmp );\n\t\tix += stride;\n\t\tiy -= stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = grev;\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 floor = require( '@stdlib/math/base/special/floor' );\nvar arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Reverses a strided array in-place.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* grev( x.length, x, 1 );\n* // x => [ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.0 ]\n*/\nfunction grev( N, x, stride ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar o;\n\tvar m;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\to = arraylike2object( x );\n\tif ( o.accessorProtocol ) {\n\t\tif ( stride < 0 ) {\n\t\t\tix = (1-N) * stride;\n\t\t} else {\n\t\t\tix = 0;\n\t\t}\n\t\taccessors( N, o, stride, ix );\n\t\treturn o.data;\n\t}\n\tn = floor( N/2 );\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = n % M;\n\t\tiy = N - 1;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( ix = 0; ix < m; ix++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = x[ iy ];\n\t\t\t\tx[ iy ] = tmp;\n\t\t\t\tiy -= 1;\n\t\t\t}\n\t\t}\n\t\tif ( n < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( ix = m; ix < n; ix += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = x[ iy ];\n\t\t\tx[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = x[ iy-1 ];\n\t\t\tx[ iy-1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = x[ iy-2 ];\n\t\t\tx[ iy-2 ] = tmp;\n\n\t\t\tiy -= M;\n\t\t}\n\t\treturn x;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tiy = ix + ((N-1)*stride);\n\tfor ( i = 0; i < n; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = x[ iy ];\n\t\tx[ iy ] = tmp;\n\t\tix += stride;\n\t\tiy -= stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = grev;\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 floor = require( '@stdlib/math/base/special/floor' );\nvar arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Reverses a strided array in-place.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ];\n*\n* grev( 3, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, -6.0, 5.0, -4.0 ]\n*/\nfunction grev( N, x, stride, offset ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar o;\n\tvar m;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\to = arraylike2object( x );\n\tif ( o.accessorProtocol ) {\n\t\taccessors( N, o, stride, offset );\n\t\treturn o.data;\n\t}\n\tn = floor( N/2 );\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = n % M;\n\t\tiy = ix + N - 1;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = x[ iy ];\n\t\t\t\tx[ iy ] = tmp;\n\t\t\t\tix += stride;\n\t\t\t\tiy -= stride;\n\t\t\t}\n\t\t}\n\t\tif ( n < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < n; i += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = x[ iy ];\n\t\t\tx[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = x[ iy-1 ];\n\t\t\tx[ iy-1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = x[ iy-2 ];\n\t\t\tx[ iy-2 ] = tmp;\n\n\t\t\tix += M;\n\t\t\tiy -= M;\n\t\t}\n\t\treturn x;\n\t}\n\tiy = ix + ((N-1)*stride);\n\tfor ( i = 0; i < n; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = x[ iy ];\n\t\tx[ iy ] = tmp;\n\t\tix += stride;\n\t\tiy -= stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = grev;\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* Reverse a strided array in-place.\n*\n* @module @stdlib/blas/ext/base/grev\n*\n* @example\n* var grev = require( '@stdlib/blas/ext/base/grev' );\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* grev( x.length, x, 1 );\n* // x => [ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.0 ]\n*\n* @example\n* var grev = require( '@stdlib/blas/ext/base/grev' );\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* grev( x.length, x, 1, 0 );\n* // x => [ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.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", "/**\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 isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array using heapsort.\n*\n* ## Notes\n*\n* - This implementation uses an in-place algorithm derived from the work of Floyd (1964).\n*\n* ## References\n*\n* - Williams, John William Joseph. 1964. \"Algorithm 232: Heapsort.\" _Communications of the ACM_ 7 (6). New York, NY, USA: Association for Computing Machinery: 347\u201349. doi:[10.1145/512274.512284](https://doi.org/10.1145/512274.512284).\n* - Floyd, Robert W. 1964. \"Algorithm 245: Treesort.\" _Communications of the ACM_ 7 (12). New York, NY, USA: Association for Computing Machinery: 701. doi:[10.1145/355588.365103](https://doi.org/10.1145/355588.365103).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {NumericArray} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {NumericArray} y - second input array\n* @param {integer} strideY - `y` index increment\n* @returns {NumericArray} `x`\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n* var y = [ 0.0, 1.0, 2.0, 3.0 ];\n*\n* gsort2hp( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction gsort2hp( N, order, x, strideX, y, strideY ) {\n\tvar offsetX;\n\tvar offsetY;\n\tvar parent;\n\tvar child;\n\tvar v1;\n\tvar v2;\n\tvar tx;\n\tvar ty;\n\tvar ix;\n\tvar iy;\n\tvar n;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t}\n\tif ( strideX < 0 ) {\n\t\toffsetX = (1-N) * strideX;\n\t} else {\n\t\toffsetX = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\toffsetY = (1-N) * strideY;\n\t} else {\n\t\toffsetY = 0;\n\t}\n\t// Set the initial heap size:\n\tn = N;\n\n\t// Specify an initial \"parent\" index for building the heap:\n\tparent = floor( N / 2 );\n\n\t// Continue looping until the array is sorted...\n\twhile ( true ) {\n\t\tif ( parent > 0 ) {\n\t\t\t// We need to build the heap...\n\t\t\tparent -= 1;\n\t\t\ttx = x[ offsetX+(parent*strideX) ];\n\t\t\tty = y[ offsetY+(parent*strideY) ];\n\t\t} else {\n\t\t\t// Reduce the heap size:\n\t\t\tn -= 1;\n\n\t\t\t// Check if the heap is empty, and, if so, we are finished sorting...\n\t\t\tif ( n === 0 ) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\t// Store the last heap value in a temporary variable in order to make room for the heap root being placed into its sorted position:\n\t\t\tix = offsetX + (n*strideX);\n\t\t\ttx = x[ ix ];\n\t\t\tiy = offsetY + (n*strideY);\n\t\t\tty = y[ iy ];\n\n\t\t\t// Move the heap root to its sorted position:\n\t\t\tx[ ix ] = x[ offsetX ];\n\t\t\ty[ iy ] = y[ offsetY ];\n\t\t}\n\t\t// We need to \"sift down\", pushing `t` down the heap to in order to replace the parent and satisfy the heap property...\n\n\t\t// Start at the parent index:\n\t\tj = parent;\n\n\t\t// Get the \"left\" child index:\n\t\tchild = (j*2) + 1;\n\n\t\twhile ( child < n ) {\n\t\t\t// Find the largest child...\n\t\t\tk = child + 1;\n\t\t\tif ( k < n ) {\n\t\t\t\tv1 = x[ offsetX+(k*strideX) ];\n\t\t\t\tv2 = x[ offsetX+(child*strideX) ];\n\n\t\t\t\t// Check if a \"right\" child exists and is \"bigger\"...\n\t\t\t\tif ( v1 > v2 || isnan( v1 ) || (v1 === v2 && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t\tchild += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if the largest child is bigger than `t`...\n\t\t\tv1 = x[ offsetX+(child*strideX) ];\n\t\t\tif ( v1 > tx || isnan( v1 ) || ( v1 === tx && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t// Insert the larger child value:\n\t\t\t\tx[ offsetX+(j*strideX) ] = v1;\n\t\t\t\ty[ offsetY+(j*strideY) ] = y[ offsetY+(child*strideY) ];\n\n\t\t\t\t// Update `j` to point to the child index:\n\t\t\t\tj = child;\n\n\t\t\t\t// Get the \"left\" child index and repeat...\n\t\t\t\tchild = (j*2) + 1;\n\t\t\t} else {\n\t\t\t\t// We've found `t`'s place in the heap...\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Insert `t` into the heap:\n\t\tx[ offsetX+(j*strideX) ] = tx;\n\t\ty[ offsetY+(j*strideY) ] = ty;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsort2hp;\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 isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array using heapsort.\n*\n* ## Notes\n*\n* - This implementation uses an in-place algorithm derived from the work of Floyd (1964).\n*\n* ## References\n*\n* - Williams, John William Joseph. 1964. \"Algorithm 232: Heapsort.\" _Communications of the ACM_ 7 (6). New York, NY, USA: Association for Computing Machinery: 347\u201349. doi:[10.1145/512274.512284](https://doi.org/10.1145/512274.512284).\n* - Floyd, Robert W. 1964. \"Algorithm 245: Treesort.\" _Communications of the ACM_ 7 (12). New York, NY, USA: Association for Computing Machinery: 701. doi:[10.1145/355588.365103](https://doi.org/10.1145/355588.365103).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {NumericArray} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {NumericArray} y - second input array\n* @param {integer} strideY - `y` index increment\n* @param {NonNegativeInteger} offsetY - `y` starting index\n* @returns {NumericArray} `x`\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n* var y = [ 0.0, 1.0, 2.0, 3.0 ];\n*\n* gsort2hp( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction gsort2hp( N, order, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar parent;\n\tvar child;\n\tvar v1;\n\tvar v2;\n\tvar tx;\n\tvar ty;\n\tvar ix;\n\tvar iy;\n\tvar n;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t\toffsetX -= (N-1) * strideX;\n\t\toffsetY -= (N-1) * strideY;\n\t}\n\t// Set the initial heap size:\n\tn = N;\n\n\t// Specify an initial \"parent\" index for building the heap:\n\tparent = floor( N / 2 );\n\n\t// Continue looping until the array is sorted...\n\twhile ( true ) {\n\t\tif ( parent > 0 ) {\n\t\t\t// We need to build the heap...\n\t\t\tparent -= 1;\n\t\t\ttx = x[ offsetX+(parent*strideX) ];\n\t\t\tty = y[ offsetY+(parent*strideY) ];\n\t\t} else {\n\t\t\t// Reduce the heap size:\n\t\t\tn -= 1;\n\n\t\t\t// Check if the heap is empty, and, if so, we are finished sorting...\n\t\t\tif ( n === 0 ) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\t// Store the last heap value in a temporary variable in order to make room for the heap root being placed into its sorted position:\n\t\t\tix = offsetX + (n*strideX);\n\t\t\ttx = x[ ix ];\n\t\t\tiy = offsetY + (n*strideY);\n\t\t\tty = y[ iy ];\n\n\t\t\t// Move the heap root to its sorted position:\n\t\t\tx[ ix ] = x[ offsetX ];\n\t\t\ty[ iy ] = y[ offsetY ];\n\t\t}\n\t\t// We need to \"sift down\", pushing `t` down the heap to in order to replace the parent and satisfy the heap property...\n\n\t\t// Start at the parent index:\n\t\tj = parent;\n\n\t\t// Get the \"left\" child index:\n\t\tchild = (j*2) + 1;\n\n\t\twhile ( child < n ) {\n\t\t\t// Find the largest child...\n\t\t\tk = child + 1;\n\t\t\tif ( k < n ) {\n\t\t\t\tv1 = x[ offsetX+(k*strideX) ];\n\t\t\t\tv2 = x[ offsetX+(child*strideX) ];\n\n\t\t\t\t// Check if a \"right\" child exists and is \"bigger\"...\n\t\t\t\tif ( v1 > v2 || isnan( v1 ) || (v1 === v2 && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t\tchild += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if the largest child is bigger than `t`...\n\t\t\tv1 = x[ offsetX+(child*strideX) ];\n\t\t\tif ( v1 > tx || isnan( v1 ) || ( v1 === tx && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t// Insert the larger child value:\n\t\t\t\tx[ offsetX+(j*strideX) ] = v1;\n\t\t\t\ty[ offsetY+(j*strideY) ] = y[ offsetY+(child*strideY) ];\n\n\t\t\t\t// Update `j` to point to the child index:\n\t\t\t\tj = child;\n\n\t\t\t\t// Get the \"left\" child index and repeat...\n\t\t\t\tchild = (j*2) + 1;\n\t\t\t} else {\n\t\t\t\t// We've found `t`'s place in the heap...\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Insert `t` into the heap:\n\t\tx[ offsetX+(j*strideX) ] = tx;\n\t\ty[ offsetY+(j*strideY) ] = ty;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsort2hp;\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* Simultaneously sort two double-precision floating-point strided arrays based on the sort order of the first array using heapsort.\n*\n* @module @stdlib/blas/ext/base/gsort2hp\n*\n* @example\n* var gsort2hp = require( '@stdlib/blas/ext/base/gsort2hp' );\n*\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n* var y = [ 0.0, 1.0, 2.0, 3.0 ];\n*\n* gsort2hp( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*\n* @example\n* var gsort2hp = require( '@stdlib/blas/ext/base/gsort2hp' );\n*\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n* var y = [ 0.0, 1.0, 2.0, 3.0 ];\n*\n* gsort2hp( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.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", "/**\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two strided arrays based on the sort order of the first array using insertion sort.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {NumericArray} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {NumericArray} y - second input array\n* @param {integer} strideY - `y` index increment\n* @returns {NumericArray} `x`\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n* var y = [ 0.0, 1.0, 2.0, 3.0 ];\n*\n* gsort2ins( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction gsort2ins( N, order, x, strideX, y, strideY ) {\n\tvar flg;\n\tvar ix;\n\tvar jx;\n\tvar fx;\n\tvar lx;\n\tvar iy;\n\tvar jy;\n\tvar fy;\n\tvar ly;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t}\n\tif ( strideY < 0 ) {\n\t\tfy = (1-N) * strideY;\n\t\tly = 0;\n\t} else {\n\t\tfy = 0;\n\t\tly = (N-1) * strideY;\n\t}\n\tiy = fy + strideY;\n\n\tif ( strideX < 0 ) {\n\t\t// Traverse the strided array from right-to-left...\n\t\tfx = (1-N) * strideX; // first index\n\t\tlx = 0; // last index\n\t\tix = fx + strideX;\n\n\t\t// Sort in increasing order...\n\t\tfor ( i = 1; i < N; i++ ) {\n\t\t\tvx = x[ ix ];\n\t\t\tvy = y[ iy ];\n\n\t\t\t// Sort `NaN` values to the end (i.e., the left)...\n\t\t\tif ( isnan( vx ) ) {\n\t\t\t\tjx = ix;\n\t\t\t\tjy = iy;\n\n\t\t\t\t// Shift all values (including NaNs) to the left of the current element to the right...\n\t\t\t\twhile ( jx > lx ) {\n\t\t\t\t\tx[ jx ] = x[ jx+strideX ];\n\t\t\t\t\ty[ jy ] = y[ jy+strideY ];\n\t\t\t\t\tjx += strideX;\n\t\t\t\t\tjy += strideY;\n\t\t\t\t}\n\t\t\t\tx[ lx ] = vx;\n\t\t\t\ty[ ly ] = vy;\n\t\t\t} else {\n\t\t\t\tflg = isNegativeZero( vx );\n\t\t\t\tjx = ix - strideX;\n\t\t\t\tjy = iy - strideY;\n\n\t\t\t\t// Shift all larger values to the right of the current element to the left...\n\t\t\t\twhile ( jx <= fx ) {\n\t\t\t\t\tux = x[ jx ];\n\t\t\t\t\tif ( ux <= vx && !(flg && ux === vx && isNegativeZero( ux ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when last element is NaN)) are sorted to the left\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tx[ jx+strideX ] = ux;\n\t\t\t\t\ty[ jy+strideY ] = y[ jy ];\n\t\t\t\t\tjx -= strideX;\n\t\t\t\t\tjy -= strideY;\n\t\t\t\t}\n\t\t\t\tx[ jx+strideX ] = vx;\n\t\t\t\ty[ jy+strideY ] = vy;\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// Traverse the strided array from left-to-right...\n\tfx = 0; // first index\n\tlx = (N-1) * strideX; // last index\n\tix = fx + strideX;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < N; i++ ) {\n\t\tvx = x[ ix ];\n\t\tvy = y[ iy ];\n\n\t\t// Sort `NaN` values to the end...\n\t\tif ( isnan( vx ) ) {\n\t\t\tjx = ix;\n\t\t\tjy = iy;\n\n\t\t\t// Shift all values (including NaNs) to the right of the current element to the left...\n\t\t\twhile ( jx < lx ) {\n\t\t\t\tx[ jx ] = x[ jx+strideX ];\n\t\t\t\ty[ jy ] = y[ jy+strideY ];\n\t\t\t\tjx += strideX;\n\t\t\t\tjy += strideY;\n\t\t\t}\n\t\t\tx[ lx ] = vx;\n\t\t\ty[ ly ] = vy;\n\t\t} else {\n\t\t\tflg = isNegativeZero( vx );\n\t\t\tjx = ix - strideX;\n\t\t\tjy = iy - strideY;\n\n\t\t\t// Shift all larger values to the left of the current element to the right...\n\t\t\twhile ( jx >= fx ) {\n\t\t\t\tux = x[ jx ];\n\t\t\t\tif ( ux <= vx && !(flg && ux === vx && isNegativeZero( ux ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when first element is NaN)) are sorted to the right\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ jx+strideX ] = ux;\n\t\t\t\ty[ jy+strideY ] = y[ jy ];\n\t\t\t\tjx -= strideX;\n\t\t\t\tjy -= strideY;\n\t\t\t}\n\t\t\tx[ jx+strideX ] = vx;\n\t\t\ty[ jy+strideY ] = vy;\n\t\t\tix += strideX;\n\t\t\tiy += strideY;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsort2ins;\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two strided arrays based on the sort order of the first array using insertion sort.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {NumericArray} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {NumericArray} y - second input array\n* @param {integer} strideY - `y` index increment\n* @param {NonNegativeInteger} offsetY - `y` starting index\n* @returns {NumericArray} `x`\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n* var y = [ 0.0, 1.0, 2.0, 3.0 ];\n*\n* gsort2ins( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction gsort2ins( N, order, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar flg;\n\tvar ix;\n\tvar jx;\n\tvar fx;\n\tvar lx;\n\tvar iy;\n\tvar jy;\n\tvar fy;\n\tvar ly;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t\toffsetX -= (N-1) * strideX;\n\t\toffsetY -= (N-1) * strideY;\n\t}\n\tfx = offsetX; // first index\n\tlx = fx + ((N-1)*strideX); // last index\n\tix = fx + strideX;\n\n\tfy = offsetY; // first index\n\tly = fy + ((N-1)*strideY); // last index\n\tiy = fy + strideY;\n\n\tif ( strideX < 0 ) {\n\t\t// Traverse the strided array from right-to-left...\n\n\t\t// Sort in increasing order...\n\t\tfor ( i = 1; i < N; i++ ) {\n\t\t\tvx = x[ ix ];\n\t\t\tvy = y[ iy ];\n\n\t\t\t// Sort `NaN` values to the end (i.e., the left)...\n\t\t\tif ( isnan( vx ) ) {\n\t\t\t\tjx = ix;\n\t\t\t\tjy = iy;\n\n\t\t\t\t// Shift all values (including NaNs) to the left of the current element to the right...\n\t\t\t\twhile ( jx > lx ) {\n\t\t\t\t\tx[ jx ] = x[ jx+strideX ];\n\t\t\t\t\ty[ jy ] = y[ jy+strideY ];\n\t\t\t\t\tjx += strideX;\n\t\t\t\t\tjy += strideY;\n\t\t\t\t}\n\t\t\t\tx[ lx ] = vx;\n\t\t\t\ty[ ly ] = vy;\n\t\t\t} else {\n\t\t\t\tflg = isNegativeZero( vx );\n\t\t\t\tjx = ix - strideX;\n\t\t\t\tjy = iy - strideY;\n\n\t\t\t\t// Shift all larger values to the right of the current element to the left...\n\t\t\t\twhile ( jx <= fx ) {\n\t\t\t\t\tux = x[ jx ];\n\t\t\t\t\tif ( ux <= vx && !(flg && ux === vx && isNegativeZero( ux ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when last element is NaN)) are sorted to the left\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tx[ jx+strideX ] = ux;\n\t\t\t\t\ty[ jy+strideY ] = y[ jy ];\n\t\t\t\t\tjx -= strideX;\n\t\t\t\t\tjy -= strideY;\n\t\t\t\t}\n\t\t\t\tx[ jx+strideX ] = vx;\n\t\t\t\ty[ jy+strideY ] = vy;\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// Traverse the strided array from left-to-right...\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < N; i++ ) {\n\t\tvx = x[ ix ];\n\t\tvy = y[ iy ];\n\n\t\t// Sort `NaN` values to the end...\n\t\tif ( isnan( vx ) ) {\n\t\t\tjx = ix;\n\t\t\tjy = iy;\n\n\t\t\t// Shift all values (including NaNs) to the right of the current element to the left...\n\t\t\twhile ( jx < lx ) {\n\t\t\t\tx[ jx ] = x[ jx+strideX ];\n\t\t\t\ty[ jy ] = y[ jy+strideY ];\n\t\t\t\tjx += strideX;\n\t\t\t\tjy += strideY;\n\t\t\t}\n\t\t\tx[ lx ] = vx;\n\t\t\ty[ ly ] = vy;\n\t\t} else {\n\t\t\tflg = isNegativeZero( vx );\n\t\t\tjx = ix - strideX;\n\t\t\tjy = iy - strideY;\n\n\t\t\t// Shift all larger values to the left of the current element to the right...\n\t\t\twhile ( jx >= fx ) {\n\t\t\t\tux = x[ jx ];\n\t\t\t\tif ( ux <= vx && !(flg && ux === vx && isNegativeZero( ux ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when first element is NaN)) are sorted to the right\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ jx+strideX ] = ux;\n\t\t\t\ty[ jy+strideY ] = y[ jy ];\n\t\t\t\tjx -= strideX;\n\t\t\t\tjy -= strideY;\n\t\t\t}\n\t\t\tx[ jx+strideX ] = vx;\n\t\t\ty[ jy+strideY ] = vy;\n\t\t\tix += strideX;\n\t\t\tiy += strideY;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsort2ins;\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* Simultaneously sort two strided arrays based on the sort order of the first array using insertion sort.\n*\n* @module @stdlib/blas/ext/base/gsort2ins\n*\n* @example\n* var gsort2ins = require( '@stdlib/blas/ext/base/gsort2ins' );\n*\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n* var y = [ 0.0, 1.0, 2.0, 3.0 ];\n*\n* gsort2ins( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*\n* @example\n* var gsort2ins = require( '@stdlib/blas/ext/base/gsort2ins' );\n*\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n* var y = [ 0.0, 1.0, 2.0, 3.0 ];\n*\n* gsort2ins( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.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", "[701,301,132,57,23,10,4,1]\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar GAPS = require( './gaps.json' );\n\n\n// VARIABLES //\n\nvar NGAPS = GAPS.length;\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array using Shellsort.\n*\n* ## Notes\n*\n* - This implementation uses the gap sequence proposed by Ciura (2001).\n*\n* ## References\n*\n* - Shell, Donald L. 1959. \"A High-Speed Sorting Procedure.\" _Communications of the ACM_ 2 (7). Association for Computing Machinery: 30\u201332. doi:[10.1145/368370.368387](https://doi.org/10.1145/368370.368387).\n* - Ciura, Marcin. 2001. \"Best Increments for the Average Case of Shellsort.\" In _Fundamentals of Computation Theory_, 106\u201317. Springer Berlin Heidelberg. doi:[10.1007/3-540-44669-9\\_12](https://doi.org/10.1007/3-540-44669-9_12).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {NumericArray} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {NumericArray} y - second input array\n* @param {integer} strideY - `y` index increment\n* @returns {NumericArray} `x`\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n* var y = [ 0.0, 1.0, 2.0, 3.0 ];\n*\n* gsort2sh( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction gsort2sh( N, order, x, strideX, y, strideY ) {\n\tvar offsetX;\n\tvar offsetY;\n\tvar flg;\n\tvar gap;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t}\n\tif ( strideX < 0 ) {\n\t\toffsetX = (1-N) * strideX;\n\t} else {\n\t\toffsetX = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\toffsetY = (1-N) * strideY;\n\t} else {\n\t\toffsetY = 0;\n\t}\n\tfor ( i = 0; i < NGAPS; i++ ) {\n\t\tgap = GAPS[ i ];\n\t\tfor ( j = gap; j < N; j++ ) {\n\t\t\tvx = x[ offsetX+(j*strideX) ];\n\n\t\t\t// If `NaN`, the current value is already sorted to its place...\n\t\t\tif ( isnan( vx ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvy = y[ offsetY+(j*strideY) ];\n\n\t\t\t// Perform Shellsort on the \"gapped\" subarray...\n\t\t\tflg = isNegativeZero( vx );\n\t\t\tfor ( k = j; k >= gap; k -= gap ) {\n\t\t\t\tux = x[ offsetX+((k-gap)*strideX) ];\n\t\t\t\tif ( ux <= vx && !(flg && ux === vx) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ offsetX+(k*strideX) ] = ux;\n\t\t\t\ty[ offsetY+(k*strideY) ] = y[ offsetY+((k-gap)*strideY) ];\n\t\t\t}\n\t\t\tx[ offsetX+(k*strideX) ] = vx;\n\t\t\ty[ offsetY+(k*strideY) ] = vy;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsort2sh;\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar GAPS = require( './gaps.json' );\n\n\n// VARIABLES //\n\nvar NGAPS = GAPS.length;\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array using Shellsort.\n*\n* ## Notes\n*\n* - This implementation uses the gap sequence proposed by Ciura (2001).\n*\n* ## References\n*\n* - Shell, Donald L. 1959. \"A High-Speed Sorting Procedure.\" _Communications of the ACM_ 2 (7). Association for Computing Machinery: 30\u201332. doi:[10.1145/368370.368387](https://doi.org/10.1145/368370.368387).\n* - Ciura, Marcin. 2001. \"Best Increments for the Average Case of Shellsort.\" In _Fundamentals of Computation Theory_, 106\u201317. Springer Berlin Heidelberg. doi:[10.1007/3-540-44669-9\\_12](https://doi.org/10.1007/3-540-44669-9_12).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {NumericArray} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {NumericArray} y - second input array\n* @param {integer} strideY - `y` index increment\n* @param {NonNegativeInteger} offsetY - `y` starting index\n* @returns {NumericArray} `x`\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n* var y = [ 0.0, 1.0, 2.0, 3.0 ];\n*\n* gsort2sh( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction gsort2sh( N, order, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar flg;\n\tvar gap;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t\toffsetX -= (N-1) * strideX;\n\t\toffsetY -= (N-1) * strideY;\n\t}\n\tfor ( i = 0; i < NGAPS; i++ ) {\n\t\tgap = GAPS[ i ];\n\t\tfor ( j = gap; j < N; j++ ) {\n\t\t\tvx = x[ offsetX+(j*strideX) ];\n\n\t\t\t// If `NaN`, the current value is already sorted to its place...\n\t\t\tif ( isnan( vx ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvy = y[ offsetY+(j*strideY) ];\n\n\t\t\t// Perform Shellsort on the \"gapped\" subarray...\n\t\t\tflg = isNegativeZero( vx );\n\t\t\tfor ( k = j; k >= gap; k -= gap ) {\n\t\t\t\tux = x[ offsetX+((k-gap)*strideX) ];\n\t\t\t\tif ( ux <= vx && !(flg && ux === vx) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ offsetX+(k*strideX) ] = ux;\n\t\t\t\ty[ offsetY+(k*strideY) ] = y[ offsetY+((k-gap)*strideY) ];\n\t\t\t}\n\t\t\tx[ offsetX+(k*strideX) ] = vx;\n\t\t\ty[ offsetY+(k*strideY) ] = vy;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsort2sh;\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* Simultaneously sort two double-precision floating-point strided arrays based on the sort order of the first array using Shellsort.\n*\n* @module @stdlib/blas/ext/base/gsort2sh\n*\n* @example\n* var gsort2sh = require( '@stdlib/blas/ext/base/gsort2sh' );\n*\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n* var y = [ 0.0, 1.0, 2.0, 3.0 ];\n*\n* gsort2sh( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*\n* @example\n* var gsort2sh = require( '@stdlib/blas/ext/base/gsort2sh' );\n*\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n* var y = [ 0.0, 1.0, 2.0, 3.0 ];\n*\n* gsort2sh( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.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", "/**\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 isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// MAIN //\n\n/**\n* Sorts a strided array using heapsort.\n*\n* ## Notes\n*\n* - This implementation uses an in-place algorithm derived from the work of Floyd (1964).\n*\n* ## References\n*\n* - Williams, John William Joseph. 1964. \"Algorithm 232: Heapsort.\" _Communications of the ACM_ 7 (6). New York, NY, USA: Association for Computing Machinery: 347\u201349. doi:[10.1145/512274.512284](https://doi.org/10.1145/512274.512284).\n* - Floyd, Robert W. 1964. \"Algorithm 245: Treesort.\" _Communications of the ACM_ 7 (12). New York, NY, USA: Association for Computing Machinery: 701. doi:[10.1145/355588.365103](https://doi.org/10.1145/355588.365103).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n*\n* gsorthp( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction gsorthp( N, order, x, stride ) {\n\tvar offset;\n\tvar parent;\n\tvar child;\n\tvar v1;\n\tvar v2;\n\tvar n;\n\tvar t;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t}\n\tif ( stride < 0 ) {\n\t\toffset = (1-N) * stride;\n\t} else {\n\t\toffset = 0;\n\t}\n\t// Set the initial heap size:\n\tn = N;\n\n\t// Specify an initial \"parent\" index for building the heap:\n\tparent = floor( N / 2 );\n\n\t// Continue looping until the array is sorted...\n\twhile ( true ) {\n\t\tif ( parent > 0 ) {\n\t\t\t// We need to build the heap...\n\t\t\tparent -= 1;\n\t\t\tt = x[ offset+(parent*stride) ];\n\t\t} else {\n\t\t\t// Reduce the heap size:\n\t\t\tn -= 1;\n\n\t\t\t// Check if the heap is empty, and, if so, we are finished sorting...\n\t\t\tif ( n === 0 ) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\t// Store the last heap value in a temporary variable in order to make room for the heap root being placed into its sorted position:\n\t\t\ti = offset + (n*stride);\n\t\t\tt = x[ i ];\n\n\t\t\t// Move the heap root to its sorted position:\n\t\t\tx[ i ] = x[ offset ];\n\t\t}\n\t\t// We need to \"sift down\", pushing `t` down the heap to in order to replace the parent and satisfy the heap property...\n\n\t\t// Start at the parent index:\n\t\tj = parent;\n\n\t\t// Get the \"left\" child index:\n\t\tchild = (j*2) + 1;\n\n\t\twhile ( child < n ) {\n\t\t\t// Find the largest child...\n\t\t\tk = child + 1;\n\t\t\tif ( k < n ) {\n\t\t\t\tv1 = x[ offset+(k*stride) ];\n\t\t\t\tv2 = x[ offset+(child*stride) ];\n\n\t\t\t\t// Check if a \"right\" child exists and is \"bigger\"...\n\t\t\t\tif ( v1 > v2 || isnan( v1 ) || (v1 === v2 && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t\tchild += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if the largest child is bigger than `t`...\n\t\t\tv1 = x[ offset+(child*stride) ];\n\t\t\tif ( v1 > t || isnan( v1 ) || ( v1 === t && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t// Insert the larger child value:\n\t\t\t\tx[ offset+(j*stride) ] = v1;\n\n\t\t\t\t// Update `j` to point to the child index:\n\t\t\t\tj = child;\n\n\t\t\t\t// Get the \"left\" child index and repeat...\n\t\t\t\tchild = (j*2) + 1;\n\t\t\t} else {\n\t\t\t\t// We've found `t`'s place in the heap...\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Insert `t` into the heap:\n\t\tx[ offset+(j*stride) ] = t;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsorthp;\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 isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// MAIN //\n\n/**\n* Sorts a strided array using heapsort.\n*\n* ## Notes\n*\n* - This implementation uses an in-place algorithm derived from the work of Floyd (1964).\n*\n* ## References\n*\n* - Williams, John William Joseph. 1964. \"Algorithm 232: Heapsort.\" _Communications of the ACM_ 7 (6). New York, NY, USA: Association for Computing Machinery: 347\u201349. doi:[10.1145/512274.512284](https://doi.org/10.1145/512274.512284).\n* - Floyd, Robert W. 1964. \"Algorithm 245: Treesort.\" _Communications of the ACM_ 7 (12). New York, NY, USA: Association for Computing Machinery: 701. doi:[10.1145/355588.365103](https://doi.org/10.1145/355588.365103).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n*\n* gsorthp( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction gsorthp( N, order, x, stride, offset ) {\n\tvar parent;\n\tvar child;\n\tvar v1;\n\tvar v2;\n\tvar n;\n\tvar t;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t\toffset -= (N-1) * stride;\n\t}\n\t// Set the initial heap size:\n\tn = N;\n\n\t// Specify an initial \"parent\" index for building the heap:\n\tparent = floor( N / 2 );\n\n\t// Continue looping until the array is sorted...\n\twhile ( true ) {\n\t\tif ( parent > 0 ) {\n\t\t\t// We need to build the heap...\n\t\t\tparent -= 1;\n\t\t\tt = x[ offset+(parent*stride) ];\n\t\t} else {\n\t\t\t// Reduce the heap size:\n\t\t\tn -= 1;\n\n\t\t\t// Check if the heap is empty, and, if so, we are finished sorting...\n\t\t\tif ( n === 0 ) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\t// Store the last heap value in a temporary variable in order to make room for the heap root being placed into its sorted position:\n\t\t\ti = offset + (n*stride);\n\t\t\tt = x[ i ];\n\n\t\t\t// Move the heap root to its sorted position:\n\t\t\tx[ i ] = x[ offset ];\n\t\t}\n\t\t// We need to \"sift down\", pushing `t` down the heap to in order to replace the parent and satisfy the heap property...\n\n\t\t// Start at the parent index:\n\t\tj = parent;\n\n\t\t// Get the \"left\" child index:\n\t\tchild = (j*2) + 1;\n\n\t\twhile ( child < n ) {\n\t\t\t// Find the largest child...\n\t\t\tk = child + 1;\n\t\t\tif ( k < n ) {\n\t\t\t\tv1 = x[ offset+(k*stride) ];\n\t\t\t\tv2 = x[ offset+(child*stride) ];\n\n\t\t\t\t// Check if a \"right\" child exists and is \"bigger\"...\n\t\t\t\tif ( v1 > v2 || isnan( v1 ) || (v1 === v2 && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t\tchild += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if the largest child is bigger than `t`...\n\t\t\tv1 = x[ offset+(child*stride) ];\n\t\t\tif ( v1 > t || isnan( v1 ) || ( v1 === t && isPositiveZero( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t// Insert the larger child value:\n\t\t\t\tx[ offset+(j*stride) ] = v1;\n\n\t\t\t\t// Update `j` to point to the child index:\n\t\t\t\tj = child;\n\n\t\t\t\t// Get the \"left\" child index and repeat...\n\t\t\t\tchild = (j*2) + 1;\n\t\t\t} else {\n\t\t\t\t// We've found `t`'s place in the heap...\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Insert `t` into the heap:\n\t\tx[ offset+(j*stride) ] = t;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsorthp;\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* Sort a strided array using heapsort.\n*\n* @module @stdlib/blas/ext/base/gsorthp\n*\n* @example\n* var gsorthp = require( '@stdlib/blas/ext/base/gsorthp' );\n*\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n*\n* gsorthp( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* @example\n* var gsorthp = require( '@stdlib/blas/ext/base/gsorthp' );\n*\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n*\n* gsorthp.ndarray( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.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", "/**\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Sorts a strided array using insertion sort.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n*\n* gsortins( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction gsortins( N, order, x, stride ) {\n\tvar flg;\n\tvar ix;\n\tvar jx;\n\tvar fx;\n\tvar lx;\n\tvar v;\n\tvar u;\n\tvar i;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t}\n\tif ( stride < 0 ) {\n\t\t// Traverse the strided array from right-to-left...\n\t\tfx = (1-N) * stride; // first index\n\t\tlx = 0; // last index\n\t\tix = fx + stride;\n\n\t\t// Sort in increasing order...\n\t\tfor ( i = 1; i < N; i++ ) {\n\t\t\tv = x[ ix ];\n\n\t\t\t// Sort `NaN` values to the end (i.e., the left)...\n\t\t\tif ( isnan( v ) ) {\n\t\t\t\tjx = ix;\n\n\t\t\t\t// Shift all values (including NaNs) to the left of the current element to the right...\n\t\t\t\twhile ( jx > lx ) {\n\t\t\t\t\tx[ jx ] = x[ jx+stride ];\n\t\t\t\t\tjx += stride;\n\t\t\t\t}\n\t\t\t\tx[ lx ] = v;\n\t\t\t} else {\n\t\t\t\tflg = isNegativeZero( v );\n\t\t\t\tjx = ix - stride;\n\n\t\t\t\t// Shift all larger values to the right of the current element to the left...\n\t\t\t\twhile ( jx <= fx ) {\n\t\t\t\t\tu = x[ jx ];\n\t\t\t\t\tif ( u <= v && !(flg && u === v && isNegativeZero( u ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when last element is NaN)) are sorted to the left\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tx[ jx+stride ] = u;\n\t\t\t\t\tjx -= stride;\n\t\t\t\t}\n\t\t\t\tx[ jx+stride ] = v;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// Traverse the strided array from left-to-right...\n\tfx = 0; // first index\n\tlx = (N-1) * stride; // last index\n\tix = fx + stride;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < N; i++ ) {\n\t\tv = x[ ix ];\n\n\t\t// Sort `NaN` values to the end...\n\t\tif ( isnan( v ) ) {\n\t\t\tjx = ix;\n\n\t\t\t// Shift all values (including NaNs) to the right of the current element to the left...\n\t\t\twhile ( jx < lx ) {\n\t\t\t\tx[ jx ] = x[ jx+stride ];\n\t\t\t\tjx += stride;\n\t\t\t}\n\t\t\tx[ lx ] = v;\n\t\t} else {\n\t\t\tflg = isNegativeZero( v );\n\t\t\tjx = ix - stride;\n\n\t\t\t// Shift all larger values to the left of the current element to the right...\n\t\t\twhile ( jx >= fx ) {\n\t\t\t\tu = x[ jx ];\n\t\t\t\tif ( u <= v && !(flg && u === v && isNegativeZero( u ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when first element is NaN)) are sorted to the right\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ jx+stride ] = u;\n\t\t\t\tjx -= stride;\n\t\t\t}\n\t\t\tx[ jx+stride ] = v;\n\t\t\tix += stride;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsortins;\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\n\n\n// MAIN //\n\n/**\n* Sorts a strided array using insertion sort.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n*\n* gsortins( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction gsortins( N, order, x, stride, offset ) {\n\tvar flg;\n\tvar ix;\n\tvar jx;\n\tvar fx;\n\tvar lx;\n\tvar v;\n\tvar u;\n\tvar i;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t\toffset -= (N-1) * stride;\n\t}\n\tfx = offset; // first index\n\tlx = fx + ((N-1)*stride); // last index\n\tix = fx + stride;\n\n\tif ( stride < 0 ) {\n\t\t// Traverse the strided array from right-to-left...\n\n\t\t// Sort in increasing order...\n\t\tfor ( i = 1; i < N; i++ ) {\n\t\t\tv = x[ ix ];\n\n\t\t\t// Sort `NaN` values to the end (i.e., the left)...\n\t\t\tif ( isnan( v ) ) {\n\t\t\t\tjx = ix;\n\n\t\t\t\t// Shift all values (including NaNs) to the left of the current element to the right...\n\t\t\t\twhile ( jx > lx ) {\n\t\t\t\t\tx[ jx ] = x[ jx+stride ];\n\t\t\t\t\tjx += stride;\n\t\t\t\t}\n\t\t\t\tx[ lx ] = v;\n\t\t\t} else {\n\t\t\t\tflg = isNegativeZero( v );\n\t\t\t\tjx = ix - stride;\n\n\t\t\t\t// Shift all larger values to the right of the current element to the left...\n\t\t\t\twhile ( jx <= fx ) {\n\t\t\t\t\tu = x[ jx ];\n\t\t\t\t\tif ( u <= v && !(flg && u === v && isNegativeZero( u ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when last element is NaN)) are sorted to the left\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tx[ jx+stride ] = u;\n\t\t\t\t\tjx -= stride;\n\t\t\t\t}\n\t\t\t\tx[ jx+stride ] = v;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// Traverse the strided array from left-to-right...\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < N; i++ ) {\n\t\tv = x[ ix ];\n\n\t\t// Sort `NaN` values to the end...\n\t\tif ( isnan( v ) ) {\n\t\t\tjx = ix;\n\n\t\t\t// Shift all values (including NaNs) to the right of the current element to the left...\n\t\t\twhile ( jx < lx ) {\n\t\t\t\tx[ jx ] = x[ jx+stride ];\n\t\t\t\tjx += stride;\n\t\t\t}\n\t\t\tx[ lx ] = v;\n\t\t} else {\n\t\t\tflg = isNegativeZero( v );\n\t\t\tjx = ix - stride;\n\n\t\t\t// Shift all larger values to the left of the current element to the right...\n\t\t\twhile ( jx >= fx ) {\n\t\t\t\tu = x[ jx ];\n\t\t\t\tif ( u <= v && !(flg && u === v && isNegativeZero( u ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when first element is NaN)) are sorted to the right\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ jx+stride ] = u;\n\t\t\t\tjx -= stride;\n\t\t\t}\n\t\t\tx[ jx+stride ] = v;\n\t\t\tix += stride;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsortins;\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* Sort a strided array using insertion sort.\n*\n* @module @stdlib/blas/ext/base/gsortins\n*\n* @example\n* var gsortins = require( '@stdlib/blas/ext/base/gsortins' );\n*\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n*\n* gsortins( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* @example\n* var gsortins = require( '@stdlib/blas/ext/base/gsortins' );\n*\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n*\n* gsortins.ndarray( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.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", "[701,301,132,57,23,10,4,1]\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar GAPS = require( './gaps.json' );\n\n\n// VARIABLES //\n\nvar NGAPS = GAPS.length;\n\n\n// MAIN //\n\n/**\n* Sorts a strided array using Shellsort.\n*\n* ## Notes\n*\n* - This implementation uses the gap sequence proposed by Ciura (2001).\n*\n* ## References\n*\n* - Shell, Donald L. 1959. \"A High-Speed Sorting Procedure.\" _Communications of the ACM_ 2 (7). Association for Computing Machinery: 30\u201332. doi:[10.1145/368370.368387](https://doi.org/10.1145/368370.368387).\n* - Ciura, Marcin. 2001. \"Best Increments for the Average Case of Shellsort.\" In _Fundamentals of Computation Theory_, 106\u201317. Springer Berlin Heidelberg. doi:[10.1007/3-540-44669-9\\_12](https://doi.org/10.1007/3-540-44669-9_12).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n*\n* gsortsh( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction gsortsh( N, order, x, stride ) {\n\tvar offset;\n\tvar flg;\n\tvar gap;\n\tvar v;\n\tvar u;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t}\n\tif ( stride < 0 ) {\n\t\toffset = (1-N) * stride;\n\t} else {\n\t\toffset = 0;\n\t}\n\tfor ( i = 0; i < NGAPS; i++ ) {\n\t\tgap = GAPS[ i ];\n\t\tfor ( j = gap; j < N; j++ ) {\n\t\t\tv = x[ offset+(j*stride) ];\n\n\t\t\t// If `NaN`, the current value is already sorted to its place...\n\t\t\tif ( isnan( v ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Perform insertion sort on the \"gapped\" subarray...\n\t\t\tflg = isNegativeZero( v );\n\t\t\tfor ( k = j; k >= gap; k -= gap ) {\n\t\t\t\tu = x[ offset+((k-gap)*stride) ];\n\t\t\t\tif ( u <= v && !(flg && u === v) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ offset+(k*stride) ] = u;\n\t\t\t}\n\t\t\tx[ offset+(k*stride) ] = v;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsortsh;\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 isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isnan = require( '@stdlib/math/base/assert/is-nan' );\nvar GAPS = require( './gaps.json' );\n\n\n// VARIABLES //\n\nvar NGAPS = GAPS.length;\n\n\n// MAIN //\n\n/**\n* Sorts a strided array using Shellsort.\n*\n* ## Notes\n*\n* - This implementation uses the gap sequence proposed by Ciura (2001).\n*\n* ## References\n*\n* - Shell, Donald L. 1959. \"A High-Speed Sorting Procedure.\" _Communications of the ACM_ 2 (7). Association for Computing Machinery: 30\u201332. doi:[10.1145/368370.368387](https://doi.org/10.1145/368370.368387).\n* - Ciura, Marcin. 2001. \"Best Increments for the Average Case of Shellsort.\" In _Fundamentals of Computation Theory_, 106\u201317. Springer Berlin Heidelberg. doi:[10.1007/3-540-44669-9\\_12](https://doi.org/10.1007/3-540-44669-9_12).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n*\n* gsortsh( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction gsortsh( N, order, x, stride, offset ) {\n\tvar flg;\n\tvar gap;\n\tvar v;\n\tvar u;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t\toffset -= (N-1) * stride;\n\t}\n\tfor ( i = 0; i < NGAPS; i++ ) {\n\t\tgap = GAPS[ i ];\n\t\tfor ( j = gap; j < N; j++ ) {\n\t\t\tv = x[ offset+(j*stride) ];\n\n\t\t\t// If `NaN`, the current value is already sorted to its place...\n\t\t\tif ( isnan( v ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Perform insertion sort on the \"gapped\" subarray...\n\t\t\tflg = isNegativeZero( v );\n\t\t\tfor ( k = j; k >= gap; k -= gap ) {\n\t\t\t\tu = x[ offset+((k-gap)*stride) ];\n\t\t\t\tif ( u <= v && !(flg && u === v) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ offset+(k*stride) ] = u;\n\t\t\t}\n\t\t\tx[ offset+(k*stride) ] = v;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsortsh;\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* Sort a strided array using Shellsort.\n*\n* @module @stdlib/blas/ext/base/gsortsh\n*\n* @example\n* var gsortsh = require( '@stdlib/blas/ext/base/gsortsh' );\n*\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n*\n* gsortsh( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* @example\n* var gsortsh = require( '@stdlib/blas/ext/base/gsortsh' );\n*\n* var x = [ 1.0, -2.0, 3.0, -4.0 ];\n*\n* gsortsh.ndarray( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.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", "/**\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gsumkbn( N, x, 1 );\n* // returns 1.0\n*/\nfunction gsumkbn( N, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc += (sum-t) + v;\n\t\t} else {\n\t\t\tc += (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tix += stride;\n\t}\n\treturn sum + c;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsumkbn;\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gsumkbn( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction gsumkbn( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc += (sum-t) + v;\n\t\t} else {\n\t\t\tc += (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tix += stride;\n\t}\n\treturn sum + c;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsumkbn;\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* Compute the sum of strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/gsumkbn\n*\n* @example\n* var gsumkbn = require( '@stdlib/blas/ext/base/gsumkbn' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gsumkbn( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gsumkbn = require( '@stdlib/blas/ext/base/gsumkbn' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gsumkbn.ndarray( N, x, 2, 1 );\n* // returns 5.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", "/**\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 gsumkbn = require( './../../../../ext/base/gsumkbn' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gsum( N, x, 1 );\n* // returns 1.0\n*/\nfunction gsum( N, x, stride ) {\n\treturn gsumkbn( N, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsum;\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 gsumkbn = require( './../../../../ext/base/gsumkbn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gsum( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction gsum( N, x, stride, offset ) {\n\treturn gsumkbn( N, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsum;\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* Compute the sum of strided array elements.\n*\n* @module @stdlib/blas/ext/base/gsum\n*\n* @example\n* var gsum = require( '@stdlib/blas/ext/base/gsum' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gsum( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gsum = require( '@stdlib/blas/ext/base/gsum' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gsum.ndarray( N, x, 2, 1 );\n* // returns 5.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", "/**\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gsumkbn2( N, x, 1 );\n* // returns 1.0\n*/\nfunction gsumkbn2( N, x, stride ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = (sum-t) + v;\n\t\t} else {\n\t\t\tc = (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tt = cs + c;\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = (cs-t) + c;\n\t\t} else {\n\t\t\tcc = (c-t) + cs;\n\t\t}\n\t\tcs = t;\n\t\tccs += cc;\n\t\tix += stride;\n\t}\n\treturn sum + cs + ccs;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsumkbn2;\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 abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gsumkbn2( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction gsumkbn2( N, x, stride, offset ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = sum + v;\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = (sum-t) + v;\n\t\t} else {\n\t\t\tc = (v-t) + sum;\n\t\t}\n\t\tsum = t;\n\t\tt = cs + c;\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = (cs-t) + c;\n\t\t} else {\n\t\t\tcc = (c-t) + cs;\n\t\t}\n\t\tcs = t;\n\t\tccs += cc;\n\t\tix += stride;\n\t}\n\treturn sum + cs + ccs;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsumkbn2;\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* Compute the sum of strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/gsumkbn2\n*\n* @example\n* var gsumkbn2 = require( '@stdlib/blas/ext/base/gsumkbn2' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gsumkbn2( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gsumkbn2 = require( '@stdlib/blas/ext/base/gsumkbn2' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gsumkbn2.ndarray( N, x, 2, 1 );\n* // returns 5.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", "/**\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// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gsumors( N, x, 1 );\n* // returns 1.0\n*/\nfunction gsumors( N, x, stride ) {\n\tvar ix;\n\tvar m;\n\tvar s;\n\tvar i;\n\n\ts = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn s;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\t// If the stride is equal to `1`, use unrolled loops...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ts += x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn s;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ts += x[i] + x[i+1] + x[i+2] + x[i+3] + x[i+4] + x[i+5];\n\t\t}\n\t\treturn s;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ts += x[ ix ];\n\t\tix += stride;\n\t}\n\treturn s;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsumors;\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// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gsumors( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction gsumors( N, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar s;\n\tvar i;\n\n\ts = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn s;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\n\t// If the stride is equal to `1`, use unrolled loops...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ts += x[ ix ];\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn s;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ts += x[ix] + x[ix+1] + x[ix+2] + x[ix+3] + x[ix+4] + x[ix+5];\n\t\t\tix += M;\n\t\t}\n\t\treturn s;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ts += x[ ix ];\n\t\tix += stride;\n\t}\n\treturn s;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsumors;\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* Compute the sum of strided array elements using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/gsumors\n*\n* @example\n* var gsumors = require( '@stdlib/blas/ext/base/gsumors' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gsumors( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gsumors = require( '@stdlib/blas/ext/base/gsumors' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gsumors.ndarray( N, x, 2, 1 );\n* // returns 5.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", "/**\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 floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gsumpw( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction gsumpw( N, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = x[ ix ];\n\t\ts1 = x[ ix+stride ];\n\t\ts2 = x[ ix+(2*stride) ];\n\t\ts3 = x[ ix+(3*stride) ];\n\t\ts4 = x[ ix+(4*stride) ];\n\t\ts5 = x[ ix+(5*stride) ];\n\t\ts6 = x[ ix+(6*stride) ];\n\t\ts7 = x[ ix+(7*stride) ];\n\t\tix += 8 * stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += x[ ix ];\n\t\t\ts1 += x[ ix+stride ];\n\t\t\ts2 += x[ ix+(2*stride) ];\n\t\t\ts3 += x[ ix+(3*stride) ];\n\t\t\ts4 += x[ ix+(4*stride) ];\n\t\t\ts5 += x[ ix+(5*stride) ];\n\t\t\ts6 += x[ ix+(6*stride) ];\n\t\t\ts7 += x[ ix+(7*stride) ];\n\t\t\tix += 8 * stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn gsumpw( n, x, stride, ix ) + gsumpw( N-n, x, stride, ix+(n*stride) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsumpw;\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 sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gsumpw( N, x, 1 );\n* // returns 1.0\n*/\nfunction gsumpw( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gsumpw;\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* Compute the sum of strided array elements using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/gsumpw\n*\n* @example\n* var gsumpw = require( '@stdlib/blas/ext/base/gsumpw' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n* var N = x.length;\n*\n* var v = gsumpw( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gsumpw = require( '@stdlib/blas/ext/base/gsumpw' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var v = gsumpw.ndarray( N, x, 2, 1 );\n* // returns 5.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", "/**\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each element in a single-precision floating-point strided array.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* sapx( x.length, 5.0, x, 1 );\n* // x => [ 3.0, 6.0, 8.0, 0.0, 9.0, 5.0, 4.0, 2.0 ]\n*/\nfunction sapx( N, alpha, x, stride ) {\n\tvar ix;\n\tvar i;\n\tvar m;\n\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ i ] += alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] += alpha;\n\t\t\tx[ i+1 ] += alpha;\n\t\t\tx[ i+2 ] += alpha;\n\t\t\tx[ i+3 ] += alpha;\n\t\t\tx[ i+4 ] += alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] += alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapx;\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// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each element in a single-precision floating-point strided array.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );\n* var alpha = 5.0;\n*\n* sapx( 3, alpha, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, 1.0, 10.0, -1.0 ]\n*/\nfunction sapx( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] += alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ ix ] += alpha;\n\t\t\tx[ ix+1 ] += alpha;\n\t\t\tx[ ix+2 ] += alpha;\n\t\t\tx[ ix+3 ] += alpha;\n\t\t\tx[ ix+4 ] += alpha;\n\t\t\tix += M;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] += alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapx;\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 sapx = require( './sapx.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sapx, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sapx;\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* Add a constant to each element in a single-precision floating-point strided array.\n*\n* @module @stdlib/blas/ext/base/sapx\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sapx = require( '@stdlib/blas/ext/base/sapx' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* sapx( x.length, 5.0, x, 1 );\n* // x => [ 3.0, 6.0, 8.0, 0.0, 9.0, 5.0, 4.0, 2.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sapx = require( '@stdlib/blas/ext/base/sapx' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* sapx.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ 3.0, 6.0, 8.0, 0.0, 9.0, 5.0, 4.0, 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 sapx;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsapx = main;\n} else {\n\tsapx = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapx;\n\n// exports: { \"ndarray\": \"sapx.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sapxsumkbn( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction sapxsumkbn( N, alpha, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn float64ToFloat32( alpha + x[ 0 ] );\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = float64ToFloat32( alpha + x[ ix ] );\n\t\tt = float64ToFloat32( sum + v );\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( sum-t ) + v ) ); // eslint-disable-line max-len\n\t\t} else {\n\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( v-t ) + sum ) ); // eslint-disable-line max-len\n\t\t}\n\t\tsum = t;\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( sum + c );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumkbn;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sapxsumkbn( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction sapxsumkbn( N, alpha, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn float64ToFloat32( alpha + x[ offset ] );\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = float64ToFloat32( alpha + x[ ix ] );\n\t\tt = float64ToFloat32( sum + v );\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( sum-t ) + v ) ); // eslint-disable-line max-len\n\t\t} else {\n\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( v-t ) + sum ) ); // eslint-disable-line max-len\n\t\t}\n\t\tsum = t;\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( sum + c );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumkbn;\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 sapxsumkbn = require( './sapxsumkbn.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sapxsumkbn, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumkbn;\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* Add a constant to each single-precision floating-point strided array element and compute the sum using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/sapxsumkbn\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sapxsumkbn = require( '@stdlib/blas/ext/base/sapxsumkbn' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sapxsumkbn( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var sapxsumkbn = require( '@stdlib/blas/ext/base/sapxsumkbn' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sapxsumkbn.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 sapxsumkbn;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsapxsumkbn = main;\n} else {\n\tsapxsumkbn = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumkbn;\n\n// exports: { \"ndarray\": \"sapxsumkbn.ndarray\" }\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 sapxsumkbn = require( './../../../../ext/base/sapxsumkbn' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sapxsum( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction sapxsum( N, alpha, x, stride ) {\n\treturn sapxsumkbn( N, alpha, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsum;\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 sapxsumkbn = require( './../../../../ext/base/sapxsumkbn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sapxsum( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction sapxsum( N, alpha, x, stride, offset ) {\n\treturn sapxsumkbn( N, alpha, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsum;\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 sapxsum = require( './sapxsum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sapxsum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sapxsum;\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* Add a constant to each single-precision floating-point strided array element and compute the sum.\n*\n* @module @stdlib/blas/ext/base/sapxsum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sapxsum = require( '@stdlib/blas/ext/base/sapxsum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sapxsum( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var sapxsum = require( '@stdlib/blas/ext/base/sapxsum' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sapxsum.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 sapxsum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsapxsum = main;\n} else {\n\tsapxsum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsum;\n\n// exports: { \"ndarray\": \"sapxsum.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sapxsumkbn2( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction sapxsumkbn2( N, alpha, x, stride ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn float64ToFloat32( alpha + x[ 0 ] );\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = float64ToFloat32( alpha + x[ ix ] );\n\t\tt = float64ToFloat32( sum+v );\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = float64ToFloat32( float64ToFloat32( sum-t ) + v );\n\t\t} else {\n\t\t\tc = float64ToFloat32( float64ToFloat32( v-t ) + sum );\n\t\t}\n\t\tsum = t;\n\t\tt = float64ToFloat32( cs+c );\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = float64ToFloat32( float64ToFloat32( cs-t ) + c );\n\t\t} else {\n\t\t\tcc = float64ToFloat32( float64ToFloat32( c-t ) + cs );\n\t\t}\n\t\tcs = t;\n\t\tccs = float64ToFloat32( ccs+cc );\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( sum + float64ToFloat32( cs+ccs ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumkbn2;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sapxsumkbn2( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction sapxsumkbn2( N, alpha, x, stride, offset ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn float64ToFloat32( alpha + x[ offset ] );\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = float64ToFloat32( alpha + x[ ix ] );\n\t\tt = float64ToFloat32( sum+v );\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = float64ToFloat32( float64ToFloat32( sum-t ) + v );\n\t\t} else {\n\t\t\tc = float64ToFloat32( float64ToFloat32( v-t ) + sum );\n\t\t}\n\t\tsum = t;\n\t\tt = float64ToFloat32( cs+c );\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = float64ToFloat32( float64ToFloat32( cs-t ) + c );\n\t\t} else {\n\t\t\tcc = float64ToFloat32( float64ToFloat32( c-t ) + cs );\n\t\t}\n\t\tcs = t;\n\t\tccs = float64ToFloat32( ccs+cc );\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( sum + float64ToFloat32( cs+ccs ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumkbn2;\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 sapxsumkbn2 = require( './sapxsumkbn2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sapxsumkbn2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumkbn2;\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* Add a constant to each single-precision floating-point strided array element and compute the sum using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/sapxsumkbn2\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sapxsumkbn2 = require( '@stdlib/blas/ext/base/sapxsumkbn2' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sapxsumkbn2( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var sapxsumkbn2 = require( '@stdlib/blas/ext/base/sapxsumkbn2' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sapxsumkbn2.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 sapxsumkbn2;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsapxsumkbn2 = main;\n} else {\n\tsapxsumkbn2 = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumkbn2;\n\n// exports: { \"ndarray\": \"sapxsumkbn2.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sapxsumors( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction sapxsumors( N, alpha, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn float64ToFloat32( alpha + x[ 0 ] );\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum = float64ToFloat32( sum + float64ToFloat32( alpha+x[ ix ] ) );\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumors;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sapxsumors( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction sapxsumors( N, alpha, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn float64ToFloat32( alpha + x[ 0 ] );\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum = float64ToFloat32( sum + float64ToFloat32( alpha+x[ ix ] ) );\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumors;\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 sapxsumors = require( './sapxsumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sapxsumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumors;\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* Add a constant to each single-precision floating-point strided array element and compute the sum using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/sapxsumors\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sapxsumors = require( '@stdlib/blas/ext/base/sapxsumors' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sapxsumors( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var sapxsumors = require( '@stdlib/blas/ext/base/sapxsumors' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sapxsumors.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 sapxsumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsapxsumors = main;\n} else {\n\tsapxsumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumors;\n\n// exports: { \"ndarray\": \"sapxsumors.ndarray\" }\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/* eslint-disable max-len */\n\n'use strict';\n\n// MODULES //\n\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sapxsumpw( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction sapxsumpw( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn float64ToFloat32( alpha + x[ offset ] );\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts = float64ToFloat32( s + float64ToFloat32( alpha + x[ ix ] ) );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = float64ToFloat32( alpha + x[ ix ] );\n\t\ts1 = float64ToFloat32( alpha + x[ ix+stride ] );\n\t\ts2 = float64ToFloat32( alpha + x[ ix+(2*stride) ] );\n\t\ts3 = float64ToFloat32( alpha + x[ ix+(3*stride) ] );\n\t\ts4 = float64ToFloat32( alpha + x[ ix+(4*stride) ] );\n\t\ts5 = float64ToFloat32( alpha + x[ ix+(5*stride) ] );\n\t\ts6 = float64ToFloat32( alpha + x[ ix+(6*stride) ] );\n\t\ts7 = float64ToFloat32( alpha + x[ ix+(7*stride) ] );\n\t\tix += 8 * stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 = float64ToFloat32( s0 + float64ToFloat32( alpha + x[ ix ] ) );\n\t\t\ts1 = float64ToFloat32( s1 + float64ToFloat32( alpha + x[ ix+stride ] ) );\n\t\t\ts2 = float64ToFloat32( s2 + float64ToFloat32( alpha + x[ ix+(2*stride) ] ) );\n\t\t\ts3 = float64ToFloat32( s3 + float64ToFloat32( alpha + x[ ix+(3*stride) ] ) );\n\t\t\ts4 = float64ToFloat32( s4 + float64ToFloat32( alpha + x[ ix+(4*stride) ] ) );\n\t\t\ts5 = float64ToFloat32( s5 + float64ToFloat32( alpha + x[ ix+(5*stride) ] ) );\n\t\t\ts6 = float64ToFloat32( s6 + float64ToFloat32( alpha + x[ ix+(6*stride) ] ) );\n\t\t\ts7 = float64ToFloat32( s7 + float64ToFloat32( alpha + x[ ix+(7*stride) ] ) );\n\t\t\tix += 8 * stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = float64ToFloat32( float64ToFloat32( float64ToFloat32(s0+s1) + float64ToFloat32(s2+s3) ) + float64ToFloat32( float64ToFloat32(s4+s5) + float64ToFloat32(s6+s7) ) );\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\ts = float64ToFloat32( s + float64ToFloat32( alpha + x[ ix ] ) );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn float64ToFloat32( sapxsumpw( n, alpha, x, stride, ix ) + sapxsumpw( N-n, alpha, x, stride, ix+(n*stride) ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumpw;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sapxsumpw( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction sapxsumpw( N, alpha, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn float64ToFloat32( alpha + x[ 0 ] );\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts = float64ToFloat32( s + float64ToFloat32( alpha + x[ ix ] ) );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, alpha, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumpw;\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 sapxsumpw = require( './sapxsumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sapxsumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumpw;\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* Add a constant to each single-precision floating-point strided array element and compute the sum using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/sapxsumpw\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sapxsumpw = require( '@stdlib/blas/ext/base/sapxsumpw' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sapxsumpw( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var sapxsumpw = require( '@stdlib/blas/ext/base/sapxsumpw' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sapxsumpw.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 sapxsumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsapxsumpw = main;\n} else {\n\tsapxsumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sapxsumpw;\n\n// exports: { \"ndarray\": \"sapxsumpw.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar floor = require( '@stdlib/math/base/special/floor' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values (L1 norm) of single-precision floating-point strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sasumpw( N, x, 2, 1 );\n* // returns 9.0\n*/\nfunction sasumpw( N, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn abs( x[ offset ] );\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts = float64ToFloat32( s + abs( x[ ix ] ) );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = abs( x[ ix ] );\n\t\ts1 = abs( x[ ix+stride ] );\n\t\ts2 = abs( x[ ix+(2*stride) ] );\n\t\ts3 = abs( x[ ix+(3*stride) ] );\n\t\ts4 = abs( x[ ix+(4*stride) ] );\n\t\ts5 = abs( x[ ix+(5*stride) ] );\n\t\ts6 = abs( x[ ix+(6*stride) ] );\n\t\ts7 = abs( x[ ix+(7*stride) ] );\n\t\tix += 8 * stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 = float64ToFloat32( s0 + abs( x[ ix ] ) );\n\t\t\ts1 = float64ToFloat32( s1 + abs( x[ ix+stride ] ) );\n\t\t\ts2 = float64ToFloat32( s2 + abs( x[ ix+(2*stride) ] ) );\n\t\t\ts3 = float64ToFloat32( s3 + abs( x[ ix+(3*stride) ] ) );\n\t\t\ts4 = float64ToFloat32( s4 + abs( x[ ix+(4*stride) ] ) );\n\t\t\ts5 = float64ToFloat32( s5 + abs( x[ ix+(5*stride) ] ) );\n\t\t\ts6 = float64ToFloat32( s6 + abs( x[ ix+(6*stride) ] ) );\n\t\t\ts7 = float64ToFloat32( s7 + abs( x[ ix+(7*stride) ] ) );\n\t\t\tix += 8 * stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = float64ToFloat32( float64ToFloat32( float64ToFloat32(s0+s1) + float64ToFloat32(s2+s3) ) + float64ToFloat32( float64ToFloat32(s4+s5) + float64ToFloat32(s6+s7) ) ); // eslint-disable-line max-len\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\ts = float64ToFloat32( s + abs( x[ ix ] ) );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn float64ToFloat32( sasumpw( n, x, stride, ix ) + sasumpw( N-n, x, stride, ix+(n*stride) ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = sasumpw;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values (L1 norm) of single-precision floating-point strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sasumpw( N, x, 1 );\n* // returns 5.0\n*/\nfunction sasumpw( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn abs( x[ 0 ] );\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts = float64ToFloat32( s + abs( x[ ix ] ) );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sasumpw;\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 sasumpw = require( './sasumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sasumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sasumpw;\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* Compute the sum of absolute values (L1 norm) of single-precision floating-point strided array elements using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/sasumpw\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sasumpw = require( '@stdlib/blas/ext/base/sasumpw' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sasumpw( N, x, 1 );\n* // returns 5.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var sasumpw = require( '@stdlib/blas/ext/base/sasumpw' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sasumpw.ndarray( N, x, 2, 1 );\n* // returns 9.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 sasumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsasumpw = main;\n} else {\n\tsasumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sasumpw;\n\n// exports: { \"ndarray\": \"sasumpw.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of single-precision floating-point strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float32Array( x.length );\n* var N = x.length;\n*\n* var v = scusumkbn( N, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction scusumkbn( N, sum, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar s;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\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\ts = sum;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = float64ToFloat32( s + v );\n\t\tif ( abs( s ) >= abs( v ) ) {\n\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( s-t ) + v ) ); // eslint-disable-line max-len\n\t\t} else {\n\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( v-t ) + s ) ); // eslint-disable-line max-len\n\t\t}\n\t\ts = t;\n\t\ty[ iy ] = float64ToFloat32( s + c );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusumkbn;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of single-precision floating-point strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float32Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* var v = scusumkbn( N, 0.0, x, 2, 1, y, 1, 0 );\n* // returns [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction scusumkbn( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar s;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\ts = sum;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = float64ToFloat32( s + v );\n\t\tif ( abs( s ) >= abs( v ) ) {\n\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( s-t ) + v ) ); // eslint-disable-line max-len\n\t\t} else {\n\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( v-t ) + s ) ); // eslint-disable-line max-len\n\t\t}\n\t\ts = t;\n\t\ty[ iy ] = float64ToFloat32( s + c );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusumkbn;\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 scusumkbn = require( './scusumkbn.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( scusumkbn, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = scusumkbn;\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* Compute the cumulative sum of single-precision floating-point strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/scusumkbn\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var scusumkbn = require( '@stdlib/blas/ext/base/scusumkbn' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float32Array( x.length );\n* var N = x.length;\n*\n* scusumkbn( N, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var scusumkbn = require( '@stdlib/blas/ext/base/scusumkbn' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float32Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* scusumkbn.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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 scusumkbn;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tscusumkbn = main;\n} else {\n\tscusumkbn = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusumkbn;\n\n// exports: { \"ndarray\": \"scusumkbn.ndarray\" }\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 scusumkbn = require( './../../../../ext/base/scusumkbn' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of single-precision floating-point strided array elements.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float32Array( x.length );\n* var N = x.length;\n*\n* var v = scusum( N, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction scusum( N, sum, x, strideX, y, strideY ) {\n\treturn scusumkbn( N, sum, x, strideX, y, strideY );\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusum;\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 scusumkbn = require( './../../../../ext/base/scusumkbn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of single-precision floating-point strided array elements.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float32Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* var v = scusum( N, 0.0, x, 2, 1, y, 1, 0 );\n* // returns [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction scusum( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\treturn scusumkbn( N, sum, x, strideX, offsetX, y, strideY, offsetY );\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusum;\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 scusum = require( './scusum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( scusum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = scusum;\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* Compute the cumulative sum of single-precision floating-point strided array elements.\n*\n* @module @stdlib/blas/ext/base/scusum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var scusum = require( '@stdlib/blas/ext/base/scusum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float32Array( x.length );\n* var N = x.length;\n*\n* scusum( N, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var scusum = require( '@stdlib/blas/ext/base/scusum' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float32Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* scusum.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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 scusum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tscusum = main;\n} else {\n\tscusum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusum;\n\n// exports: { \"ndarray\": \"scusum.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of single-precision floating-point strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float32Array( x.length );\n* var N = x.length;\n*\n* var v = scusumkbn2( N, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction scusumkbn2( N, sum, x, strideX, y, strideY ) {\n\tvar ccs;\n\tvar ix;\n\tvar iy;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\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\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = float64ToFloat32( sum+v );\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = float64ToFloat32( float64ToFloat32( sum-t ) + v );\n\t\t} else {\n\t\t\tc = float64ToFloat32( float64ToFloat32( v-t ) + sum );\n\t\t}\n\t\tsum = t;\n\t\tt = float64ToFloat32( cs+c );\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = float64ToFloat32( float64ToFloat32( cs-t ) + c );\n\t\t} else {\n\t\t\tcc = float64ToFloat32( float64ToFloat32( c-t ) + cs );\n\t\t}\n\t\tcs = t;\n\t\tccs = float64ToFloat32( ccs+cc );\n\n\t\ty[ iy ] = float64ToFloat32( sum + float64ToFloat32( cs+ccs ) );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusumkbn2;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of single-precision floating-point strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float32Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* var v = scusumkbn2( N, 0.0, x, 2, 1, y, 1, 0 );\n* // returns [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction scusumkbn2( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ccs;\n\tvar ix;\n\tvar iy;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = float64ToFloat32( sum+v );\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = float64ToFloat32( float64ToFloat32( sum-t ) + v );\n\t\t} else {\n\t\t\tc = float64ToFloat32( float64ToFloat32( v-t ) + sum );\n\t\t}\n\t\tsum = t;\n\t\tt = float64ToFloat32( cs+c );\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = float64ToFloat32( float64ToFloat32( cs-t ) + c );\n\t\t} else {\n\t\t\tcc = float64ToFloat32( float64ToFloat32( c-t ) + cs );\n\t\t}\n\t\tcs = t;\n\t\tccs = float64ToFloat32( ccs+cc );\n\n\t\ty[ iy ] = float64ToFloat32( sum + float64ToFloat32( cs+ccs ) );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusumkbn2;\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 scusumkbn2 = require( './scusumkbn2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( scusumkbn2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = scusumkbn2;\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* Compute the cumulative sum of single-precision floating-point strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/scusumkbn2\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var scusumkbn2 = require( '@stdlib/blas/ext/base/scusumkbn2' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float32Array( x.length );\n* var N = x.length;\n*\n* scusumkbn2( N, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var scusumkbn2 = require( '@stdlib/blas/ext/base/scusumkbn2' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float32Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* scusumkbn2.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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 scusumkbn2;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tscusumkbn2 = main;\n} else {\n\tscusumkbn2 = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusumkbn2;\n\n// exports: { \"ndarray\": \"scusumkbn2.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of single-precision floating-point strided array elements using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float32Array( x.length );\n* var N = x.length;\n*\n* var v = scusumors( N, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction scusumors( N, sum, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\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\tfor ( i = 0; i < N; i++ ) {\n\t\tsum = float64ToFloat32( sum + x[ ix ] );\n\t\ty[ iy ] = sum;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusumors;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of single-precision floating-point strided array elements using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float32Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* var v = scusumors( N, 0.0, x, 2, 1, y, 1, 0 );\n* // returns [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction scusumors( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum = float64ToFloat32( sum + x[ ix ] );\n\t\ty[ iy ] = sum;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusumors;\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 scusumors = require( './scusumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( scusumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = scusumors;\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* Compute the cumulative sum of single-precision floating-point strided array elements using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/scusumors\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var scusumors = require( '@stdlib/blas/ext/base/scusumors' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float32Array( x.length );\n* var N = x.length;\n*\n* scusumors( N, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var scusumors = require( '@stdlib/blas/ext/base/scusumors' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float32Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* scusumors.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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 scusumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tscusumors = main;\n} else {\n\tscusumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusumors;\n\n// exports: { \"ndarray\": \"scusumors.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation:\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of single-precision floating-point strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float32Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* var v = scusumpw( N, 0.0, x, 2, 1, y, 1, 0 );\n* // returns [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ]\n*/\nfunction scusumpw( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\tif ( N <= BLOCKSIZE ) {\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts = float64ToFloat32( s + x[ ix ] );\n\t\t\ty[ iy ] = float64ToFloat32( sum + s );\n\t\t\tix += strideX;\n\t\t\tiy += strideY;\n\t\t}\n\t\treturn y;\n\t}\n\tn = floor( N/2 );\n\tscusumpw( n, sum, x, strideX, ix, y, strideY, iy );\n\tiy += (n-1) * strideY;\n\tscusumpw( N-n, y[ iy ], x, strideX, ix+(n*strideX), y, strideY, iy+strideY ); // eslint-disable-line max-len\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusumpw;\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 cusum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the cumulative sum of single-precision floating-point strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} sum - initial sum\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float32Array( x.length );\n* var N = x.length;\n*\n* var v = scusumpw( N, 0.0, x, 1, y, 1 );\n* // returns [ 1.0, -1.0, 1.0 ]\n*/\nfunction scusumpw( N, sum, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\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\treturn cusum( N, sum, x, strideX, ix, y, strideY, iy );\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusumpw;\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 scusumpw = require( './scusumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( scusumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = scusumpw;\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* Compute the cumulative sum of single-precision floating-point strided array elements using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/scusumpw\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var scusumpw = require( '@stdlib/blas/ext/base/scusumpw' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var y = new Float32Array( x.length );\n* var N = x.length;\n*\n* scusumpw( N, 0.0, x, 1, y, 1 );\n* // y => [ 1.0, -1.0, 1.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var scusumpw = require( '@stdlib/blas/ext/base/scusumpw' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var y = new Float32Array( x.length );\n* var N = floor( x.length / 2 );\n*\n* scusumpw.ndarray( N, 0.0, x, 2, 1, y, 1, 0 );\n* // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.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 scusumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tscusumpw = main;\n} else {\n\tscusumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scusumpw;\n\n// exports: { \"ndarray\": \"scusumpw.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using pairwise summation with extended accumulation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sdsapxsumpw( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction sdsapxsumpw( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn float64ToFloat32( alpha + x[ offset ] );\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += alpha + x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn float64ToFloat32( s );\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = alpha + x[ ix ];\n\t\ts1 = alpha + x[ ix+stride ];\n\t\ts2 = alpha + x[ ix+(2*stride) ];\n\t\ts3 = alpha + x[ ix+(3*stride) ];\n\t\ts4 = alpha + x[ ix+(4*stride) ];\n\t\ts5 = alpha + x[ ix+(5*stride) ];\n\t\ts6 = alpha + x[ ix+(6*stride) ];\n\t\ts7 = alpha + x[ ix+(7*stride) ];\n\t\tix += 8 * stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += alpha + x[ ix ];\n\t\t\ts1 += alpha + x[ ix+stride ];\n\t\t\ts2 += alpha + x[ ix+(2*stride) ];\n\t\t\ts3 += alpha + x[ ix+(3*stride) ];\n\t\t\ts4 += alpha + x[ ix+(4*stride) ];\n\t\t\ts5 += alpha + x[ ix+(5*stride) ];\n\t\t\ts6 += alpha + x[ ix+(6*stride) ];\n\t\t\ts7 += alpha + x[ ix+(7*stride) ];\n\t\t\tix += 8 * stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\ts += alpha + x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn float64ToFloat32( s );\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn float64ToFloat32( sdsapxsumpw( n, alpha, x, stride, ix ) + sdsapxsumpw( N-n, alpha, x, stride, ix+(n*stride) ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsapxsumpw;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using pairwise summation with extended accumulation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sdsapxsumpw( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction sdsapxsumpw( N, alpha, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn float64ToFloat32( alpha + x[ 0 ] );\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += alpha + x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn float64ToFloat32( s );\n\t}\n\treturn sum( N, alpha, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsapxsumpw;\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 sdsapxsumpw = require( './sdsapxsumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sdsapxsumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sdsapxsumpw;\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* Add a constant to each single-precision floating-point strided array element and compute the sum using pairwise summation with extended accumulation.\n*\n* @module @stdlib/blas/ext/base/sdsapxsumpw\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdsapxsumpw = require( '@stdlib/blas/ext/base/sdsapxsumpw' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sdsapxsumpw( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var sdsapxsumpw = require( '@stdlib/blas/ext/base/sdsapxsumpw' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sdsapxsumpw.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 sdsapxsumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsdsapxsumpw = main;\n} else {\n\tsdsapxsumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsapxsumpw;\n\n// exports: { \"ndarray\": \"sdsapxsumpw.ndarray\" }\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 sdsapxsumpw = require( './../../../../ext/base/sdsapxsumpw' );\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using extended accumulation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sdsapxsum( N, 5.0, x, 1 );\n* // returns 16.0\n*/\nfunction sdsapxsum( N, alpha, x, stride ) {\n\treturn sdsapxsumpw( N, alpha, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsapxsum;\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 sdsapxsumpw = require( './../../../../ext/base/sdsapxsumpw' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each single-precision floating-point strided array element and computes the sum using extended accumulation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - constant\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sdsapxsum( N, 5.0, x, 2, 1 );\n* // returns 25.0\n*/\nfunction sdsapxsum( N, alpha, x, stride, offset ) {\n\treturn sdsapxsumpw( N, alpha, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsapxsum;\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 sdsapxsum = require( './sdsapxsum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sdsapxsum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sdsapxsum;\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* Add a constant to each single-precision floating-point strided array element and compute the sum using extended accumulation.\n*\n* @module @stdlib/blas/ext/base/sdsapxsum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdsapxsum = require( '@stdlib/blas/ext/base/sdsapxsum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sdsapxsum( N, 5.0, x, 1 );\n* // returns 16.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var sdsapxsum = require( '@stdlib/blas/ext/base/sdsapxsum' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sdsapxsum.ndarray( N, 5.0, x, 2, 1 );\n* // returns 25.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 sdsapxsum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsdsapxsum = main;\n} else {\n\tsdsapxsum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsapxsum;\n\n// exports: { \"ndarray\": \"sdsapxsum.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation with extended accumulation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sdsnansumpw( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction sdsnansumpw( N, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnanf( x[ offset ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( isnanf( x[ ix ] ) === false ) {\n\t\t\t\ts += x[ ix ];\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn float64ToFloat32( s );\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts1 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts2 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts3 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts4 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts5 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts6 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts7 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts1 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts2 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts3 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts4 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts5 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts6 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t\ts7 += ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\tif ( isnanf( x[ ix ] ) === false ) {\n\t\t\t\ts += x[ ix ];\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn float64ToFloat32( s );\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn float64ToFloat32( sdsnansumpw( n, x, stride, ix ) + sdsnansumpw( N-n, x, stride, ix+(n*stride) ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsnansumpw;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation with extended accumulation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = sdsnansumpw( N, x, 1 );\n* // returns 1.0\n*/\nfunction sdsnansumpw( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnanf( x[ 0 ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( isnanf( x[ ix ] ) === false ) {\n\t\t\t\ts += x[ ix ];\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn float64ToFloat32( s );\n\t}\n\treturn sum( N, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsnansumpw;\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 sdsnansumpw = require( './sdsnansumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sdsnansumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sdsnansumpw;\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* Compute the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation with extended accumulation.\n*\n* @module @stdlib/blas/ext/base/sdsnansumpw\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdsnansumpw = require( '@stdlib/blas/ext/base/sdsnansumpw' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = sdsnansumpw( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var sdsnansumpw = require( '@stdlib/blas/ext/base/sdsnansumpw' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sdsnansumpw.ndarray( N, x, 2, 1 );\n* // returns 5.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 sdsnansumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsdsnansumpw = main;\n} else {\n\tsdsnansumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsnansumpw;\n\n// exports: { \"ndarray\": \"sdsnansumpw.ndarray\" }\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 sdsnansumpw = require( './../../../../ext/base/sdsnansumpw' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using extended accumulation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = sdsnansum( N, x, 1 );\n* // returns 1.0\n*/\nfunction sdsnansum( N, x, stride ) {\n\treturn sdsnansumpw( N, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsnansum;\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 sdsnansumpw = require( './../../../../ext/base/sdsnansumpw' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using extended accumulation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sdsnansum( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction sdsnansum( N, x, stride, offset ) {\n\treturn sdsnansumpw( N, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsnansum;\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 sdsnansum = require( './sdsnansum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sdsnansum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sdsnansum;\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* Compute the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using extended accumulation.\n*\n* @module @stdlib/blas/ext/base/sdsnansum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdsnansum = require( '@stdlib/blas/ext/base/sdsnansum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = sdsnansum( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var sdsnansum = require( '@stdlib/blas/ext/base/sdsnansum' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sdsnansum.ndarray( N, x, 2, 1 );\n* // returns 5.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 sdsnansum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsdsnansum = main;\n} else {\n\tsdsnansum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsnansum;\n\n// exports: { \"ndarray\": \"sdsnansum.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using pairwise summation with extended accumulation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sdssumpw( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction sdssumpw( N, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn float64ToFloat32( s );\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = x[ ix ];\n\t\ts1 = x[ ix+stride ];\n\t\ts2 = x[ ix+(2*stride) ];\n\t\ts3 = x[ ix+(3*stride) ];\n\t\ts4 = x[ ix+(4*stride) ];\n\t\ts5 = x[ ix+(5*stride) ];\n\t\ts6 = x[ ix+(6*stride) ];\n\t\ts7 = x[ ix+(7*stride) ];\n\t\tix += 8 * stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 += x[ ix ];\n\t\t\ts1 += x[ ix+stride ];\n\t\t\ts2 += x[ ix+(2*stride) ];\n\t\t\ts3 += x[ ix+(3*stride) ];\n\t\t\ts4 += x[ ix+(4*stride) ];\n\t\t\ts5 += x[ ix+(5*stride) ];\n\t\t\ts6 += x[ ix+(6*stride) ];\n\t\t\ts7 += x[ ix+(7*stride) ];\n\t\t\tix += 8 * stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = ((s0+s1) + (s2+s3)) + ((s4+s5) + (s6+s7));\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn float64ToFloat32( s );\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn float64ToFloat32( sdssumpw( n, x, stride, ix ) + sdssumpw( N-n, x, stride, ix+(n*stride) ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdssumpw;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using pairwise summation with extended accumulation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sdssumpw( N, x, 1 );\n* // returns 1.0\n*/\nfunction sdssumpw( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts += x[ ix ];\n\t\t\tix += stride;\n\t\t}\n\t\treturn float64ToFloat32( s );\n\t}\n\treturn sum( N, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdssumpw;\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 sdssumpw = require( './sdssumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sdssumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sdssumpw;\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* Compute the sum of single-precision floating-point strided array elements using pairwise summation with extended accumulation.\n*\n* @module @stdlib/blas/ext/base/sdssumpw\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdssumpw = require( '@stdlib/blas/ext/base/sdssumpw' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sdssumpw( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var sdssumpw = require( '@stdlib/blas/ext/base/sdssumpw' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sdssumpw.ndarray( N, x, 2, 1 );\n* // returns 5.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 sdssumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsdssumpw = main;\n} else {\n\tsdssumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdssumpw;\n\n// exports: { \"ndarray\": \"sdssumpw.ndarray\" }\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 sdssumpw = require( './../../../../ext/base/sdssumpw' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using extended accumulation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sdssum( N, x, 1 );\n* // returns 1.0\n*/\nfunction sdssum( N, x, stride ) {\n\treturn sdssumpw( N, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdssum;\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 sdssumpw = require( './../../../../ext/base/sdssumpw' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using extended accumulation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sdssum( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction sdssum( N, x, stride, offset ) {\n\treturn sdssumpw( N, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdssum;\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 sdssum = require( './sdssum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sdssum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sdssum;\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* Compute the sum of single-precision floating-point strided array elements using extended accumulation.\n*\n* @module @stdlib/blas/ext/base/sdssum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdssum = require( '@stdlib/blas/ext/base/sdssum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = sdssum( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var sdssum = require( '@stdlib/blas/ext/base/sdssum' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = sdssum.ndarray( N, x, 2, 1 );\n* // returns 5.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 sdssum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsdssum = main;\n} else {\n\tsdssum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdssum;\n\n// exports: { \"ndarray\": \"sdssum.ndarray\" }\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// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Fills a single-precision floating-point strided array with a specified scalar constant.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* sfill( x.length, 5.0, x, 1 );\n* // x => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 ]\n*/\nfunction sfill( N, alpha, x, stride ) {\n\tvar ix;\n\tvar i;\n\tvar m;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ i ] = alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] = alpha;\n\t\t\tx[ i+1 ] = alpha;\n\t\t\tx[ i+2 ] = alpha;\n\t\t\tx[ i+3 ] = alpha;\n\t\t\tx[ i+4 ] = alpha;\n\t\t\tx[ i+5 ] = alpha;\n\t\t\tx[ i+6 ] = alpha;\n\t\t\tx[ i+7 ] = alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] = alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sfill;\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// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Fills a single-precision floating-point strided array with a specified scalar constant.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );\n*\n* sfill( 3, 5.0, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, 5.0, 5.0, 5.0 ]\n*/\nfunction sfill( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] = alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ ix ] = alpha;\n\t\t\tx[ ix+1 ] = alpha;\n\t\t\tx[ ix+2 ] = alpha;\n\t\t\tx[ ix+3 ] = alpha;\n\t\t\tx[ ix+4 ] = alpha;\n\t\t\tx[ ix+5 ] = alpha;\n\t\t\tx[ ix+6 ] = alpha;\n\t\t\tx[ ix+7 ] = alpha;\n\t\t\tix += M;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] = alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sfill;\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 sfill = require( './sfill.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sfill, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sfill;\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* Fill a single-precision floating-point strided array with a specified scalar constant.\n*\n* @module @stdlib/blas/ext/base/sfill\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sfill = require( '@stdlib/blas/ext/base/sfill' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* sfill( x.length, 5.0, x, 1 );\n* // x => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sfill = require( '@stdlib/blas/ext/base/sfill' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* sfill.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.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 sfill;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsfill = main;\n} else {\n\tsfill = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sfill;\n\n// exports: { \"ndarray\": \"sfill.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = snansumkbn( N, x, 1 );\n* // returns 1.0\n*/\nfunction snansumkbn( N, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnanf( x[ 0 ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnanf( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( sum-t ) + v ) ); // eslint-disable-line max-len\n\t\t\t} else {\n\t\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( v-t ) + sum ) ); // eslint-disable-line max-len\n\t\t\t}\n\t\t\tsum = t;\n\t\t}\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( sum + c );\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansumkbn;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = snansumkbn( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction snansumkbn( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnanf( x[ offset ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnanf( v ) === false ) {\n\t\t\tt = sum + v;\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( sum-t ) + v ) ); // eslint-disable-line max-len\n\t\t\t} else {\n\t\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( v-t ) + sum ) ); // eslint-disable-line max-len\n\t\t\t}\n\t\t\tsum = t;\n\t\t}\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( sum + c );\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansumkbn;\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 snansumkbn = require( './snansumkbn.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( snansumkbn, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = snansumkbn;\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* Compute the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/snansumkbn\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var snansumkbn = require( '@stdlib/blas/ext/base/snansumkbn' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = snansumkbn( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var snansumkbn = require( '@stdlib/blas/ext/base/snansumkbn' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = snansumkbn.ndarray( N, x, 2, 1 );\n* // returns 5.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 snansumkbn;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsnansumkbn = main;\n} else {\n\tsnansumkbn = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansumkbn;\n\n// exports: { \"ndarray\": \"snansumkbn.ndarray\" }\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 snansumkbn = require( './../../../../ext/base/snansumkbn' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = snansum( N, x, 1 );\n* // returns 1.0\n*/\nfunction snansum( N, x, stride ) {\n\treturn snansumkbn( N, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansum;\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 snansumkbn = require( './../../../../ext/base/snansumkbn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = snansum( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction snansum( N, x, stride, offset ) {\n\treturn snansumkbn( N, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansum;\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 snansum = require( './snansum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( snansum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = snansum;\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* Compute the sum of single-precision floating-point strided array elements, ignoring `NaN` values.\n*\n* @module @stdlib/blas/ext/base/snansum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var snansum = require( '@stdlib/blas/ext/base/snansum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = snansum( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var snansum = require( '@stdlib/blas/ext/base/snansum' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = snansum.ndarray( N, x, 2, 1 );\n* // returns 5.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 snansum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsnansum = main;\n} else {\n\tsnansum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansum;\n\n// exports: { \"ndarray\": \"snansum.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = snansumkbn2( N, x, 1 );\n* // returns 1.0\n*/\nfunction snansumkbn2( N, x, stride ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnanf( x[ 0 ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnanf( v ) === false ) {\n\t\t\tt = float64ToFloat32( sum + v );\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc = float64ToFloat32( float64ToFloat32( sum-t ) + v );\n\t\t\t} else {\n\t\t\t\tc = float64ToFloat32( float64ToFloat32( v-t ) + sum );\n\t\t\t}\n\t\t\tsum = t;\n\t\t\tt = float64ToFloat32( cs + c );\n\t\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\t\tcc = float64ToFloat32( float64ToFloat32(cs-t) + c );\n\t\t\t} else {\n\t\t\t\tcc = float64ToFloat32( float64ToFloat32(c-t) + cs );\n\t\t\t}\n\t\t\tcs = t;\n\t\t\tccs = float64ToFloat32( ccs + cc );\n\t\t}\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( sum + float64ToFloat32( cs + ccs ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansumkbn2;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = snansumkbn2( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction snansumkbn2( N, x, stride, offset ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnanf( x[ offset ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tif ( isnanf( v ) === false ) {\n\t\t\tt = float64ToFloat32( sum + v );\n\t\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\t\tc = float64ToFloat32( float64ToFloat32( sum-t ) + v );\n\t\t\t} else {\n\t\t\t\tc = float64ToFloat32( float64ToFloat32( v-t ) + sum );\n\t\t\t}\n\t\t\tsum = t;\n\t\t\tt = float64ToFloat32( cs + c );\n\t\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\t\tcc = float64ToFloat32( float64ToFloat32(cs-t) + c );\n\t\t\t} else {\n\t\t\t\tcc = float64ToFloat32( float64ToFloat32(c-t) + cs );\n\t\t\t}\n\t\t\tcs = t;\n\t\t\tccs = float64ToFloat32( ccs + cc );\n\t\t}\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( sum + float64ToFloat32( cs + ccs ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansumkbn2;\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 snansumkbn2 = require( './snansumkbn2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( snansumkbn2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = snansumkbn2;\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* Compute the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/snansumkbn2\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var snansumkbn2 = require( '@stdlib/blas/ext/base/snansumkbn2' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = snansumkbn2( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var snansumkbn2 = require( '@stdlib/blas/ext/base/snansumkbn2' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = snansumkbn2.ndarray( N, x, 2, 1 );\n* // returns 5.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 snansumkbn2;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsnansumkbn2 = main;\n} else {\n\tsnansumkbn2 = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansumkbn2;\n\n// exports: { \"ndarray\": \"snansumkbn2.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = snansumors( N, x, 1 );\n* // returns 1.0\n*/\nfunction snansumors( N, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnanf( x[ 0 ] ) ) {\n\t\t\treturn sum;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnanf( x[ ix ] ) === false ) {\n\t\t\tsum = float64ToFloat32( sum + x[ ix ] );\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansumors;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = snansumors( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction snansumors( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnanf( x[ offset ] ) ) {\n\t\t\treturn sum;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnanf( x[ ix ] ) === false ) {\n\t\t\tsum = float64ToFloat32( sum + x[ ix ] );\n\t\t}\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansumors;\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 snansumors = require( './snansumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( snansumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = snansumors;\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* Compute the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/snansumors\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var snansumors = require( '@stdlib/blas/ext/base/snansumors' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = snansumors( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var snansumors = require( '@stdlib/blas/ext/base/snansumors' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = snansumors.ndarray( N, x, 2, 1 );\n* // returns 5.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 snansumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsnansumors = main;\n} else {\n\tsnansumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansumors;\n\n// exports: { \"ndarray\": \"snansumors.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = snansumpw( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction snansumpw( N, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnanf( x[ offset ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( isnanf( x[ ix ] ) === false ) {\n\t\t\t\ts = float64ToFloat32( s + x[ ix ] );\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts1 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts2 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts3 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts4 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts5 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts6 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\t\ts7 = ( isnanf( x[ ix ] ) ) ? 0.0 : x[ ix ];\n\t\tix += stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 = ( isnanf( x[ ix ] ) ) ? s0 : float64ToFloat32( s0 + x[ ix ] );\n\t\t\tix += stride;\n\t\t\ts1 = ( isnanf( x[ ix ] ) ) ? s1 : float64ToFloat32( s1 + x[ ix ] );\n\t\t\tix += stride;\n\t\t\ts2 = ( isnanf( x[ ix ] ) ) ? s2 : float64ToFloat32( s2 + x[ ix ] );\n\t\t\tix += stride;\n\t\t\ts3 = ( isnanf( x[ ix ] ) ) ? s3 : float64ToFloat32( s3 + x[ ix ] );\n\t\t\tix += stride;\n\t\t\ts4 = ( isnanf( x[ ix ] ) ) ? s4 : float64ToFloat32( s4 + x[ ix ] );\n\t\t\tix += stride;\n\t\t\ts5 = ( isnanf( x[ ix ] ) ) ? s5 : float64ToFloat32( s5 + x[ ix ] );\n\t\t\tix += stride;\n\t\t\ts6 = ( isnanf( x[ ix ] ) ) ? s6 : float64ToFloat32( s6 + x[ ix ] );\n\t\t\tix += stride;\n\t\t\ts7 = ( isnanf( x[ ix ] ) ) ? s7 : float64ToFloat32( s7 + x[ ix ] );\n\t\t\tix += stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = float64ToFloat32( float64ToFloat32( float64ToFloat32(s0+s1) + float64ToFloat32(s2+s3) ) + float64ToFloat32( float64ToFloat32(s4+s5) + float64ToFloat32(s6+s7) ) ); // eslint-disable-line max-len\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\tif ( isnanf( x[ ix ] ) === false ) {\n\t\t\t\ts = float64ToFloat32( s + x[ ix ] );\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn float64ToFloat32( snansumpw( n, x, stride, ix ) + snansumpw( N-n, x, stride, ix+(n*stride) ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansumpw;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = snansumpw( N, x, 1 );\n* // returns 1.0\n*/\nfunction snansumpw( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\tif ( isnanf( x[ 0 ] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( isnanf( x[ ix ] ) === false ) {\n\t\t\t\ts = float64ToFloat32( s + x[ ix ] );\n\t\t\t}\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansumpw;\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 snansumpw = require( './snansumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( snansumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = snansumpw;\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* Compute the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/snansumpw\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var snansumpw = require( '@stdlib/blas/ext/base/snansumpw' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var N = x.length;\n*\n* var v = snansumpw( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var snansumpw = require( '@stdlib/blas/ext/base/snansumpw' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var N = floor( x.length / 2 );\n*\n* var v = snansumpw.ndarray( N, x, 2, 1 );\n* // returns 5.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 snansumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsnansumpw = main;\n} else {\n\tsnansumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = snansumpw;\n\n// exports: { \"ndarray\": \"snansumpw.ndarray\" }\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 floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Reverses a single-precision floating-point strided array in-place.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* srev( x.length, x, 1 );\n* // x => [ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.0 ]\n*/\nfunction srev( N, x, stride ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\tn = floor( N/2 );\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = n % M;\n\t\tiy = N - 1;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( ix = 0; ix < m; ix++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = x[ iy ];\n\t\t\t\tx[ iy ] = tmp;\n\t\t\t\tiy -= 1;\n\t\t\t}\n\t\t}\n\t\tif ( n < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( ix = m; ix < n; ix += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = x[ iy ];\n\t\t\tx[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = x[ iy-1 ];\n\t\t\tx[ iy-1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = x[ iy-2 ];\n\t\t\tx[ iy-2 ] = tmp;\n\n\t\t\tiy -= M;\n\t\t}\n\t\treturn x;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tiy = ix + ((N-1)*stride);\n\tfor ( i = 0; i < n; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = x[ iy ];\n\t\tx[ iy ] = tmp;\n\t\tix += stride;\n\t\tiy -= stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = srev;\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 floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Reverses a single-precision floating-point strided array in-place.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );\n*\n* srev( 3, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, -6.0, 5.0, -4.0 ]\n*/\nfunction srev( N, x, stride, offset ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\tn = floor( N/2 );\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = n % M;\n\t\tiy = ix + N - 1;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = x[ iy ];\n\t\t\t\tx[ iy ] = tmp;\n\t\t\t\tix += stride;\n\t\t\t\tiy -= stride;\n\t\t\t}\n\t\t}\n\t\tif ( n < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < n; i += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = x[ iy ];\n\t\t\tx[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = x[ iy-1 ];\n\t\t\tx[ iy-1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = x[ iy-2 ];\n\t\t\tx[ iy-2 ] = tmp;\n\n\t\t\tix += M;\n\t\t\tiy -= M;\n\t\t}\n\t\treturn x;\n\t}\n\tiy = ix + ((N-1)*stride);\n\tfor ( i = 0; i < n; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = x[ iy ];\n\t\tx[ iy ] = tmp;\n\t\tix += stride;\n\t\tiy -= stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = srev;\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 srev = require( './srev.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( srev, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = srev;\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* Reverse a single-precision floating-point strided array in-place.\n*\n* @module @stdlib/blas/ext/base/srev\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var srev = require( '@stdlib/blas/ext/base/srev' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* srev( x.length, x, 1 );\n* // x => [ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var srev = require( '@stdlib/blas/ext/base/srev' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* srev( x.length, x, 1, 0 );\n* // x => [ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -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 srev;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsrev = main;\n} else {\n\tsrev = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = srev;\n\n// exports: { \"ndarray\": \"srev.ndarray\" }\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 isPositiveZerof = require( '@stdlib/math/base/assert/is-positive-zerof' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two single-precision floating-point strided arrays based on the sort order of the first array using heapsort.\n*\n* ## Notes\n*\n* - This implementation uses an in-place algorithm derived from the work of Floyd (1964).\n*\n* ## References\n*\n* - Williams, John William Joseph. 1964. \"Algorithm 232: Heapsort.\" _Communications of the ACM_ 7 (6). New York, NY, USA: Association for Computing Machinery: 347\u201349. doi:[10.1145/512274.512284](https://doi.org/10.1145/512274.512284).\n* - Floyd, Robert W. 1964. \"Algorithm 245: Treesort.\" _Communications of the ACM_ 7 (12). New York, NY, USA: Association for Computing Machinery: 701. doi:[10.1145/355588.365103](https://doi.org/10.1145/355588.365103).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` index increment\n* @returns {Float32Array} `x`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* ssort2hp( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction ssort2hp( N, order, x, strideX, y, strideY ) {\n\tvar offsetX;\n\tvar offsetY;\n\tvar parent;\n\tvar child;\n\tvar v1;\n\tvar v2;\n\tvar tx;\n\tvar ty;\n\tvar ix;\n\tvar iy;\n\tvar n;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t}\n\tif ( strideX < 0 ) {\n\t\toffsetX = (1-N) * strideX;\n\t} else {\n\t\toffsetX = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\toffsetY = (1-N) * strideY;\n\t} else {\n\t\toffsetY = 0;\n\t}\n\t// Set the initial heap size:\n\tn = N;\n\n\t// Specify an initial \"parent\" index for building the heap:\n\tparent = floor( N / 2 );\n\n\t// Continue looping until the array is sorted...\n\twhile ( true ) {\n\t\tif ( parent > 0 ) {\n\t\t\t// We need to build the heap...\n\t\t\tparent -= 1;\n\t\t\ttx = x[ offsetX+(parent*strideX) ];\n\t\t\tty = y[ offsetY+(parent*strideY) ];\n\t\t} else {\n\t\t\t// Reduce the heap size:\n\t\t\tn -= 1;\n\n\t\t\t// Check if the heap is empty, and, if so, we are finished sorting...\n\t\t\tif ( n === 0 ) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\t// Store the last heap value in a temporary variable in order to make room for the heap root being placed into its sorted position:\n\t\t\tix = offsetX + (n*strideX);\n\t\t\ttx = x[ ix ];\n\t\t\tiy = offsetY + (n*strideY);\n\t\t\tty = y[ iy ];\n\n\t\t\t// Move the heap root to its sorted position:\n\t\t\tx[ ix ] = x[ offsetX ];\n\t\t\ty[ iy ] = y[ offsetY ];\n\t\t}\n\t\t// We need to \"sift down\", pushing `t` down the heap to in order to replace the parent and satisfy the heap property...\n\n\t\t// Start at the parent index:\n\t\tj = parent;\n\n\t\t// Get the \"left\" child index:\n\t\tchild = (j*2) + 1;\n\n\t\twhile ( child < n ) {\n\t\t\t// Find the largest child...\n\t\t\tk = child + 1;\n\t\t\tif ( k < n ) {\n\t\t\t\tv1 = x[ offsetX+(k*strideX) ];\n\t\t\t\tv2 = x[ offsetX+(child*strideX) ];\n\n\t\t\t\t// Check if a \"right\" child exists and is \"bigger\"...\n\t\t\t\tif ( v1 > v2 || isnanf( v1 ) || (v1 === v2 && isPositiveZerof( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t\tchild += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if the largest child is bigger than `t`...\n\t\t\tv1 = x[ offsetX+(child*strideX) ];\n\t\t\tif ( v1 > tx || isnanf( v1 ) || ( v1 === tx && isPositiveZerof( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t// Insert the larger child value:\n\t\t\t\tx[ offsetX+(j*strideX) ] = v1;\n\t\t\t\ty[ offsetY+(j*strideY) ] = y[ offsetY+(child*strideY) ];\n\n\t\t\t\t// Update `j` to point to the child index:\n\t\t\t\tj = child;\n\n\t\t\t\t// Get the \"left\" child index and repeat...\n\t\t\t\tchild = (j*2) + 1;\n\t\t\t} else {\n\t\t\t\t// We've found `t`'s place in the heap...\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Insert `t` into the heap:\n\t\tx[ offsetX+(j*strideX) ] = tx;\n\t\ty[ offsetY+(j*strideY) ] = ty;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssort2hp;\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 isPositiveZerof = require( '@stdlib/math/base/assert/is-positive-zerof' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two single-precision floating-point strided arrays based on the sort order of the first array using heapsort.\n*\n* ## Notes\n*\n* - This implementation uses an in-place algorithm derived from the work of Floyd (1964).\n*\n* ## References\n*\n* - Williams, John William Joseph. 1964. \"Algorithm 232: Heapsort.\" _Communications of the ACM_ 7 (6). New York, NY, USA: Association for Computing Machinery: 347\u201349. doi:[10.1145/512274.512284](https://doi.org/10.1145/512274.512284).\n* - Floyd, Robert W. 1964. \"Algorithm 245: Treesort.\" _Communications of the ACM_ 7 (12). New York, NY, USA: Association for Computing Machinery: 701. doi:[10.1145/355588.365103](https://doi.org/10.1145/355588.365103).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` index increment\n* @param {NonNegativeInteger} offsetY - `y` starting index\n* @returns {Float32Array} `x`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* ssort2hp( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction ssort2hp( N, order, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar parent;\n\tvar child;\n\tvar v1;\n\tvar v2;\n\tvar tx;\n\tvar ty;\n\tvar ix;\n\tvar iy;\n\tvar n;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t\toffsetX -= (N-1) * strideX;\n\t\toffsetY -= (N-1) * strideY;\n\t}\n\t// Set the initial heap size:\n\tn = N;\n\n\t// Specify an initial \"parent\" index for building the heap:\n\tparent = floor( N / 2 );\n\n\t// Continue looping until the array is sorted...\n\twhile ( true ) {\n\t\tif ( parent > 0 ) {\n\t\t\t// We need to build the heap...\n\t\t\tparent -= 1;\n\t\t\ttx = x[ offsetX+(parent*strideX) ];\n\t\t\tty = y[ offsetY+(parent*strideY) ];\n\t\t} else {\n\t\t\t// Reduce the heap size:\n\t\t\tn -= 1;\n\n\t\t\t// Check if the heap is empty, and, if so, we are finished sorting...\n\t\t\tif ( n === 0 ) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\t// Store the last heap value in a temporary variable in order to make room for the heap root being placed into its sorted position:\n\t\t\tix = offsetX + (n*strideX);\n\t\t\ttx = x[ ix ];\n\t\t\tiy = offsetY + (n*strideY);\n\t\t\tty = y[ iy ];\n\n\t\t\t// Move the heap root to its sorted position:\n\t\t\tx[ ix ] = x[ offsetX ];\n\t\t\ty[ iy ] = y[ offsetY ];\n\t\t}\n\t\t// We need to \"sift down\", pushing `t` down the heap to in order to replace the parent and satisfy the heap property...\n\n\t\t// Start at the parent index:\n\t\tj = parent;\n\n\t\t// Get the \"left\" child index:\n\t\tchild = (j*2) + 1;\n\n\t\twhile ( child < n ) {\n\t\t\t// Find the largest child...\n\t\t\tk = child + 1;\n\t\t\tif ( k < n ) {\n\t\t\t\tv1 = x[ offsetX+(k*strideX) ];\n\t\t\t\tv2 = x[ offsetX+(child*strideX) ];\n\n\t\t\t\t// Check if a \"right\" child exists and is \"bigger\"...\n\t\t\t\tif ( v1 > v2 || isnanf( v1 ) || (v1 === v2 && isPositiveZerof( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t\tchild += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if the largest child is bigger than `t`...\n\t\t\tv1 = x[ offsetX+(child*strideX) ];\n\t\t\tif ( v1 > tx || isnanf( v1 ) || ( v1 === tx && isPositiveZerof( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t// Insert the larger child value:\n\t\t\t\tx[ offsetX+(j*strideX) ] = v1;\n\t\t\t\ty[ offsetY+(j*strideY) ] = y[ offsetY+(child*strideY) ];\n\n\t\t\t\t// Update `j` to point to the child index:\n\t\t\t\tj = child;\n\n\t\t\t\t// Get the \"left\" child index and repeat...\n\t\t\t\tchild = (j*2) + 1;\n\t\t\t} else {\n\t\t\t\t// We've found `t`'s place in the heap...\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Insert `t` into the heap:\n\t\tx[ offsetX+(j*strideX) ] = tx;\n\t\ty[ offsetY+(j*strideY) ] = ty;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssort2hp;\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 ssort2hp = require( './ssort2hp.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ssort2hp, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ssort2hp;\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* Simultaneously sort two single-precision floating-point strided arrays based on the sort order of the first array using heapsort.\n*\n* @module @stdlib/blas/ext/base/ssort2hp\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssort2hp = require( '@stdlib/blas/ext/base/ssort2hp' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* ssort2hp( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssort2hp = require( '@stdlib/blas/ext/base/ssort2hp' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* ssort2hp( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 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 ssort2hp;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tssort2hp = main;\n} else {\n\tssort2hp = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssort2hp;\n\n// exports: { \"ndarray\": \"ssort2hp.ndarray\" }\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 isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two single-precision floating-point strided arrays based on the sort order of the first array using insertion sort.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` index increment\n* @returns {Float32Array} `x`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* ssort2ins( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction ssort2ins( N, order, x, strideX, y, strideY ) {\n\tvar flg;\n\tvar ix;\n\tvar jx;\n\tvar fx;\n\tvar lx;\n\tvar iy;\n\tvar jy;\n\tvar fy;\n\tvar ly;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t}\n\tif ( strideY < 0 ) {\n\t\tfy = (1-N) * strideY;\n\t\tly = 0;\n\t} else {\n\t\tfy = 0;\n\t\tly = (N-1) * strideY;\n\t}\n\tiy = fy + strideY;\n\n\tif ( strideX < 0 ) {\n\t\t// Traverse the strided array from right-to-left...\n\t\tfx = (1-N) * strideX; // first index\n\t\tlx = 0; // last index\n\t\tix = fx + strideX;\n\n\t\t// Sort in increasing order...\n\t\tfor ( i = 1; i < N; i++ ) {\n\t\t\tvx = x[ ix ];\n\t\t\tvy = y[ iy ];\n\n\t\t\t// Sort `NaN` values to the end (i.e., the left)...\n\t\t\tif ( isnanf( vx ) ) {\n\t\t\t\tjx = ix;\n\t\t\t\tjy = iy;\n\n\t\t\t\t// Shift all values (including NaNs) to the left of the current element to the right...\n\t\t\t\twhile ( jx > lx ) {\n\t\t\t\t\tx[ jx ] = x[ jx+strideX ];\n\t\t\t\t\ty[ jy ] = y[ jy+strideY ];\n\t\t\t\t\tjx += strideX;\n\t\t\t\t\tjy += strideY;\n\t\t\t\t}\n\t\t\t\tx[ lx ] = vx;\n\t\t\t\ty[ ly ] = vy;\n\t\t\t} else {\n\t\t\t\tflg = isNegativeZerof( vx );\n\t\t\t\tjx = ix - strideX;\n\t\t\t\tjy = iy - strideY;\n\n\t\t\t\t// Shift all larger values to the right of the current element to the left...\n\t\t\t\twhile ( jx <= fx ) {\n\t\t\t\t\tux = x[ jx ];\n\t\t\t\t\tif ( ux <= vx && !(flg && ux === vx && isNegativeZerof( ux ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when last element is NaN)) are sorted to the left\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tx[ jx+strideX ] = ux;\n\t\t\t\t\ty[ jy+strideY ] = y[ jy ];\n\t\t\t\t\tjx -= strideX;\n\t\t\t\t\tjy -= strideY;\n\t\t\t\t}\n\t\t\t\tx[ jx+strideX ] = vx;\n\t\t\t\ty[ jy+strideY ] = vy;\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// Traverse the strided array from left-to-right...\n\tfx = 0; // first index\n\tlx = (N-1) * strideX; // last index\n\tix = fx + strideX;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < N; i++ ) {\n\t\tvx = x[ ix ];\n\t\tvy = y[ iy ];\n\n\t\t// Sort `NaN` values to the end...\n\t\tif ( isnanf( vx ) ) {\n\t\t\tjx = ix;\n\t\t\tjy = iy;\n\n\t\t\t// Shift all values (including NaNs) to the right of the current element to the left...\n\t\t\twhile ( jx < lx ) {\n\t\t\t\tx[ jx ] = x[ jx+strideX ];\n\t\t\t\ty[ jy ] = y[ jy+strideY ];\n\t\t\t\tjx += strideX;\n\t\t\t\tjy += strideY;\n\t\t\t}\n\t\t\tx[ lx ] = vx;\n\t\t\ty[ ly ] = vy;\n\t\t} else {\n\t\t\tflg = isNegativeZerof( vx );\n\t\t\tjx = ix - strideX;\n\t\t\tjy = iy - strideY;\n\n\t\t\t// Shift all larger values to the left of the current element to the right...\n\t\t\twhile ( jx >= fx ) {\n\t\t\t\tux = x[ jx ];\n\t\t\t\tif ( ux <= vx && !(flg && ux === vx && isNegativeZerof( ux ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when first element is NaN)) are sorted to the right\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ jx+strideX ] = ux;\n\t\t\t\ty[ jy+strideY ] = y[ jy ];\n\t\t\t\tjx -= strideX;\n\t\t\t\tjy -= strideY;\n\t\t\t}\n\t\t\tx[ jx+strideX ] = vx;\n\t\t\ty[ jy+strideY ] = vy;\n\t\t\tix += strideX;\n\t\t\tiy += strideY;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssort2ins;\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 isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two single-precision floating-point strided arrays based on the sort order of the first array using insertion sort.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` index increment\n* @param {NonNegativeInteger} offsetY - `y` starting index\n* @returns {Float32Array} `x`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* ssort2ins( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction ssort2ins( N, order, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar flg;\n\tvar ix;\n\tvar jx;\n\tvar fx;\n\tvar lx;\n\tvar iy;\n\tvar jy;\n\tvar fy;\n\tvar ly;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t\toffsetX -= (N-1) * strideX;\n\t\toffsetY -= (N-1) * strideY;\n\t}\n\tfx = offsetX; // first index\n\tlx = fx + ((N-1)*strideX); // last index\n\tix = fx + strideX;\n\n\tfy = offsetY; // first index\n\tly = fy + ((N-1)*strideY); // last index\n\tiy = fy + strideY;\n\n\tif ( strideX < 0 ) {\n\t\t// Traverse the strided array from right-to-left...\n\n\t\t// Sort in increasing order...\n\t\tfor ( i = 1; i < N; i++ ) {\n\t\t\tvx = x[ ix ];\n\t\t\tvy = y[ iy ];\n\n\t\t\t// Sort `NaN` values to the end (i.e., the left)...\n\t\t\tif ( isnanf( vx ) ) {\n\t\t\t\tjx = ix;\n\t\t\t\tjy = iy;\n\n\t\t\t\t// Shift all values (including NaNs) to the left of the current element to the right...\n\t\t\t\twhile ( jx > lx ) {\n\t\t\t\t\tx[ jx ] = x[ jx+strideX ];\n\t\t\t\t\ty[ jy ] = y[ jy+strideY ];\n\t\t\t\t\tjx += strideX;\n\t\t\t\t\tjy += strideY;\n\t\t\t\t}\n\t\t\t\tx[ lx ] = vx;\n\t\t\t\ty[ ly ] = vy;\n\t\t\t} else {\n\t\t\t\tflg = isNegativeZerof( vx );\n\t\t\t\tjx = ix - strideX;\n\t\t\t\tjy = iy - strideY;\n\n\t\t\t\t// Shift all larger values to the right of the current element to the left...\n\t\t\t\twhile ( jx <= fx ) {\n\t\t\t\t\tux = x[ jx ];\n\t\t\t\t\tif ( ux <= vx && !(flg && ux === vx && isNegativeZerof( ux ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when last element is NaN)) are sorted to the left\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tx[ jx+strideX ] = ux;\n\t\t\t\t\ty[ jy+strideY ] = y[ jy ];\n\t\t\t\t\tjx -= strideX;\n\t\t\t\t\tjy -= strideY;\n\t\t\t\t}\n\t\t\t\tx[ jx+strideX ] = vx;\n\t\t\t\ty[ jy+strideY ] = vy;\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// Traverse the strided array from left-to-right...\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < N; i++ ) {\n\t\tvx = x[ ix ];\n\t\tvy = y[ iy ];\n\n\t\t// Sort `NaN` values to the end...\n\t\tif ( isnanf( vx ) ) {\n\t\t\tjx = ix;\n\t\t\tjy = iy;\n\n\t\t\t// Shift all values (including NaNs) to the right of the current element to the left...\n\t\t\twhile ( jx < lx ) {\n\t\t\t\tx[ jx ] = x[ jx+strideX ];\n\t\t\t\ty[ jy ] = y[ jy+strideY ];\n\t\t\t\tjx += strideX;\n\t\t\t\tjy += strideY;\n\t\t\t}\n\t\t\tx[ lx ] = vx;\n\t\t\ty[ ly ] = vy;\n\t\t} else {\n\t\t\tflg = isNegativeZerof( vx );\n\t\t\tjx = ix - strideX;\n\t\t\tjy = iy - strideY;\n\n\t\t\t// Shift all larger values to the left of the current element to the right...\n\t\t\twhile ( jx >= fx ) {\n\t\t\t\tux = x[ jx ];\n\t\t\t\tif ( ux <= vx && !(flg && ux === vx && isNegativeZerof( ux ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when first element is NaN)) are sorted to the right\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ jx+strideX ] = ux;\n\t\t\t\ty[ jy+strideY ] = y[ jy ];\n\t\t\t\tjx -= strideX;\n\t\t\t\tjy -= strideY;\n\t\t\t}\n\t\t\tx[ jx+strideX ] = vx;\n\t\t\ty[ jy+strideY ] = vy;\n\t\t\tix += strideX;\n\t\t\tiy += strideY;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssort2ins;\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 ssort2ins = require( './ssort2ins.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ssort2ins, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ssort2ins;\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* Simultaneously sort two single-precision floating-point strided arrays based on the sort order of the first array using insertion sort.\n*\n* @module @stdlib/blas/ext/base/ssort2ins\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssort2ins = require( '@stdlib/blas/ext/base/ssort2ins' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* ssort2ins( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssort2ins = require( '@stdlib/blas/ext/base/ssort2ins' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* ssort2ins( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 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 ssort2ins;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tssort2ins = main;\n} else {\n\tssort2ins = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssort2ins;\n\n// exports: { \"ndarray\": \"ssort2ins.ndarray\" }\n", "[701,301,132,57,23,10,4,1]\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 isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar GAPS = require( './gaps.json' );\n\n\n// VARIABLES //\n\nvar NGAPS = GAPS.length;\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two single-precision floating-point strided arrays based on the sort order of the first array using Shellsort.\n*\n* ## Notes\n*\n* - This implementation uses the gap sequence proposed by Ciura (2001).\n*\n* ## References\n*\n* - Shell, Donald L. 1959. \"A High-Speed Sorting Procedure.\" _Communications of the ACM_ 2 (7). Association for Computing Machinery: 30\u201332. doi:[10.1145/368370.368387](https://doi.org/10.1145/368370.368387).\n* - Ciura, Marcin. 2001. \"Best Increments for the Average Case of Shellsort.\" In _Fundamentals of Computation Theory_, 106\u201317. Springer Berlin Heidelberg. doi:[10.1007/3-540-44669-9\\_12](https://doi.org/10.1007/3-540-44669-9_12).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` index increment\n* @returns {Float32Array} `x`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* ssort2sh( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction ssort2sh( N, order, x, strideX, y, strideY ) {\n\tvar offsetX;\n\tvar offsetY;\n\tvar flg;\n\tvar gap;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t}\n\tif ( strideX < 0 ) {\n\t\toffsetX = (1-N) * strideX;\n\t} else {\n\t\toffsetX = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\toffsetY = (1-N) * strideY;\n\t} else {\n\t\toffsetY = 0;\n\t}\n\tfor ( i = 0; i < NGAPS; i++ ) {\n\t\tgap = GAPS[ i ];\n\t\tfor ( j = gap; j < N; j++ ) {\n\t\t\tvx = x[ offsetX+(j*strideX) ];\n\n\t\t\t// If `NaN`, the current value is already sorted to its place...\n\t\t\tif ( isnanf( vx ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvy = y[ offsetY+(j*strideY) ];\n\n\t\t\t// Perform insertion sort on the \"gapped\" subarray...\n\t\t\tflg = isNegativeZerof( vx );\n\t\t\tfor ( k = j; k >= gap; k -= gap ) {\n\t\t\t\tux = x[ offsetX+((k-gap)*strideX) ];\n\t\t\t\tif ( ux <= vx && !(flg && ux === vx) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ offsetX+(k*strideX) ] = ux;\n\t\t\t\ty[ offsetY+(k*strideY) ] = y[ offsetY+((k-gap)*strideY) ];\n\t\t\t}\n\t\t\tx[ offsetX+(k*strideX) ] = vx;\n\t\t\ty[ offsetY+(k*strideY) ] = vy;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssort2sh;\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 isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar GAPS = require( './gaps.json' );\n\n\n// VARIABLES //\n\nvar NGAPS = GAPS.length;\n\n\n// MAIN //\n\n/**\n* Simultaneously sorts two single-precision floating-point strided arrays based on the sort order of the first array using Shellsort.\n*\n* ## Notes\n*\n* - This implementation uses the gap sequence proposed by Ciura (2001).\n*\n* ## References\n*\n* - Shell, Donald L. 1959. \"A High-Speed Sorting Procedure.\" _Communications of the ACM_ 2 (7). Association for Computing Machinery: 30\u201332. doi:[10.1145/368370.368387](https://doi.org/10.1145/368370.368387).\n* - Ciura, Marcin. 2001. \"Best Increments for the Average Case of Shellsort.\" In _Fundamentals of Computation Theory_, 106\u201317. Springer Berlin Heidelberg. doi:[10.1007/3-540-44669-9\\_12](https://doi.org/10.1007/3-540-44669-9_12).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` index increment\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` index increment\n* @param {NonNegativeInteger} offsetY - `y` starting index\n* @returns {Float32Array} `x`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* ssort2sh( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*/\nfunction ssort2sh( N, order, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar flg;\n\tvar gap;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstrideX *= -1;\n\t\tstrideY *= -1;\n\t\toffsetX -= (N-1) * strideX;\n\t\toffsetY -= (N-1) * strideY;\n\t}\n\tfor ( i = 0; i < NGAPS; i++ ) {\n\t\tgap = GAPS[ i ];\n\t\tfor ( j = gap; j < N; j++ ) {\n\t\t\tvx = x[ offsetX+(j*strideX) ];\n\n\t\t\t// If `NaN`, the current value is already sorted to its place...\n\t\t\tif ( isnanf( vx ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvy = y[ offsetY+(j*strideY) ];\n\n\t\t\t// Perform insertion sort on the \"gapped\" subarray...\n\t\t\tflg = isNegativeZerof( vx );\n\t\t\tfor ( k = j; k >= gap; k -= gap ) {\n\t\t\t\tux = x[ offsetX+((k-gap)*strideX) ];\n\t\t\t\tif ( ux <= vx && !(flg && ux === vx) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ offsetX+(k*strideX) ] = ux;\n\t\t\t\ty[ offsetY+(k*strideY) ] = y[ offsetY+((k-gap)*strideY) ];\n\t\t\t}\n\t\t\tx[ offsetX+(k*strideX) ] = vx;\n\t\t\ty[ offsetY+(k*strideY) ] = vy;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssort2sh;\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 ssort2sh = require( './ssort2sh.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ssort2sh, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ssort2sh;\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* Simultaneously sort two single-precision floating-point strided arrays based on the sort order of the first array using Shellsort.\n*\n* @module @stdlib/blas/ext/base/ssort2sh\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssort2sh = require( '@stdlib/blas/ext/base/ssort2sh' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* ssort2sh( x.length, 1.0, x, 1, y, 1 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 2.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssort2sh = require( '@stdlib/blas/ext/base/ssort2sh' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n* var y = new Float32Array( [ 0.0, 1.0, 2.0, 3.0 ] );\n*\n* ssort2sh( x.length, 1.0, x, 1, 0, y, 1, 0 );\n*\n* console.log( x );\n* // => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* console.log( y );\n* // => [ 3.0, 1.0, 0.0, 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 ssort2sh;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tssort2sh = main;\n} else {\n\tssort2sh = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssort2sh;\n\n// exports: { \"ndarray\": \"ssort2sh.ndarray\" }\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 isPositiveZerof = require( '@stdlib/math/base/assert/is-positive-zerof' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// MAIN //\n\n/**\n* Sorts a single-precision floating-point strided array using heapsort.\n*\n* ## Notes\n*\n* - This implementation uses an in-place algorithm derived from the work of Floyd (1964).\n*\n* ## References\n*\n* - Williams, John William Joseph. 1964. \"Algorithm 232: Heapsort.\" _Communications of the ACM_ 7 (6). New York, NY, USA: Association for Computing Machinery: 347\u201349. doi:[10.1145/512274.512284](https://doi.org/10.1145/512274.512284).\n* - Floyd, Robert W. 1964. \"Algorithm 245: Treesort.\" _Communications of the ACM_ 7 (12). New York, NY, USA: Association for Computing Machinery: 701. doi:[10.1145/355588.365103](https://doi.org/10.1145/355588.365103).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* ssorthp( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction ssorthp( N, order, x, stride ) {\n\tvar offset;\n\tvar parent;\n\tvar child;\n\tvar v1;\n\tvar v2;\n\tvar n;\n\tvar t;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t}\n\tif ( stride < 0 ) {\n\t\toffset = (1-N) * stride;\n\t} else {\n\t\toffset = 0;\n\t}\n\t// Set the initial heap size:\n\tn = N;\n\n\t// Specify an initial \"parent\" index for building the heap:\n\tparent = floor( N / 2 );\n\n\t// Continue looping until the array is sorted...\n\twhile ( true ) {\n\t\tif ( parent > 0 ) {\n\t\t\t// We need to build the heap...\n\t\t\tparent -= 1;\n\t\t\tt = x[ offset+(parent*stride) ];\n\t\t} else {\n\t\t\t// Reduce the heap size:\n\t\t\tn -= 1;\n\n\t\t\t// Check if the heap is empty, and, if so, we are finished sorting...\n\t\t\tif ( n === 0 ) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\t// Store the last heap value in a temporary variable in order to make room for the heap root being placed into its sorted position:\n\t\t\ti = offset + (n*stride);\n\t\t\tt = x[ i ];\n\n\t\t\t// Move the heap root to its sorted position:\n\t\t\tx[ i ] = x[ offset ];\n\t\t}\n\t\t// We need to \"sift down\", pushing `t` down the heap to in order to replace the parent and satisfy the heap property...\n\n\t\t// Start at the parent index:\n\t\tj = parent;\n\n\t\t// Get the \"left\" child index:\n\t\tchild = (j*2) + 1;\n\n\t\twhile ( child < n ) {\n\t\t\t// Find the largest child...\n\t\t\tk = child + 1;\n\t\t\tif ( k < n ) {\n\t\t\t\tv1 = x[ offset+(k*stride) ];\n\t\t\t\tv2 = x[ offset+(child*stride) ];\n\n\t\t\t\t// Check if a \"right\" child exists and is \"bigger\"...\n\t\t\t\tif ( v1 > v2 || isnanf( v1 ) || (v1 === v2 && isPositiveZerof( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t\tchild += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if the largest child is bigger than `t`...\n\t\t\tv1 = x[ offset+(child*stride) ];\n\t\t\tif ( v1 > t || isnanf( v1 ) || ( v1 === t && isPositiveZerof( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t// Insert the larger child value:\n\t\t\t\tx[ offset+(j*stride) ] = v1;\n\n\t\t\t\t// Update `j` to point to the child index:\n\t\t\t\tj = child;\n\n\t\t\t\t// Get the \"left\" child index and repeat...\n\t\t\t\tchild = (j*2) + 1;\n\t\t\t} else {\n\t\t\t\t// We've found `t`'s place in the heap...\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Insert `t` into the heap:\n\t\tx[ offset+(j*stride) ] = t;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssorthp;\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 isPositiveZerof = require( '@stdlib/math/base/assert/is-positive-zerof' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// MAIN //\n\n/**\n* Sorts a single-precision floating-point strided array using heapsort.\n*\n* ## Notes\n*\n* - This implementation uses an in-place algorithm derived from the work of Floyd (1964).\n*\n* ## References\n*\n* - Williams, John William Joseph. 1964. \"Algorithm 232: Heapsort.\" _Communications of the ACM_ 7 (6). New York, NY, USA: Association for Computing Machinery: 347\u201349. doi:[10.1145/512274.512284](https://doi.org/10.1145/512274.512284).\n* - Floyd, Robert W. 1964. \"Algorithm 245: Treesort.\" _Communications of the ACM_ 7 (12). New York, NY, USA: Association for Computing Machinery: 701. doi:[10.1145/355588.365103](https://doi.org/10.1145/355588.365103).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* ssorthp( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction ssorthp( N, order, x, stride, offset ) {\n\tvar parent;\n\tvar child;\n\tvar v1;\n\tvar v2;\n\tvar n;\n\tvar t;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t\toffset -= (N-1) * stride;\n\t}\n\t// Set the initial heap size:\n\tn = N;\n\n\t// Specify an initial \"parent\" index for building the heap:\n\tparent = floor( N / 2 );\n\n\t// Continue looping until the array is sorted...\n\twhile ( true ) {\n\t\tif ( parent > 0 ) {\n\t\t\t// We need to build the heap...\n\t\t\tparent -= 1;\n\t\t\tt = x[ offset+(parent*stride) ];\n\t\t} else {\n\t\t\t// Reduce the heap size:\n\t\t\tn -= 1;\n\n\t\t\t// Check if the heap is empty, and, if so, we are finished sorting...\n\t\t\tif ( n === 0 ) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t\t// Store the last heap value in a temporary variable in order to make room for the heap root being placed into its sorted position:\n\t\t\ti = offset + (n*stride);\n\t\t\tt = x[ i ];\n\n\t\t\t// Move the heap root to its sorted position:\n\t\t\tx[ i ] = x[ offset ];\n\t\t}\n\t\t// We need to \"sift down\", pushing `t` down the heap to in order to replace the parent and satisfy the heap property...\n\n\t\t// Start at the parent index:\n\t\tj = parent;\n\n\t\t// Get the \"left\" child index:\n\t\tchild = (j*2) + 1;\n\n\t\twhile ( child < n ) {\n\t\t\t// Find the largest child...\n\t\t\tk = child + 1;\n\t\t\tif ( k < n ) {\n\t\t\t\tv1 = x[ offset+(k*stride) ];\n\t\t\t\tv2 = x[ offset+(child*stride) ];\n\n\t\t\t\t// Check if a \"right\" child exists and is \"bigger\"...\n\t\t\t\tif ( v1 > v2 || isnanf( v1 ) || (v1 === v2 && isPositiveZerof( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t\tchild += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if the largest child is bigger than `t`...\n\t\t\tv1 = x[ offset+(child*stride) ];\n\t\t\tif ( v1 > t || isnanf( v1 ) || ( v1 === t && isPositiveZerof( v1 ) ) ) { // eslint-disable-line max-len\n\t\t\t\t// Insert the larger child value:\n\t\t\t\tx[ offset+(j*stride) ] = v1;\n\n\t\t\t\t// Update `j` to point to the child index:\n\t\t\t\tj = child;\n\n\t\t\t\t// Get the \"left\" child index and repeat...\n\t\t\t\tchild = (j*2) + 1;\n\t\t\t} else {\n\t\t\t\t// We've found `t`'s place in the heap...\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// Insert `t` into the heap:\n\t\tx[ offset+(j*stride) ] = t;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssorthp;\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 ssorthp = require( './ssorthp.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ssorthp, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ssorthp;\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* Sort a single-precision floating-point strided array using heapsort.\n*\n* @module @stdlib/blas/ext/base/ssorthp\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssorthp = require( '@stdlib/blas/ext/base/ssorthp' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* ssorthp( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssorthp = require( '@stdlib/blas/ext/base/ssorthp' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* ssorthp.ndarray( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.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 ssorthp;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tssorthp = main;\n} else {\n\tssorthp = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssorthp;\n\n// exports: { \"ndarray\": \"ssorthp.ndarray\" }\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 isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\n\n\n// MAIN //\n\n/**\n* Sorts a single-precision floating-point strided array using insertion sort.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* ssortins( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction ssortins( N, order, x, stride ) {\n\tvar flg;\n\tvar ix;\n\tvar jx;\n\tvar fx;\n\tvar lx;\n\tvar v;\n\tvar u;\n\tvar i;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t}\n\tif ( stride < 0 ) {\n\t\t// Traverse the strided array from right-to-left...\n\t\tfx = (1-N) * stride; // first index\n\t\tlx = 0; // last index\n\t\tix = fx + stride;\n\n\t\t// Sort in increasing order...\n\t\tfor ( i = 1; i < N; i++ ) {\n\t\t\tv = x[ ix ];\n\n\t\t\t// Sort `NaN` values to the end (i.e., the left)...\n\t\t\tif ( isnanf( v ) ) {\n\t\t\t\tjx = ix;\n\n\t\t\t\t// Shift all values (including NaNs) to the left of the current element to the right...\n\t\t\t\twhile ( jx > lx ) {\n\t\t\t\t\tx[ jx ] = x[ jx+stride ];\n\t\t\t\t\tjx += stride;\n\t\t\t\t}\n\t\t\t\tx[ lx ] = v;\n\t\t\t} else {\n\t\t\t\tflg = isNegativeZerof( v );\n\t\t\t\tjx = ix - stride;\n\n\t\t\t\t// Shift all larger values to the right of the current element to the left...\n\t\t\t\twhile ( jx <= fx ) {\n\t\t\t\t\tu = x[ jx ];\n\t\t\t\t\tif ( u <= v && !(flg && u === v && isNegativeZerof( u ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when last element is NaN)) are sorted to the left\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tx[ jx+stride ] = u;\n\t\t\t\t\tjx -= stride;\n\t\t\t\t}\n\t\t\t\tx[ jx+stride ] = v;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// Traverse the strided array from left-to-right...\n\tfx = 0; // first index\n\tlx = (N-1) * stride; // last index\n\tix = fx + stride;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < N; i++ ) {\n\t\tv = x[ ix ];\n\n\t\t// Sort `NaN` values to the end...\n\t\tif ( isnanf( v ) ) {\n\t\t\tjx = ix;\n\n\t\t\t// Shift all values (including NaNs) to the right of the current element to the left...\n\t\t\twhile ( jx < lx ) {\n\t\t\t\tx[ jx ] = x[ jx+stride ];\n\t\t\t\tjx += stride;\n\t\t\t}\n\t\t\tx[ lx ] = v;\n\t\t} else {\n\t\t\tflg = isNegativeZerof( v );\n\t\t\tjx = ix - stride;\n\n\t\t\t// Shift all larger values to the left of the current element to the right...\n\t\t\twhile ( jx >= fx ) {\n\t\t\t\tu = x[ jx ];\n\t\t\t\tif ( u <= v && !(flg && u === v && isNegativeZerof( u ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when first element is NaN)) are sorted to the right\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ jx+stride ] = u;\n\t\t\t\tjx -= stride;\n\t\t\t}\n\t\t\tx[ jx+stride ] = v;\n\t\t\tix += stride;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssortins;\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 isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\n\n\n// MAIN //\n\n/**\n* Sorts a single-precision floating-point strided array using insertion sort.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* ssortins( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction ssortins( N, order, x, stride, offset ) {\n\tvar flg;\n\tvar ix;\n\tvar jx;\n\tvar fx;\n\tvar lx;\n\tvar v;\n\tvar u;\n\tvar i;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t\toffset -= (N-1) * stride;\n\t}\n\tfx = offset; // first index\n\tlx = fx + ((N-1)*stride); // last index\n\tix = fx + stride;\n\n\tif ( stride < 0 ) {\n\t\t// Traverse the strided array from right-to-left...\n\n\t\t// Sort in increasing order...\n\t\tfor ( i = 1; i < N; i++ ) {\n\t\t\tv = x[ ix ];\n\n\t\t\t// Sort `NaN` values to the end (i.e., the left)...\n\t\t\tif ( isnanf( v ) ) {\n\t\t\t\tjx = ix;\n\n\t\t\t\t// Shift all values (including NaNs) to the left of the current element to the right...\n\t\t\t\twhile ( jx > lx ) {\n\t\t\t\t\tx[ jx ] = x[ jx+stride ];\n\t\t\t\t\tjx += stride;\n\t\t\t\t}\n\t\t\t\tx[ lx ] = v;\n\t\t\t} else {\n\t\t\t\tflg = isNegativeZerof( v );\n\t\t\t\tjx = ix - stride;\n\n\t\t\t\t// Shift all larger values to the right of the current element to the left...\n\t\t\t\twhile ( jx <= fx ) {\n\t\t\t\t\tu = x[ jx ];\n\t\t\t\t\tif ( u <= v && !(flg && u === v && isNegativeZerof( u ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when last element is NaN)) are sorted to the left\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tx[ jx+stride ] = u;\n\t\t\t\t\tjx -= stride;\n\t\t\t\t}\n\t\t\t\tx[ jx+stride ] = v;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// Traverse the strided array from left-to-right...\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < N; i++ ) {\n\t\tv = x[ ix ];\n\n\t\t// Sort `NaN` values to the end...\n\t\tif ( isnanf( v ) ) {\n\t\t\tjx = ix;\n\n\t\t\t// Shift all values (including NaNs) to the right of the current element to the left...\n\t\t\twhile ( jx < lx ) {\n\t\t\t\tx[ jx ] = x[ jx+stride ];\n\t\t\t\tjx += stride;\n\t\t\t}\n\t\t\tx[ lx ] = v;\n\t\t} else {\n\t\t\tflg = isNegativeZerof( v );\n\t\t\tjx = ix - stride;\n\n\t\t\t// Shift all larger values to the left of the current element to the right...\n\t\t\twhile ( jx >= fx ) {\n\t\t\t\tu = x[ jx ];\n\t\t\t\tif ( u <= v && !(flg && u === v && isNegativeZerof( u ) === false) ) { // eslint-disable-line max-len\n\t\t\t\t\t// Note: positive zeros (and NaNs (e.g., when first element is NaN)) are sorted to the right\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ jx+stride ] = u;\n\t\t\t\tjx -= stride;\n\t\t\t}\n\t\t\tx[ jx+stride ] = v;\n\t\t\tix += stride;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssortins;\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 ssortins = require( './ssortins.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ssortins, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ssortins;\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* Sort a single-precision floating-point strided array using insertion sort.\n*\n* @module @stdlib/blas/ext/base/ssortins\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssortins = require( '@stdlib/blas/ext/base/ssortins' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* ssortins( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssortins = require( '@stdlib/blas/ext/base/ssortins' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* ssortins.ndarray( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.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 ssortins;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tssortins = main;\n} else {\n\tssortins = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssortins;\n\n// exports: { \"ndarray\": \"ssortins.ndarray\" }\n", "[701,301,132,57,23,10,4,1]\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 isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar GAPS = require( './gaps.json' );\n\n\n// VARIABLES //\n\nvar NGAPS = GAPS.length;\n\n\n// MAIN //\n\n/**\n* Sorts a single-precision floating-point strided array using Shellsort.\n*\n* ## Notes\n*\n* - This implementation uses the gap sequence proposed by Ciura (2001).\n*\n* ## References\n*\n* - Shell, Donald L. 1959. \"A High-Speed Sorting Procedure.\" _Communications of the ACM_ 2 (7). Association for Computing Machinery: 30\u201332. doi:[10.1145/368370.368387](https://doi.org/10.1145/368370.368387).\n* - Ciura, Marcin. 2001. \"Best Increments for the Average Case of Shellsort.\" In _Fundamentals of Computation Theory_, 106\u201317. Springer Berlin Heidelberg. doi:[10.1007/3-540-44669-9\\_12](https://doi.org/10.1007/3-540-44669-9_12).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* ssortsh( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction ssortsh( N, order, x, stride ) {\n\tvar offset;\n\tvar flg;\n\tvar gap;\n\tvar v;\n\tvar u;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t}\n\tif ( stride < 0 ) {\n\t\toffset = (1-N) * stride;\n\t} else {\n\t\toffset = 0;\n\t}\n\tfor ( i = 0; i < NGAPS; i++ ) {\n\t\tgap = GAPS[ i ];\n\t\tfor ( j = gap; j < N; j++ ) {\n\t\t\tv = x[ offset+(j*stride) ];\n\n\t\t\t// If `NaN`, the current value is already sorted to its place...\n\t\t\tif ( isnanf( v ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Perform insertion sort on the \"gapped\" subarray...\n\t\t\tflg = isNegativeZerof( v );\n\t\t\tfor ( k = j; k >= gap; k -= gap ) {\n\t\t\t\tu = x[ offset+((k-gap)*stride) ];\n\t\t\t\tif ( u <= v && !(flg && u === v) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ offset+(k*stride) ] = u;\n\t\t\t}\n\t\t\tx[ offset+(k*stride) ] = v;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssortsh;\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 isNegativeZerof = require( '@stdlib/math/base/assert/is-negative-zerof' );\nvar isnanf = require( '@stdlib/math/base/assert/is-nanf' );\nvar GAPS = require( './gaps.json' );\n\n\n// VARIABLES //\n\nvar NGAPS = GAPS.length;\n\n\n// MAIN //\n\n/**\n* Sorts a single-precision floating-point strided array using Shellsort.\n*\n* ## Notes\n*\n* - This implementation uses the gap sequence proposed by Ciura (2001).\n*\n* ## References\n*\n* - Shell, Donald L. 1959. \"A High-Speed Sorting Procedure.\" _Communications of the ACM_ 2 (7). Association for Computing Machinery: 30\u201332. doi:[10.1145/368370.368387](https://doi.org/10.1145/368370.368387).\n* - Ciura, Marcin. 2001. \"Best Increments for the Average Case of Shellsort.\" In _Fundamentals of Computation Theory_, 106\u201317. Springer Berlin Heidelberg. doi:[10.1007/3-540-44669-9\\_12](https://doi.org/10.1007/3-540-44669-9_12).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} order - sort order\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* ssortsh( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*/\nfunction ssortsh( N, order, x, stride, offset ) {\n\tvar flg;\n\tvar gap;\n\tvar v;\n\tvar u;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tif ( N <= 0 || order === 0.0 ) {\n\t\treturn x;\n\t}\n\t// For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order...\n\tif ( order < 0.0 ) {\n\t\tstride *= -1;\n\t\toffset -= (N-1) * stride;\n\t}\n\tfor ( i = 0; i < NGAPS; i++ ) {\n\t\tgap = GAPS[ i ];\n\t\tfor ( j = gap; j < N; j++ ) {\n\t\t\tv = x[ offset+(j*stride) ];\n\n\t\t\t// If `NaN`, the current value is already sorted to its place...\n\t\t\tif ( isnanf( v ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Perform insertion sort on the \"gapped\" subarray...\n\t\t\tflg = isNegativeZerof( v );\n\t\t\tfor ( k = j; k >= gap; k -= gap ) {\n\t\t\t\tu = x[ offset+((k-gap)*stride) ];\n\t\t\t\tif ( u <= v && !(flg && u === v) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx[ offset+(k*stride) ] = u;\n\t\t\t}\n\t\t\tx[ offset+(k*stride) ] = v;\n\t\t}\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssortsh;\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 ssortsh = require( './ssortsh.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ssortsh, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ssortsh;\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* Sort a single-precision floating-point strided array using Shellsort.\n*\n* @module @stdlib/blas/ext/base/ssortsh\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssortsh = require( '@stdlib/blas/ext/base/ssortsh' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* ssortsh( x.length, 1.0, x, 1 );\n* // x => [ -4.0, -2.0, 1.0, 3.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssortsh = require( '@stdlib/blas/ext/base/ssortsh' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0 ] );\n*\n* ssortsh.ndarray( x.length, 1.0, x, 1, 0 );\n* // x => [ -4.0, -2.0, 1.0, 3.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 ssortsh;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tssortsh = main;\n} else {\n\tssortsh = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssortsh;\n\n// exports: { \"ndarray\": \"ssortsh.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = ssumkbn( N, x, 1 );\n* // returns 1.0\n*/\nfunction ssumkbn( N, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = float64ToFloat32( sum + v );\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( sum-t ) + v ) ); // eslint-disable-line max-len\n\t\t} else {\n\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( v-t ) + sum ) ); // eslint-disable-line max-len\n\t\t}\n\t\tsum = t;\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( sum + c );\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssumkbn;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses an \"improved Kahan\u2013Babu\u0161ka algorithm\", as described by Neumaier (1974).\n*\n* ## References\n*\n* - Neumaier, Arnold. 1974. \"Rounding Error Analysis of Some Methods for Summing Finite Sums.\" _Zeitschrift F\u00FCr Angewandte Mathematik Und Mechanik_ 54 (1): 39\u201351. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = ssumkbn( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction ssumkbn( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tc = 0.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = float64ToFloat32( sum + v );\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( sum-t ) + v ) ); // eslint-disable-line max-len\n\t\t} else {\n\t\t\tc = float64ToFloat32( c + float64ToFloat32( float64ToFloat32( v-t ) + sum ) ); // eslint-disable-line max-len\n\t\t}\n\t\tsum = t;\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( sum + c );\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssumkbn;\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 ssumkbn = require( './ssumkbn.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ssumkbn, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ssumkbn;\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* Compute the sum of single-precision floating-point strided array elements using an improved Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/ssumkbn\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssumkbn = require( '@stdlib/blas/ext/base/ssumkbn' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = ssumkbn( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var ssumkbn = require( '@stdlib/blas/ext/base/ssumkbn' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = ssumkbn.ndarray( N, x, 2, 1 );\n* // returns 5.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 ssumkbn;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tssumkbn = main;\n} else {\n\tssumkbn = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssumkbn;\n\n// exports: { \"ndarray\": \"ssumkbn.ndarray\" }\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 ssumkbn = require( './../../../../ext/base/ssumkbn' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = ssum( N, x, 1 );\n* // returns 1.0\n*/\nfunction ssum( N, x, stride ) {\n\treturn ssumkbn( N, x, stride );\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssum;\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 ssumkbn = require( './../../../../ext/base/ssumkbn' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = ssum( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction ssum( N, x, stride, offset ) {\n\treturn ssumkbn( N, x, stride, offset );\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssum;\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 ssum = require( './ssum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ssum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ssum;\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* Compute the sum of single-precision floating-point strided array elements.\n*\n* @module @stdlib/blas/ext/base/ssum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssum = require( '@stdlib/blas/ext/base/ssum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = ssum( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var ssum = require( '@stdlib/blas/ext/base/ssum' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = ssum.ndarray( N, x, 2, 1 );\n* // returns 5.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 ssum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tssum = main;\n} else {\n\tssum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssum;\n\n// exports: { \"ndarray\": \"ssum.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = ssumkbn2( N, x, 1 );\n* // returns 1.0\n*/\nfunction ssumkbn2( N, x, stride ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = float64ToFloat32( sum+v );\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = float64ToFloat32( float64ToFloat32( sum-t ) + v );\n\t\t} else {\n\t\t\tc = float64ToFloat32( float64ToFloat32( v-t ) + sum );\n\t\t}\n\t\tsum = t;\n\t\tt = float64ToFloat32( cs+c );\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = float64ToFloat32( float64ToFloat32( cs-t ) + c );\n\t\t} else {\n\t\t\tcc = float64ToFloat32( float64ToFloat32( c-t ) + cs );\n\t\t}\n\t\tcs = t;\n\t\tccs = float64ToFloat32( ccs+cc );\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( sum + float64ToFloat32( cs+ccs ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssumkbn2;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* ## Method\n*\n* - This implementation uses a second-order iterative Kahan\u2013Babu\u0161ka algorithm, as described by Klein (2005).\n*\n* ## References\n*\n* - Klein, Andreas. 2005. \"A Generalized Kahan-Babu\u0161ka-Summation-Algorithm.\" _Computing_ 76 (3): 279\u201393. doi:[10.1007/s00607-005-0139-x](https://doi.org/10.1007/s00607-005-0139-x).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = ssumkbn2( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction ssumkbn2( N, x, stride, offset ) {\n\tvar sum;\n\tvar ccs;\n\tvar ix;\n\tvar cs;\n\tvar cc;\n\tvar v;\n\tvar t;\n\tvar c;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tsum = 0.0;\n\tccs = 0.0; // second order correction term for lost low order bits\n\tcs = 0.0; // first order correction term for lost low order bits\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv = x[ ix ];\n\t\tt = float64ToFloat32( sum+v );\n\t\tif ( abs( sum ) >= abs( v ) ) {\n\t\t\tc = float64ToFloat32( float64ToFloat32( sum-t ) + v );\n\t\t} else {\n\t\t\tc = float64ToFloat32( float64ToFloat32( v-t ) + sum );\n\t\t}\n\t\tsum = t;\n\t\tt = float64ToFloat32( cs+c );\n\t\tif ( abs( cs ) >= abs( c ) ) {\n\t\t\tcc = float64ToFloat32( float64ToFloat32( cs-t ) + c );\n\t\t} else {\n\t\t\tcc = float64ToFloat32( float64ToFloat32( c-t ) + cs );\n\t\t}\n\t\tcs = t;\n\t\tccs = float64ToFloat32( ccs+cc );\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( sum + float64ToFloat32( cs+ccs ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssumkbn2;\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 ssumkbn2 = require( './ssumkbn2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ssumkbn2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ssumkbn2;\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* Compute the sum of single-precision floating-point strided array elements using a second-order iterative Kahan\u2013Babu\u0161ka algorithm.\n*\n* @module @stdlib/blas/ext/base/ssumkbn2\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssumkbn2 = require( '@stdlib/blas/ext/base/ssumkbn2' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = ssumkbn2( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var ssumkbn2 = require( '@stdlib/blas/ext/base/ssumkbn2' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = ssumkbn2.ndarray( N, x, 2, 1 );\n* // returns 5.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 ssumkbn2;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tssumkbn2 = main;\n} else {\n\tssumkbn2 = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssumkbn2;\n\n// exports: { \"ndarray\": \"ssumkbn2.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = ssumors( N, x, 1 );\n* // returns 1.0\n*/\nfunction ssumors( N, x, stride ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum = float64ToFloat32( sum + x[ ix ] );\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssumors;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = ssumors( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction ssumors( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum = float64ToFloat32( sum + x[ ix ] );\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssumors;\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 ssumors = require( './ssumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ssumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ssumors;\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* Compute the sum of single-precision floating-point strided array elements using ordinary recursive summation.\n*\n* @module @stdlib/blas/ext/base/ssumors\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssumors = require( '@stdlib/blas/ext/base/ssumors' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = ssumors( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var ssumors = require( '@stdlib/blas/ext/base/ssumors' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = ssumors.ndarray( N, x, 2, 1 );\n* // returns 5.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 ssumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tssumors = main;\n} else {\n\tssumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssumors;\n\n// exports: { \"ndarray\": \"ssumors.ndarray\" }\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar floor = require( '@stdlib/math/base/special/floor' );\n\n\n// VARIABLES //\n\n// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):\nvar BLOCKSIZE = 128;\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = ssumpw( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction ssumpw( N, x, stride, offset ) {\n\tvar ix;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar M;\n\tvar s;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ offset ];\n\t}\n\tix = offset;\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts = float64ToFloat32( s + x[ ix ] );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\tif ( N <= BLOCKSIZE ) {\n\t\t// Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...\n\t\ts0 = x[ ix ];\n\t\ts1 = x[ ix+stride ];\n\t\ts2 = x[ ix+(2*stride) ];\n\t\ts3 = x[ ix+(3*stride) ];\n\t\ts4 = x[ ix+(4*stride) ];\n\t\ts5 = x[ ix+(5*stride) ];\n\t\ts6 = x[ ix+(6*stride) ];\n\t\ts7 = x[ ix+(7*stride) ];\n\t\tix += 8 * stride;\n\n\t\tM = N % 8;\n\t\tfor ( i = 8; i < N-M; i += 8 ) {\n\t\t\ts0 = float64ToFloat32( s0 + x[ ix ] );\n\t\t\ts1 = float64ToFloat32( s1 + x[ ix+stride ] );\n\t\t\ts2 = float64ToFloat32( s2 + x[ ix+(2*stride) ] );\n\t\t\ts3 = float64ToFloat32( s3 + x[ ix+(3*stride) ] );\n\t\t\ts4 = float64ToFloat32( s4 + x[ ix+(4*stride) ] );\n\t\t\ts5 = float64ToFloat32( s5 + x[ ix+(5*stride) ] );\n\t\t\ts6 = float64ToFloat32( s6 + x[ ix+(6*stride) ] );\n\t\t\ts7 = float64ToFloat32( s7 + x[ ix+(7*stride) ] );\n\t\t\tix += 8 * stride;\n\t\t}\n\t\t// Pairwise sum the accumulators:\n\t\ts = float64ToFloat32( float64ToFloat32( float64ToFloat32(s0+s1) + float64ToFloat32(s2+s3) ) + float64ToFloat32( float64ToFloat32(s4+s5) + float64ToFloat32(s6+s7) ) ); // eslint-disable-line max-len\n\n\t\t// Clean-up loop...\n\t\tfor ( i; i < N; i++ ) {\n\t\t\ts = float64ToFloat32( s + x[ ix ] );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\t// Recurse by dividing by two, but avoiding non-multiples of unroll factor...\n\tn = floor( N/2 );\n\tn -= n % 8;\n\treturn float64ToFloat32( ssumpw( n, x, stride, ix ) + ssumpw( N-n, x, stride, ix+(n*stride) ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssumpw;\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 float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar sum = require( './ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of single-precision floating-point strided array elements using pairwise summation.\n*\n* ## Method\n*\n* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.\n*\n* ## References\n*\n* - Higham, Nicholas J. 1993. \"The Accuracy of Floating Point Summation.\" _SIAM Journal on Scientific Computing_ 14 (4): 783\u201399. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = ssumpw( N, x, 1 );\n* // returns 1.0\n*/\nfunction ssumpw( N, x, stride ) {\n\tvar ix;\n\tvar s;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 || stride === 0 ) {\n\t\treturn x[ 0 ];\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( N < 8 ) {\n\t\t// Use simple summation...\n\t\ts = 0.0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\ts = float64ToFloat32( s + x[ ix ] );\n\t\t\tix += stride;\n\t\t}\n\t\treturn s;\n\t}\n\treturn sum( N, x, stride, ix );\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssumpw;\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 ssumpw = require( './ssumpw.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ssumpw, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ssumpw;\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* Compute the sum of single-precision floating-point strided array elements using pairwise summation.\n*\n* @module @stdlib/blas/ext/base/ssumpw\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var ssumpw = require( '@stdlib/blas/ext/base/ssumpw' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = x.length;\n*\n* var v = ssumpw( N, x, 1 );\n* // returns 1.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var ssumpw = require( '@stdlib/blas/ext/base/ssumpw' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var v = ssumpw.ndarray( N, x, 2, 1 );\n* // returns 5.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 ssumpw;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tssumpw = main;\n} else {\n\tssumpw = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ssumpw;\n\n// exports: { \"ndarray\": \"ssumpw.ndarray\" }\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* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name dapx\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dapx}\n*/\nsetReadOnly( ns, 'dapx', require( './../../../ext/base/dapx' ) );\n\n/**\n* @name dapxsum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dapxsum}\n*/\nsetReadOnly( ns, 'dapxsum', require( './../../../ext/base/dapxsum' ) );\n\n/**\n* @name dapxsumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dapxsumkbn}\n*/\nsetReadOnly( ns, 'dapxsumkbn', require( './../../../ext/base/dapxsumkbn' ) );\n\n/**\n* @name dapxsumkbn2\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dapxsumkbn2}\n*/\nsetReadOnly( ns, 'dapxsumkbn2', require( './../../../ext/base/dapxsumkbn2' ) );\n\n/**\n* @name dapxsumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dapxsumors}\n*/\nsetReadOnly( ns, 'dapxsumors', require( './../../../ext/base/dapxsumors' ) );\n\n/**\n* @name dapxsumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dapxsumpw}\n*/\nsetReadOnly( ns, 'dapxsumpw', require( './../../../ext/base/dapxsumpw' ) );\n\n/**\n* @name dasumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dasumpw}\n*/\nsetReadOnly( ns, 'dasumpw', require( './../../../ext/base/dasumpw' ) );\n\n/**\n* @name dcusum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dcusum}\n*/\nsetReadOnly( ns, 'dcusum', require( './../../../ext/base/dcusum' ) );\n\n/**\n* @name dcusumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dcusumkbn}\n*/\nsetReadOnly( ns, 'dcusumkbn', require( './../../../ext/base/dcusumkbn' ) );\n\n/**\n* @name dcusumkbn2\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dcusumkbn2}\n*/\nsetReadOnly( ns, 'dcusumkbn2', require( './../../../ext/base/dcusumkbn2' ) );\n\n/**\n* @name dcusumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dcusumors}\n*/\nsetReadOnly( ns, 'dcusumors', require( './../../../ext/base/dcusumors' ) );\n\n/**\n* @name dcusumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dcusumpw}\n*/\nsetReadOnly( ns, 'dcusumpw', require( './../../../ext/base/dcusumpw' ) );\n\n/**\n* @name dfill\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dfill}\n*/\nsetReadOnly( ns, 'dfill', require( './../../../ext/base/dfill' ) );\n\n/**\n* @name dnanasum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dnanasum}\n*/\nsetReadOnly( ns, 'dnanasum', require( './../../../ext/base/dnanasum' ) );\n\n/**\n* @name dnanasumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dnanasumors}\n*/\nsetReadOnly( ns, 'dnanasumors', require( './../../../ext/base/dnanasumors' ) );\n\n/**\n* @name dnannsum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dnannsum}\n*/\nsetReadOnly( ns, 'dnannsum', require( './../../../ext/base/dnannsum' ) );\n\n/**\n* @name dnannsumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dnannsumkbn}\n*/\nsetReadOnly( ns, 'dnannsumkbn', require( './../../../ext/base/dnannsumkbn' ) );\n\n/**\n* @name dnannsumkbn2\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dnannsumkbn2}\n*/\nsetReadOnly( ns, 'dnannsumkbn2', require( './../../../ext/base/dnannsumkbn2' ) );\n\n/**\n* @name dnannsumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dnannsumors}\n*/\nsetReadOnly( ns, 'dnannsumors', require( './../../../ext/base/dnannsumors' ) );\n\n/**\n* @name dnannsumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dnannsumpw}\n*/\nsetReadOnly( ns, 'dnannsumpw', require( './../../../ext/base/dnannsumpw' ) );\n\n/**\n* @name dnansum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dnansum}\n*/\nsetReadOnly( ns, 'dnansum', require( './../../../ext/base/dnansum' ) );\n\n/**\n* @name dnansumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dnansumkbn}\n*/\nsetReadOnly( ns, 'dnansumkbn', require( './../../../ext/base/dnansumkbn' ) );\n\n/**\n* @name dnansumkbn2\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dnansumkbn2}\n*/\nsetReadOnly( ns, 'dnansumkbn2', require( './../../../ext/base/dnansumkbn2' ) );\n\n/**\n* @name dnansumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dnansumors}\n*/\nsetReadOnly( ns, 'dnansumors', require( './../../../ext/base/dnansumors' ) );\n\n/**\n* @name dnansumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dnansumpw}\n*/\nsetReadOnly( ns, 'dnansumpw', require( './../../../ext/base/dnansumpw' ) );\n\n/**\n* @name drev\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/drev}\n*/\nsetReadOnly( ns, 'drev', require( './../../../ext/base/drev' ) );\n\n/**\n* @name dsapxsum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsapxsum}\n*/\nsetReadOnly( ns, 'dsapxsum', require( './../../../ext/base/dsapxsum' ) );\n\n/**\n* @name dsapxsumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsapxsumpw}\n*/\nsetReadOnly( ns, 'dsapxsumpw', require( './../../../ext/base/dsapxsumpw' ) );\n\n/**\n* @name dsnannsumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsnannsumors}\n*/\nsetReadOnly( ns, 'dsnannsumors', require( './../../../ext/base/dsnannsumors' ) );\n\n/**\n* @name dsnansum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsnansum}\n*/\nsetReadOnly( ns, 'dsnansum', require( './../../../ext/base/dsnansum' ) );\n\n/**\n* @name dsnansumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsnansumors}\n*/\nsetReadOnly( ns, 'dsnansumors', require( './../../../ext/base/dsnansumors' ) );\n\n/**\n* @name dsnansumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsnansumpw}\n*/\nsetReadOnly( ns, 'dsnansumpw', require( './../../../ext/base/dsnansumpw' ) );\n\n/**\n* @name dsort2hp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsort2hp}\n*/\nsetReadOnly( ns, 'dsort2hp', require( './../../../ext/base/dsort2hp' ) );\n\n/**\n* @name dsort2ins\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsort2ins}\n*/\nsetReadOnly( ns, 'dsort2ins', require( './../../../ext/base/dsort2ins' ) );\n\n/**\n* @name dsort2sh\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsort2sh}\n*/\nsetReadOnly( ns, 'dsort2sh', require( './../../../ext/base/dsort2sh' ) );\n\n/**\n* @name dsorthp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsorthp}\n*/\nsetReadOnly( ns, 'dsorthp', require( './../../../ext/base/dsorthp' ) );\n\n/**\n* @name dsortins\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsortins}\n*/\nsetReadOnly( ns, 'dsortins', require( './../../../ext/base/dsortins' ) );\n\n/**\n* @name dsortsh\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsortsh}\n*/\nsetReadOnly( ns, 'dsortsh', require( './../../../ext/base/dsortsh' ) );\n\n/**\n* @name dssum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dssum}\n*/\nsetReadOnly( ns, 'dssum', require( './../../../ext/base/dssum' ) );\n\n/**\n* @name dssumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dssumors}\n*/\nsetReadOnly( ns, 'dssumors', require( './../../../ext/base/dssumors' ) );\n\n/**\n* @name dssumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dssumpw}\n*/\nsetReadOnly( ns, 'dssumpw', require( './../../../ext/base/dssumpw' ) );\n\n/**\n* @name dsum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsum}\n*/\nsetReadOnly( ns, 'dsum', require( './../../../ext/base/dsum' ) );\n\n/**\n* @name dsumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsumkbn}\n*/\nsetReadOnly( ns, 'dsumkbn', require( './../../../ext/base/dsumkbn' ) );\n\n/**\n* @name dsumkbn2\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsumkbn2}\n*/\nsetReadOnly( ns, 'dsumkbn2', require( './../../../ext/base/dsumkbn2' ) );\n\n/**\n* @name dsumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsumors}\n*/\nsetReadOnly( ns, 'dsumors', require( './../../../ext/base/dsumors' ) );\n\n/**\n* @name dsumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/dsumpw}\n*/\nsetReadOnly( ns, 'dsumpw', require( './../../../ext/base/dsumpw' ) );\n\n/**\n* @name gapx\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gapx}\n*/\nsetReadOnly( ns, 'gapx', require( './../../../ext/base/gapx' ) );\n\n/**\n* @name gapxsum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gapxsum}\n*/\nsetReadOnly( ns, 'gapxsum', require( './../../../ext/base/gapxsum' ) );\n\n/**\n* @name gapxsumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gapxsumkbn}\n*/\nsetReadOnly( ns, 'gapxsumkbn', require( './../../../ext/base/gapxsumkbn' ) );\n\n/**\n* @name gapxsumkbn2\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gapxsumkbn2}\n*/\nsetReadOnly( ns, 'gapxsumkbn2', require( './../../../ext/base/gapxsumkbn2' ) );\n\n/**\n* @name gapxsumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gapxsumors}\n*/\nsetReadOnly( ns, 'gapxsumors', require( './../../../ext/base/gapxsumors' ) );\n\n/**\n* @name gapxsumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gapxsumpw}\n*/\nsetReadOnly( ns, 'gapxsumpw', require( './../../../ext/base/gapxsumpw' ) );\n\n/**\n* @name gasumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gasumpw}\n*/\nsetReadOnly( ns, 'gasumpw', require( './../../../ext/base/gasumpw' ) );\n\n/**\n* @name gcusum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gcusum}\n*/\nsetReadOnly( ns, 'gcusum', require( './../../../ext/base/gcusum' ) );\n\n/**\n* @name gcusumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gcusumkbn}\n*/\nsetReadOnly( ns, 'gcusumkbn', require( './../../../ext/base/gcusumkbn' ) );\n\n/**\n* @name gcusumkbn2\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gcusumkbn2}\n*/\nsetReadOnly( ns, 'gcusumkbn2', require( './../../../ext/base/gcusumkbn2' ) );\n\n/**\n* @name gcusumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gcusumors}\n*/\nsetReadOnly( ns, 'gcusumors', require( './../../../ext/base/gcusumors' ) );\n\n/**\n* @name gcusumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gcusumpw}\n*/\nsetReadOnly( ns, 'gcusumpw', require( './../../../ext/base/gcusumpw' ) );\n\n/**\n* @name gfill\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gfill}\n*/\nsetReadOnly( ns, 'gfill', require( './../../../ext/base/gfill' ) );\n\n/**\n* @name gfillBy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gfill-by}\n*/\nsetReadOnly( ns, 'gfillBy', require( './../../../ext/base/gfill-by' ) );\n\n/**\n* @name gnannsumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gnannsumkbn}\n*/\nsetReadOnly( ns, 'gnannsumkbn', require( './../../../ext/base/gnannsumkbn' ) );\n\n/**\n* @name gnansum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gnansum}\n*/\nsetReadOnly( ns, 'gnansum', require( './../../../ext/base/gnansum' ) );\n\n/**\n* @name gnansumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gnansumkbn}\n*/\nsetReadOnly( ns, 'gnansumkbn', require( './../../../ext/base/gnansumkbn' ) );\n\n/**\n* @name gnansumkbn2\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gnansumkbn2}\n*/\nsetReadOnly( ns, 'gnansumkbn2', require( './../../../ext/base/gnansumkbn2' ) );\n\n/**\n* @name gnansumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gnansumors}\n*/\nsetReadOnly( ns, 'gnansumors', require( './../../../ext/base/gnansumors' ) );\n\n/**\n* @name gnansumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gnansumpw}\n*/\nsetReadOnly( ns, 'gnansumpw', require( './../../../ext/base/gnansumpw' ) );\n\n/**\n* @name grev\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/grev}\n*/\nsetReadOnly( ns, 'grev', require( './../../../ext/base/grev' ) );\n\n/**\n* @name gsort2hp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gsort2hp}\n*/\nsetReadOnly( ns, 'gsort2hp', require( './../../../ext/base/gsort2hp' ) );\n\n/**\n* @name gsort2ins\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gsort2ins}\n*/\nsetReadOnly( ns, 'gsort2ins', require( './../../../ext/base/gsort2ins' ) );\n\n/**\n* @name gsort2sh\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gsort2sh}\n*/\nsetReadOnly( ns, 'gsort2sh', require( './../../../ext/base/gsort2sh' ) );\n\n/**\n* @name gsorthp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gsorthp}\n*/\nsetReadOnly( ns, 'gsorthp', require( './../../../ext/base/gsorthp' ) );\n\n/**\n* @name gsortins\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gsortins}\n*/\nsetReadOnly( ns, 'gsortins', require( './../../../ext/base/gsortins' ) );\n\n/**\n* @name gsortsh\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gsortsh}\n*/\nsetReadOnly( ns, 'gsortsh', require( './../../../ext/base/gsortsh' ) );\n\n/**\n* @name gsum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gsum}\n*/\nsetReadOnly( ns, 'gsum', require( './../../../ext/base/gsum' ) );\n\n/**\n* @name gsumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gsumkbn}\n*/\nsetReadOnly( ns, 'gsumkbn', require( './../../../ext/base/gsumkbn' ) );\n\n/**\n* @name gsumkbn2\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gsumkbn2}\n*/\nsetReadOnly( ns, 'gsumkbn2', require( './../../../ext/base/gsumkbn2' ) );\n\n/**\n* @name gsumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gsumors}\n*/\nsetReadOnly( ns, 'gsumors', require( './../../../ext/base/gsumors' ) );\n\n/**\n* @name gsumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/gsumpw}\n*/\nsetReadOnly( ns, 'gsumpw', require( './../../../ext/base/gsumpw' ) );\n\n/**\n* @name sapx\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sapx}\n*/\nsetReadOnly( ns, 'sapx', require( './../../../ext/base/sapx' ) );\n\n/**\n* @name sapxsum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sapxsum}\n*/\nsetReadOnly( ns, 'sapxsum', require( './../../../ext/base/sapxsum' ) );\n\n/**\n* @name sapxsumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sapxsumkbn}\n*/\nsetReadOnly( ns, 'sapxsumkbn', require( './../../../ext/base/sapxsumkbn' ) );\n\n/**\n* @name sapxsumkbn2\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sapxsumkbn2}\n*/\nsetReadOnly( ns, 'sapxsumkbn2', require( './../../../ext/base/sapxsumkbn2' ) );\n\n/**\n* @name sapxsumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sapxsumors}\n*/\nsetReadOnly( ns, 'sapxsumors', require( './../../../ext/base/sapxsumors' ) );\n\n/**\n* @name sapxsumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sapxsumpw}\n*/\nsetReadOnly( ns, 'sapxsumpw', require( './../../../ext/base/sapxsumpw' ) );\n\n/**\n* @name sasumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sasumpw}\n*/\nsetReadOnly( ns, 'sasumpw', require( './../../../ext/base/sasumpw' ) );\n\n/**\n* @name scusum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/scusum}\n*/\nsetReadOnly( ns, 'scusum', require( './../../../ext/base/scusum' ) );\n\n/**\n* @name scusumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/scusumkbn}\n*/\nsetReadOnly( ns, 'scusumkbn', require( './../../../ext/base/scusumkbn' ) );\n\n/**\n* @name scusumkbn2\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/scusumkbn2}\n*/\nsetReadOnly( ns, 'scusumkbn2', require( './../../../ext/base/scusumkbn2' ) );\n\n/**\n* @name scusumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/scusumors}\n*/\nsetReadOnly( ns, 'scusumors', require( './../../../ext/base/scusumors' ) );\n\n/**\n* @name scusumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/scusumpw}\n*/\nsetReadOnly( ns, 'scusumpw', require( './../../../ext/base/scusumpw' ) );\n\n/**\n* @name sdsapxsum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sdsapxsum}\n*/\nsetReadOnly( ns, 'sdsapxsum', require( './../../../ext/base/sdsapxsum' ) );\n\n/**\n* @name sdsapxsumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sdsapxsumpw}\n*/\nsetReadOnly( ns, 'sdsapxsumpw', require( './../../../ext/base/sdsapxsumpw' ) );\n\n/**\n* @name sdsnansum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sdsnansum}\n*/\nsetReadOnly( ns, 'sdsnansum', require( './../../../ext/base/sdsnansum' ) );\n\n/**\n* @name sdsnansumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sdsnansumpw}\n*/\nsetReadOnly( ns, 'sdsnansumpw', require( './../../../ext/base/sdsnansumpw' ) );\n\n/**\n* @name sdssum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sdssum}\n*/\nsetReadOnly( ns, 'sdssum', require( './../../../ext/base/sdssum' ) );\n\n/**\n* @name sdssumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sdssumpw}\n*/\nsetReadOnly( ns, 'sdssumpw', require( './../../../ext/base/sdssumpw' ) );\n\n/**\n* @name sfill\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/sfill}\n*/\nsetReadOnly( ns, 'sfill', require( './../../../ext/base/sfill' ) );\n\n/**\n* @name snansum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/snansum}\n*/\nsetReadOnly( ns, 'snansum', require( './../../../ext/base/snansum' ) );\n\n/**\n* @name snansumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/snansumkbn}\n*/\nsetReadOnly( ns, 'snansumkbn', require( './../../../ext/base/snansumkbn' ) );\n\n/**\n* @name snansumkbn2\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/snansumkbn2}\n*/\nsetReadOnly( ns, 'snansumkbn2', require( './../../../ext/base/snansumkbn2' ) );\n\n/**\n* @name snansumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/snansumors}\n*/\nsetReadOnly( ns, 'snansumors', require( './../../../ext/base/snansumors' ) );\n\n/**\n* @name snansumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/snansumpw}\n*/\nsetReadOnly( ns, 'snansumpw', require( './../../../ext/base/snansumpw' ) );\n\n/**\n* @name srev\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/srev}\n*/\nsetReadOnly( ns, 'srev', require( './../../../ext/base/srev' ) );\n\n/**\n* @name ssort2hp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/ssort2hp}\n*/\nsetReadOnly( ns, 'ssort2hp', require( './../../../ext/base/ssort2hp' ) );\n\n/**\n* @name ssort2ins\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/ssort2ins}\n*/\nsetReadOnly( ns, 'ssort2ins', require( './../../../ext/base/ssort2ins' ) );\n\n/**\n* @name ssort2sh\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/ssort2sh}\n*/\nsetReadOnly( ns, 'ssort2sh', require( './../../../ext/base/ssort2sh' ) );\n\n/**\n* @name ssorthp\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/ssorthp}\n*/\nsetReadOnly( ns, 'ssorthp', require( './../../../ext/base/ssorthp' ) );\n\n/**\n* @name ssortins\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/ssortins}\n*/\nsetReadOnly( ns, 'ssortins', require( './../../../ext/base/ssortins' ) );\n\n/**\n* @name ssortsh\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/ssortsh}\n*/\nsetReadOnly( ns, 'ssortsh', require( './../../../ext/base/ssortsh' ) );\n\n/**\n* @name ssum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/ssum}\n*/\nsetReadOnly( ns, 'ssum', require( './../../../ext/base/ssum' ) );\n\n/**\n* @name ssumkbn\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/ssumkbn}\n*/\nsetReadOnly( ns, 'ssumkbn', require( './../../../ext/base/ssumkbn' ) );\n\n/**\n* @name ssumkbn2\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/ssumkbn2}\n*/\nsetReadOnly( ns, 'ssumkbn2', require( './../../../ext/base/ssumkbn2' ) );\n\n/**\n* @name ssumors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/ssumors}\n*/\nsetReadOnly( ns, 'ssumors', require( './../../../ext/base/ssumors' ) );\n\n/**\n* @name ssumpw\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ext/base/ssumpw}\n*/\nsetReadOnly( ns, 'ssumpw', require( './../../../ext/base/ssumpw' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\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* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name base\n* @memberof ns\n* @readonly\n* @type {Namespace}\n* @see {@link module:@stdlib/blas/ext/base}\n*/\nsetReadOnly( ns, 'base', require( './../../ext/base' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\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 isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isFloat64Array = require( '@stdlib/assert/is-float64array' );\nvar isFloat32Array = require( '@stdlib/assert/is-float32array' );\nvar format = require( '@stdlib/string/format' );\nvar ddot = require( './../../base/ddot' ).ndarray;\nvar sdot = require( './../../base/sdot' ).ndarray;\nvar dot = require( './../../base/gdot' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of vectors `x` and `y`.\n*\n* ## Notes\n*\n* - In general, for best performance, especially for large vectors, provide 1-dimensional `ndarrays` whose underlying data type is either `float64` or `float32`.\n*\n* @param {(Collection|VectorLike)} x - first input array\n* @param {(Collection|VectorLike)} y - second input array\n* @throws {TypeError} first argument must be either an array-like object or a 1-dimensional ndarray\n* @throws {TypeError} second argument must be either an array-like object or a 1-dimensional ndarray\n* @throws {RangeError} input arrays must be the same length\n* @returns {number} dot product\n*\n* @example\n* var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];\n* var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];\n*\n* var z = gdot( x, y );\n* // returns -5.0\n*/\nfunction gdot( x, y ) {\n\tvar isxf64;\n\tvar isxf32;\n\tvar isyf64;\n\tvar isyf32;\n\tvar isxa;\n\tvar isxv;\n\tvar isya;\n\tvar isyv;\n\n\tisxa = isndarrayLike( x );\n\tisya = isndarrayLike( y );\n\tisxv = isxa && x.ndims === 1 && x.strides.length === 1; // is ndarray-like vector?\n\tisyv = isya && y.ndims === 1 && y.strides.length === 1; // is ndarray-like vector?\n\tif ( isxv ) {\n\t\tisxf64 = isFloat64Array( x.data );\n\t\tisxf32 = ( isxf64 ) ? false : isFloat32Array( x.data );\n\t} else if ( isxa === false && isCollection( x ) ) {\n\t\tisxf64 = isFloat64Array( x );\n\t\tisxf32 = ( isxf64 ) ? false : isFloat32Array( x );\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be either an array-like object or a one-dimensional ndarray. Value: `%s`.', x ) );\n\t}\n\tif ( isyv ) {\n\t\tisyf64 = isFloat64Array( y.data );\n\t\tisyf32 = ( isyf64 ) ? false : isFloat32Array( y.data );\n\t} else if ( isya === false && isCollection( y ) ) {\n\t\tisyf64 = isFloat64Array( y );\n\t\tisyf32 = ( isyf64 ) ? false : isFloat32Array( y );\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be either an array-like object or a one-dimensional ndarray. Value: `%s`.', y ) );\n\t}\n\tif ( x.length !== y.length ) {\n\t\tthrow new RangeError( format( 'invalid argument. Arrays must be the same length. First argument length: `%u`. Second argument length: `%u`.', x.length, y.length ) );\n\t}\n\tif ( isxv && isyv ) {\n\t\tif ( isxf64 && isyf64 ) {\n\t\t\treturn ddot( x.length, x.data, x.strides[ 0 ], x.offset, y.data, y.strides[ 0 ], y.offset ); // eslint-disable-line max-len\n\t\t}\n\t\tif ( isxf32 && isyf32 ) {\n\t\t\treturn sdot( x.length, x.data, x.strides[ 0 ], x.offset, y.data, y.strides[ 0 ], y.offset ); // eslint-disable-line max-len\n\t\t}\n\t\treturn dot( x.length, x.data, x.strides[ 0 ], x.offset, y.data, y.strides[ 0 ], y.offset ); // eslint-disable-line max-len\n\t}\n\tif ( isxv ) {\n\t\treturn dot( x.length, x.data, x.strides[ 0 ], x.offset, y, 1, 0 );\n\t}\n\tif ( isyv ) {\n\t\treturn dot( x.length, x, 1, 0, y.data, y.strides[ 0 ], y.offset );\n\t}\n\treturn dot( x.length, x, 1, 0, y, 1, 0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gdot;\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 compute the dot product of two vectors.\n*\n* @module @stdlib/blas/gdot\n*\n* @example\n* var gdot = require( '@stdlib/blas/gdot' );\n*\n* var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];\n* var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];\n*\n* var z = gdot( x, y );\n* // returns -5.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\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 isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isFloat64Array = require( '@stdlib/assert/is-float64array' );\nvar isFloat32Array = require( '@stdlib/assert/is-float32array' );\nvar format = require( '@stdlib/string/format' );\nvar dswap = require( './../../base/dswap' ).ndarray;\nvar sswap = require( './../../base/sswap' ).ndarray;\nvar swap = require( './../../base/gswap' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Interchanges two vectors.\n*\n* ## Notes\n*\n* - In general, for best performance, especially for large vectors, provide 1-dimensional `ndarrays` whose underlying data type is either `float64` or `float32`.\n*\n* @param {(Collection|VectorLike)} x - first input array\n* @param {(Collection|VectorLike)} y - second input array\n* @throws {TypeError} first argument must be either an array-like object or a 1-dimensional ndarray\n* @throws {TypeError} second argument must be either an array-like object or a 1-dimensional ndarray\n* @throws {RangeError} input arrays must be the same length\n* @returns {(Collection|VectorLike)} `y`\n*\n* @example\n* var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];\n* var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];\n*\n* gswap( x, y );\n* // x => [ 2.0, 6.0, -1.0, -4.0, 8.0 ]\n* // y => [ 4.0, 2.0, -3.0, 5.0, -1.0 ]\n*/\nfunction gswap( x, y ) {\n\tvar isxf64;\n\tvar isxf32;\n\tvar isyf64;\n\tvar isyf32;\n\tvar isxa;\n\tvar isxv;\n\tvar isya;\n\tvar isyv;\n\n\tisxa = isndarrayLike( x );\n\tisya = isndarrayLike( y );\n\tisxv = isxa && x.ndims === 1 && x.strides.length === 1; // is ndarray-like vector?\n\tisyv = isya && y.ndims === 1 && y.strides.length === 1; // is ndarray-like vector?\n\tif ( isxv ) {\n\t\tisxf64 = isFloat64Array( x.data );\n\t\tisxf32 = ( isxf64 ) ? false : isFloat32Array( x.data );\n\t} else if ( isxa === false && isCollection( x ) ) {\n\t\tisxf64 = isFloat64Array( x );\n\t\tisxf32 = ( isxf64 ) ? false : isFloat32Array( x );\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be either an array-like object or a one-dimensional ndarray. Value: `%s`.', x ) );\n\t}\n\tif ( isyv ) {\n\t\tisyf64 = isFloat64Array( y.data );\n\t\tisyf32 = ( isyf64 ) ? false : isFloat32Array( y.data );\n\t} else if ( isya === false && isCollection( y ) ) {\n\t\tisyf64 = isFloat64Array( y );\n\t\tisyf32 = ( isyf64 ) ? false : isFloat32Array( y );\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be either an array-like object or a one-dimensional ndarray. Value: `%s`.', y ) );\n\t}\n\tif ( x.length !== y.length ) {\n\t\tthrow new RangeError( format( 'invalid argument. Arrays must be the same length. First argument length: `%u`. Second argument length: `%u`.', x.length, y.length ) );\n\t}\n\tif ( isxv && isyv ) {\n\t\tif ( isxf64 && isyf64 ) {\n\t\t\tdswap( x.length, x.data, x.strides[ 0 ], x.offset, y.data, y.strides[ 0 ], y.offset ); // eslint-disable-line max-len\n\t\t\treturn y;\n\t\t}\n\t\tif ( isxf32 && isyf32 ) {\n\t\t\tsswap( x.length, x.data, x.strides[ 0 ], x.offset, y.data, y.strides[ 0 ], y.offset ); // eslint-disable-line max-len\n\t\t\treturn y;\n\t\t}\n\t\tswap( x.length, x.data, x.strides[ 0 ], x.offset, y.data, y.strides[ 0 ], y.offset ); // eslint-disable-line max-len\n\t\treturn y;\n\t}\n\tif ( isxv ) {\n\t\tswap( x.length, x.data, x.strides[ 0 ], x.offset, y, 1, 0 );\n\t\treturn y;\n\t}\n\tif ( isyv ) {\n\t\tswap( x.length, x, 1, 0, y.data, y.strides[ 0 ], y.offset );\n\t\treturn y;\n\t}\n\tswap( x.length, x, 1, 0, y, 1, 0 );\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gswap;\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 interchange two vectors.\n*\n* @module @stdlib/blas/gswap\n*\n* @example\n* var gswap = require( '@stdlib/blas/gswap' );\n*\n* var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];\n* var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];\n*\n* gswap( x, y );\n* // x => [ 2.0, 6.0, -1.0, -4.0, 8.0 ]\n* // y => [ 4.0, 2.0, -3.0, 5.0, -1.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\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 isFloat32VectorLike = require( '@stdlib/assert/is-float32vector-like' );\nvar dot = require( './../../base/sdot' ).ndarray;\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Computes the dot product of two single-precision floating-point vectors.\n*\n* @param {VectorLike} x - first input array\n* @param {VectorLike} y - second input array\n* @throws {TypeError} first argument must be a 1-dimensional ndarray containing single-precision floating-point numbers\n* @throws {TypeError} second argument must be a 1-dimensional ndarray containing single-precision floating-point numbers\n* @throws {RangeError} input arrays must be the same length\n* @returns {number} dot product\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );\n* var y = array( new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );\n*\n* var z = sdot( x, y );\n* // returns -5.0\n*/\nfunction sdot( x, y ) {\n\tif ( !isFloat32VectorLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a one-dimensional ndarray containing single-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float32Array). Value: `%s`.', x ) );\n\t}\n\tif ( !isFloat32VectorLike( y ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a one-dimensional ndarray containing single-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float32Array). Value: `%s`.', y ) );\n\t}\n\tif ( x.length !== y.length ) {\n\t\tthrow new RangeError( format( 'invalid argument. Arrays must be the same length. First argument length: `%u`. Second argument length: `%u`.', x.length, y.length ) );\n\t}\n\treturn dot( x.length, x.data, x.strides[ 0 ], x.offset, y.data, y.strides[ 0 ], y.offset ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdot;\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 compute the dot product of two single-precision floating-point vectors.\n*\n* @module @stdlib/blas/sdot\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var array = require( '@stdlib/ndarray/array' );\n* var sdot = require( '@stdlib/blas/sdot' );\n*\n* var x = array( new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );\n* var y = array( new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );\n*\n* var z = sdot( x, y );\n* // returns -5.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\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 isFloat32VectorLike = require( '@stdlib/assert/is-float32vector-like' );\nvar format = require( '@stdlib/string/format' );\nvar swap = require( './../../base/sswap' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Interchanges two single-precision floating-point vectors.\n*\n* @param {VectorLike} x - first input array\n* @param {VectorLike} y - second input array\n* @throws {TypeError} first argument must be a 1-dimensional ndarray containing single-precision floating-point numbers\n* @throws {TypeError} second argument must be a 1-dimensional ndarray containing single-precision floating-point numbers\n* @throws {RangeError} input arrays must be the same length\n* @returns {VectorLike} `y`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );\n* var y = array( new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );\n*\n* sswap( x, y );\n*\n* var xbuf = x.data;\n* // returns [ 2.0, 6.0, -1.0, -4.0, 8.0 ]\n*\n* var ybuf = y.data;\n* // returns [ 4.0, 2.0, -3.0, 5.0, -1.0 ]\n*/\nfunction sswap( x, y ) {\n\tif ( !isFloat32VectorLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a one-dimensional ndarray containing single-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float32Array). Value: `%s`.', x ) );\n\t}\n\tif ( !isFloat32VectorLike( y ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a one-dimensional ndarray containing single-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float32Array). Value: `%s`.', y ) );\n\t}\n\tif ( x.length !== y.length ) {\n\t\tthrow new RangeError( format( 'invalid argument. Arrays must be the same length. First argument length: `%u`. Second argument length: `%u`.', x.length, y.length ) );\n\t}\n\tswap( x.length, x.data, x.strides[ 0 ], x.offset, y.data, y.strides[ 0 ], y.offset ); // eslint-disable-line max-len\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sswap;\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 interchange two single-precision floating-point vectors.\n*\n* @module @stdlib/blas/sswap\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var array = require( '@stdlib/ndarray/array' );\n* var sswap = require( '@stdlib/blas/sswap' );\n*\n* var x = array( new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );\n* var y = array( new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );\n*\n* sswap( x, y );\n*\n* var xbuf = x.data;\n* // returns [ 2.0, 6.0, -1.0, -4.0, 8.0 ]\n*\n* var ybuf = y.data;\n* // returns [ 4.0, 2.0, -3.0, 5.0, -1.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 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* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name base\n* @memberof ns\n* @readonly\n* @type {Namespace}\n* @see {@link module:@stdlib/blas/base}\n*/\nsetReadOnly( ns, 'base', require( './../base' ) );\n\n/**\n* @name ddot\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/ddot}\n*/\nsetReadOnly( ns, 'ddot', require( './../ddot' ) );\n\n/**\n* @name dswap\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/dswap}\n*/\nsetReadOnly( ns, 'dswap', require( './../dswap' ) );\n\n/**\n* @name ext\n* @memberof ns\n* @readonly\n* @type {Namespace}\n* @see {@link module:@stdlib/blas/ext}\n*/\nsetReadOnly( ns, 'ext', require( './../ext' ) );\n\n/**\n* @name gdot\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/gdot}\n*/\nsetReadOnly( ns, 'gdot', require( './../gdot' ) );\n\n/**\n* @name gswap\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/gswap}\n*/\nsetReadOnly( ns, 'gswap', require( './../gswap' ) );\n\n/**\n* @name sdot\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/sdot}\n*/\nsetReadOnly( ns, 'sdot', require( './../sdot' ) );\n\n/**\n* @name sswap\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/sswap}\n*/\nsetReadOnly( ns, 'sswap', require( './../sswap' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], + "mappings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,IAAIC,GAAsB,QAAS,sCAAuC,EACtEC,GAAS,QAAS,uBAAwB,EAC1CC,GAAO,KAAgC,QA8B3C,SAASC,GAAOC,EAAGC,EAAI,CACtB,GAAK,CAACL,GAAqBI,CAAE,EAC5B,MAAM,IAAI,UAAWH,GAAQ,wMAAyMG,CAAE,CAAE,EAE3O,GAAK,CAACJ,GAAqBK,CAAE,EAC5B,MAAM,IAAI,UAAWJ,GAAQ,yMAA0MI,CAAE,CAAE,EAE5O,GAAKD,EAAE,SAAWC,EAAE,OACnB,MAAM,IAAI,WAAYJ,GAAQ,+GAAgHG,EAAE,OAAQC,EAAE,MAAO,CAAE,EAEpK,OAAAH,GAAME,EAAE,OAAQA,EAAE,KAAMA,EAAE,QAAS,CAAE,EAAGA,EAAE,OAAQC,EAAE,KAAMA,EAAE,QAAS,CAAE,EAAGA,EAAE,MAAO,EAC5EA,CACR,CAKAN,GAAO,QAAUI,KCvEjB,IAAAG,GAAAC,EAAA,SAAAC,IAAAC,GAAA,cA4CA,IAAIC,GAAO,KAKXD,GAAO,QAAUC,KCvBjB,IAAIC,GAAc,QAAS,yCAA0C,EAUjEC,EAAK,CAAC,EASVD,GAAaC,EAAI,OAAQ,IAAuB,EAShDD,GAAaC,EAAI,OAAQ,IAAuB,EAShDD,GAAaC,EAAI,QAAS,IAAwB,EASlDD,GAAaC,EAAI,MAAO,IAAsB,EAS9CD,GAAaC,EAAI,OAAQ,IAAuB,EAShDD,GAAaC,EAAI,QAAS,IAAwB,EASlDD,GAAaC,EAAI,OAAQ,IAAuB,EAShDD,GAAaC,EAAI,QAAS,IAAwB,EAKlD,OAAO,QAAUA", + "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", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "ccopy", "tmp", "require_cswap", "__commonJSMin", "exports", "module", "Float32Array", "cswap", "N", "x", "strideX", "y", "strideY", "viewX", "viewY", "tmp", "sx", "sy", "ix", "iy", "i", "j", "require_ndarray", "__commonJSMin", "exports", "module", "Float32Array", "cswap", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "viewX", "viewY", "tmp", "sx", "sy", "ix", "iy", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "cswap", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "cswap", "tmp", "require_dasum", "__commonJSMin", "exports", "module", "abs", "M", "dasum", "N", "x", "stride", "sum", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "M", "dasum", "N", "x", "stride", "offset", "sum", "ix", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dasum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dasum", "tmp", "require_daxpy", "__commonJSMin", "exports", "module", "M", "daxpy", "N", "alpha", "x", "strideX", "y", "strideY", "ix", "iy", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "M", "daxpy", "N", "alpha", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "daxpy", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "daxpy", "tmp", "require_dcopy", "__commonJSMin", "exports", "module", "M", "dcopy", "N", "x", "strideX", "y", "strideY", "ix", "iy", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "M", "dcopy", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dcopy", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dcopy", "tmp", "require_ddot", "__commonJSMin", "exports", "module", "M", "ddot", "N", "x", "strideX", "y", "strideY", "dot", "ix", "iy", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "M", "ddot", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "dot", "ix", "iy", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "ddot", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "ddot", "tmp", "require_dnrm2", "__commonJSMin", "exports", "module", "sqrt", "abs", "pow", "dnrm2", "N", "x", "stride", "scale", "ssq", "ax", "i", "require_ndarray", "__commonJSMin", "exports", "module", "sqrt", "abs", "pow", "dnrm2", "N", "x", "stride", "offset", "scale", "ssq", "ax", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnrm2", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dnrm2", "tmp", "require_dscal", "__commonJSMin", "exports", "module", "M", "dscal", "N", "alpha", "x", "stride", "i", "m", "require_ndarray", "__commonJSMin", "exports", "module", "M", "dscal", "N", "alpha", "x", "stride", "offset", "ix", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dscal", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dscal", "tmp", "require_dsdot", "__commonJSMin", "exports", "module", "M", "dsdot", "N", "x", "strideX", "y", "strideY", "dot", "ix", "iy", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "M", "dsdot", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "dot", "ix", "iy", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsdot", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsdot", "tmp", "require_dswap", "__commonJSMin", "exports", "module", "M", "dswap", "N", "x", "strideX", "y", "strideY", "tmp", "ix", "iy", "m", "i", "j", "require_ndarray", "__commonJSMin", "exports", "module", "M", "dswap", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "tmp", "ix", "iy", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dswap", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dswap", "tmp", "require_main", "__commonJSMin", "exports", "module", "abs", "M", "gasum", "N", "x", "stride", "sum", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "M", "gasum", "N", "x", "stride", "offset", "sum", "ix", "m", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "M", "gaxpy", "N", "alpha", "x", "strideX", "y", "strideY", "ix", "iy", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "M", "gaxpy", "N", "alpha", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "m", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_accessors", "__commonJSMin", "exports", "module", "gcopy", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "xbuf", "ybuf", "set", "get", "ix", "iy", "i", "require_main", "__commonJSMin", "exports", "module", "arraylike2object", "accessors", "M", "gcopy", "N", "x", "strideX", "y", "strideY", "ix", "iy", "ox", "oy", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "arraylike2object", "accessors", "M", "gcopy", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "ox", "oy", "m", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "M", "gdot", "N", "x", "strideX", "y", "strideY", "dot", "ix", "iy", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "M", "gdot", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "dot", "ix", "iy", "m", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_gnrm2", "__commonJSMin", "exports", "module", "sqrt", "abs", "pow", "gnrm2", "N", "x", "stride", "scale", "ssq", "ax", "i", "require_ndarray", "__commonJSMin", "exports", "module", "sqrt", "abs", "pow", "gnrm2", "N", "x", "stride", "offset", "scale", "ssq", "ax", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "gnrm2", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "gnrm2", "require_main", "__commonJSMin", "exports", "module", "M", "gscal", "N", "alpha", "x", "stride", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "M", "gscal", "N", "alpha", "x", "stride", "offset", "ix", "m", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_accessors", "__commonJSMin", "exports", "module", "gswap", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "xbuf", "ybuf", "set", "get", "tmp", "ix", "iy", "i", "require_main", "__commonJSMin", "exports", "module", "arraylike2object", "accessors", "M", "gswap", "N", "x", "strideX", "y", "strideY", "tmp", "ix", "iy", "ox", "oy", "m", "i", "j", "require_ndarray", "__commonJSMin", "exports", "module", "arraylike2object", "accessors", "M", "gswap", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "tmp", "ix", "iy", "ox", "oy", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_sasum", "__commonJSMin", "exports", "module", "abs", "float64ToFloat32", "sasum", "N", "x", "stride", "sum", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "float64ToFloat32", "sasum", "N", "x", "stride", "offset", "sum", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sasum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sasum", "tmp", "require_saxpy", "__commonJSMin", "exports", "module", "float64ToFloat32", "M", "saxpy", "N", "alpha", "x", "strideX", "y", "strideY", "ix", "iy", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "M", "saxpy", "N", "alpha", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "saxpy", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "saxpy", "tmp", "require_scopy", "__commonJSMin", "exports", "module", "M", "scopy", "N", "x", "strideX", "y", "strideY", "ix", "iy", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "M", "scopy", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "scopy", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "scopy", "tmp", "require_sdot", "__commonJSMin", "exports", "module", "float64ToFloat32", "sdot", "N", "x", "strideX", "y", "strideY", "dot", "ix", "iy", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "sdot", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "dot", "ix", "iy", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sdot", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sdot", "tmp", "require_sdsdot", "__commonJSMin", "exports", "module", "float64ToFloat32", "M", "sdsdot", "N", "scalar", "x", "strideX", "y", "strideY", "dot", "ix", "iy", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "M", "sdsdot", "N", "scalar", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "dot", "ix", "iy", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sdsdot", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sdsdot", "tmp", "require_snrm2", "__commonJSMin", "exports", "module", "sqrt", "abs", "pow", "float64ToFloat32", "snrm2", "N", "x", "stride", "scale", "ssq", "ax", "i", "require_ndarray", "__commonJSMin", "exports", "module", "sqrt", "abs", "pow", "float64ToFloat32", "snrm2", "N", "x", "stride", "offset", "scale", "ssq", "ax", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "snrm2", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "snrm2", "tmp", "require_assign", "__commonJSMin", "exports", "module", "float64ToFloat32", "absf", "sqrtf", "abs2f", "copysignf", "srotg", "a", "b", "out", "stride", "offset", "scale", "sign", "aa", "ab", "r", "c", "s", "z", "require_main", "__commonJSMin", "exports", "module", "Float32Array", "fcn", "srotg", "a", "b", "out", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "assign", "require_sscal", "__commonJSMin", "exports", "module", "M", "sscal", "N", "alpha", "x", "stride", "i", "m", "require_ndarray", "__commonJSMin", "exports", "module", "M", "sscal", "N", "alpha", "x", "stride", "offset", "ix", "i", "m", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sscal", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sscal", "tmp", "require_sswap", "__commonJSMin", "exports", "module", "M", "sswap", "N", "x", "strideX", "y", "strideY", "tmp", "ix", "iy", "m", "i", "j", "require_ndarray", "__commonJSMin", "exports", "module", "M", "sswap", "N", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "tmp", "ix", "iy", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sswap", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sswap", "tmp", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "blas", "require_main", "__commonJSMin", "exports", "module", "isFloat64VectorLike", "format", "dot", "ddot", "x", "y", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isFloat64VectorLike", "format", "swap", "dswap", "x", "y", "require_lib", "__commonJSMin", "exports", "module", "main", "require_dapx", "__commonJSMin", "exports", "module", "M", "dapx", "N", "alpha", "x", "stride", "ix", "i", "m", "require_ndarray", "__commonJSMin", "exports", "module", "M", "dapx", "N", "alpha", "x", "stride", "offset", "ix", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dapx", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dapx", "tmp", "require_dapxsumkbn", "__commonJSMin", "exports", "module", "abs", "dapxsumkbn", "N", "alpha", "x", "stride", "sum", "ix", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "dapxsumkbn", "N", "alpha", "x", "stride", "offset", "sum", "ix", "v", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dapxsumkbn", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dapxsumkbn", "tmp", "require_dapxsum", "__commonJSMin", "exports", "module", "dapxsumkbn", "dapxsum", "N", "alpha", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "dapxsumkbn", "dapxsum", "N", "alpha", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dapxsum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dapxsum", "tmp", "require_dapxsumkbn2", "__commonJSMin", "exports", "module", "abs", "dapxsumkbn2", "N", "alpha", "x", "stride", "sum", "ccs", "ix", "cs", "cc", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "dapxsumkbn2", "N", "alpha", "x", "stride", "offset", "sum", "ccs", "ix", "cs", "cc", "v", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dapxsumkbn2", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dapxsumkbn2", "tmp", "require_dapxsumors", "__commonJSMin", "exports", "module", "dapxsumors", "N", "alpha", "x", "stride", "sum", "ix", "i", "require_ndarray", "__commonJSMin", "exports", "module", "dapxsumors", "N", "alpha", "x", "stride", "offset", "sum", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dapxsumors", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dapxsumors", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "BLOCKSIZE", "dapxsumpw", "N", "alpha", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_dapxsumpw", "__commonJSMin", "exports", "module", "sum", "dapxsumpw", "N", "alpha", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dapxsumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dapxsumpw", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "abs", "BLOCKSIZE", "dasumpw", "N", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_dasumpw", "__commonJSMin", "exports", "module", "abs", "sum", "dasumpw", "N", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dasumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dasumpw", "tmp", "require_dcusumkbn", "__commonJSMin", "exports", "module", "abs", "dcusumkbn", "N", "sum", "x", "strideX", "y", "strideY", "ix", "iy", "s", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "dcusumkbn", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "s", "v", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dcusumkbn", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dcusumkbn", "tmp", "require_dcusum", "__commonJSMin", "exports", "module", "dcusumkbn", "dcusum", "N", "sum", "x", "strideX", "y", "strideY", "require_ndarray", "__commonJSMin", "exports", "module", "dcusumkbn", "dcusum", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dcusum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dcusum", "tmp", "require_dcusumkbn2", "__commonJSMin", "exports", "module", "abs", "dcusumkbn2", "N", "sum", "x", "strideX", "y", "strideY", "ccs", "ix", "iy", "cs", "cc", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "dcusumkbn2", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ccs", "ix", "iy", "cs", "cc", "v", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dcusumkbn2", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dcusumkbn2", "tmp", "require_dcusumors", "__commonJSMin", "exports", "module", "dcusumors", "N", "sum", "x", "strideX", "y", "strideY", "ix", "iy", "i", "require_ndarray", "__commonJSMin", "exports", "module", "dcusumors", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dcusumors", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dcusumors", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "BLOCKSIZE", "dcusumpw", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "s", "n", "i", "require_dcusumpw", "__commonJSMin", "exports", "module", "cusum", "dcusumpw", "N", "sum", "x", "strideX", "y", "strideY", "ix", "iy", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dcusumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dcusumpw", "tmp", "require_dfill", "__commonJSMin", "exports", "module", "M", "dfill", "N", "alpha", "x", "stride", "ix", "i", "m", "require_ndarray", "__commonJSMin", "exports", "module", "M", "dfill", "N", "alpha", "x", "stride", "offset", "ix", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dfill", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dfill", "tmp", "require_dnanasumors", "__commonJSMin", "exports", "module", "isnan", "abs", "dnanasumors", "N", "x", "stride", "sum", "ix", "v", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "abs", "dnanasumors", "N", "x", "stride", "offset", "sum", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnanasumors", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dnanasumors", "tmp", "require_dnanasum", "__commonJSMin", "exports", "module", "dnanasumors", "dnanasum", "N", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "dnanasumors", "dnanasum", "N", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnanasum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dnanasum", "tmp", "require_dnannsumkbn", "__commonJSMin", "exports", "module", "isnan", "abs", "dnannsumkbn", "N", "x", "strideX", "out", "strideOut", "sum", "ix", "io", "v", "c", "n", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "abs", "dnannsumkbn", "N", "x", "strideX", "offsetX", "out", "strideOut", "offsetOut", "sum", "ix", "io", "v", "t", "c", "n", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnannsumkbn", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dnannsumkbn", "tmp", "require_dnannsum", "__commonJSMin", "exports", "module", "dnannsumkbn", "dnannsum", "N", "x", "strideX", "out", "strideOut", "require_ndarray", "__commonJSMin", "exports", "module", "dnannsumkbn", "dnannsum", "N", "x", "strideX", "offsetX", "out", "strideOut", "offsetOut", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnannsum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dnannsum", "tmp", "require_dnannsumkbn2", "__commonJSMin", "exports", "module", "isnan", "abs", "dnannsumkbn2", "N", "x", "strideX", "out", "strideOut", "sum", "ccs", "cs", "cc", "ix", "io", "v", "t", "c", "n", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "abs", "dnannsumkbn2", "N", "x", "strideX", "offsetX", "out", "strideOut", "offsetOut", "sum", "ccs", "cs", "cc", "ix", "io", "v", "t", "c", "n", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnannsumkbn2", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dnannsumkbn2", "tmp", "require_dnannsumors", "__commonJSMin", "exports", "module", "isnan", "dnannsumors", "N", "x", "strideX", "out", "strideOut", "sum", "ix", "io", "n", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "dnannsumors", "N", "x", "strideX", "offsetX", "out", "strideOut", "offsetOut", "sum", "ix", "io", "n", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnannsumors", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dnannsumors", "tmp", "require_sumpw", "__commonJSMin", "exports", "module", "isnan", "floor", "BLOCKSIZE", "sumpw", "N", "x", "strideX", "offsetX", "out", "strideOut", "offsetOut", "ix", "io", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "v", "i", "require_dnannsumpw", "__commonJSMin", "exports", "module", "sumpw", "dnannsumpw", "N", "x", "strideX", "out", "strideOut", "ix", "io", "require_ndarray", "__commonJSMin", "exports", "module", "sumpw", "dnannsumpw", "N", "x", "strideX", "offsetX", "out", "strideOut", "offsetOut", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnannsumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dnannsumpw", "tmp", "require_dnansumkbn", "__commonJSMin", "exports", "module", "isnan", "abs", "dnansumkbn", "N", "x", "stride", "sum", "ix", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "abs", "dnansumkbn", "N", "x", "stride", "offset", "sum", "ix", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnansumkbn", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dnansumkbn", "tmp", "require_dnansum", "__commonJSMin", "exports", "module", "dnansumkbn", "dnansum", "N", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "dnansumkbn", "dnansum", "N", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnansum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dnansum", "tmp", "require_dnansumkbn2", "__commonJSMin", "exports", "module", "isnan", "abs", "dnansumkbn2", "N", "x", "stride", "sum", "ccs", "ix", "cs", "cc", "v", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "abs", "dnansumkbn2", "N", "x", "stride", "offset", "sum", "ccs", "ix", "cs", "cc", "v", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnansumkbn2", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dnansumkbn2", "tmp", "require_dnansumors", "__commonJSMin", "exports", "module", "isnan", "dnansumors", "N", "x", "stride", "sum", "ix", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "dnansumors", "N", "x", "stride", "offset", "sum", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnansumors", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dnansumors", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "floor", "BLOCKSIZE", "dnansumpw", "N", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_dnansumpw", "__commonJSMin", "exports", "module", "isnan", "sum", "dnansumpw", "N", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnansumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dnansumpw", "tmp", "require_drev", "__commonJSMin", "exports", "module", "floor", "M", "drev", "N", "x", "stride", "tmp", "ix", "iy", "m", "n", "i", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "M", "drev", "N", "x", "stride", "offset", "tmp", "ix", "iy", "m", "n", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "drev", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "drev", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "BLOCKSIZE", "dsapxsumpw", "N", "alpha", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_dsapxsumpw", "__commonJSMin", "exports", "module", "sum", "dsapxsumpw", "N", "alpha", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsapxsumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsapxsumpw", "tmp", "require_dsapxsum", "__commonJSMin", "exports", "module", "dsapxsumpw", "dsapxsum", "N", "alpha", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "dsapxsumpw", "dsapxsum", "N", "alpha", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsapxsum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsapxsum", "tmp", "require_dsnannsumors", "__commonJSMin", "exports", "module", "isnan", "dsnannsumors", "N", "x", "strideX", "out", "strideOut", "sum", "ix", "io", "n", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "dsnannsumors", "N", "x", "strideX", "offsetX", "out", "strideOut", "offsetOut", "sum", "ix", "io", "n", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsnannsumors", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsnannsumors", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "isnanf", "floor", "BLOCKSIZE", "dsnansumpw", "N", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_dsnansumpw", "__commonJSMin", "exports", "module", "isnanf", "sum", "dsnansumpw", "N", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsnansumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsnansumpw", "tmp", "require_dsnansum", "__commonJSMin", "exports", "module", "dsnansumpw", "dsnansum", "N", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "dsnansumpw", "dsnansum", "N", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsnansum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsnansum", "tmp", "require_dsnansumors", "__commonJSMin", "exports", "module", "isnan", "dsnansumors", "N", "x", "stride", "sum", "ix", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "dsnansumors", "N", "x", "stride", "offset", "sum", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsnansumors", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsnansumors", "tmp", "require_dsort2hp", "__commonJSMin", "exports", "module", "isPositiveZero", "isnan", "floor", "dsort2hp", "N", "order", "x", "strideX", "y", "strideY", "offsetX", "offsetY", "parent", "child", "v1", "v2", "tx", "ty", "ix", "iy", "n", "j", "k", "require_ndarray", "__commonJSMin", "exports", "module", "isPositiveZero", "isnan", "floor", "dsort2hp", "N", "order", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "parent", "child", "v1", "v2", "tx", "ty", "ix", "iy", "n", "j", "k", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsort2hp", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsort2hp", "tmp", "require_dsort2ins", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "dsort2ins", "N", "order", "x", "strideX", "y", "strideY", "flg", "ix", "jx", "fx", "lx", "iy", "jy", "fy", "ly", "vx", "vy", "ux", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "dsort2ins", "N", "order", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "flg", "ix", "jx", "fx", "lx", "iy", "jy", "fy", "ly", "vx", "vy", "ux", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsort2ins", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsort2ins", "tmp", "require_gaps", "__commonJSMin", "exports", "module", "require_dsort2sh", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "GAPS", "NGAPS", "dsort2sh", "N", "order", "x", "strideX", "y", "strideY", "offsetX", "offsetY", "flg", "gap", "vx", "vy", "ux", "i", "j", "k", "require_ndarray", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "GAPS", "NGAPS", "dsort2sh", "N", "order", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "flg", "gap", "vx", "vy", "ux", "i", "j", "k", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsort2sh", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsort2sh", "tmp", "require_dsorthp", "__commonJSMin", "exports", "module", "isPositiveZero", "isnan", "floor", "dsorthp", "N", "order", "x", "stride", "offset", "parent", "child", "v1", "v2", "n", "t", "i", "j", "k", "require_ndarray", "__commonJSMin", "exports", "module", "isPositiveZero", "isnan", "floor", "dsorthp", "N", "order", "x", "stride", "offset", "parent", "child", "v1", "v2", "n", "t", "i", "j", "k", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsorthp", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsorthp", "tmp", "require_dsortins", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "dsortins", "N", "order", "x", "stride", "flg", "ix", "jx", "fx", "lx", "v", "u", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "dsortins", "N", "order", "x", "stride", "offset", "flg", "ix", "jx", "fx", "lx", "v", "u", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsortins", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsortins", "tmp", "require_gaps", "__commonJSMin", "exports", "module", "require_dsortsh", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "GAPS", "NGAPS", "dsortsh", "N", "order", "x", "stride", "offset", "flg", "gap", "v", "u", "i", "j", "k", "require_ndarray", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "GAPS", "NGAPS", "dsortsh", "N", "order", "x", "stride", "offset", "flg", "gap", "v", "u", "i", "j", "k", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsortsh", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsortsh", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "BLOCKSIZE", "dssumpw", "N", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_dssumpw", "__commonJSMin", "exports", "module", "sum", "dssumpw", "N", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dssumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dssumpw", "tmp", "require_dssum", "__commonJSMin", "exports", "module", "dssumpw", "dssum", "N", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "dssumpw", "dssum", "N", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dssum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dssum", "tmp", "require_dssumors", "__commonJSMin", "exports", "module", "M", "dssumors", "N", "x", "stride", "sum", "ix", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "M", "dssumors", "N", "x", "stride", "offset", "sum", "ix", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dssumors", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dssumors", "tmp", "require_dsumkbn", "__commonJSMin", "exports", "module", "abs", "dsumkbn", "N", "x", "stride", "sum", "ix", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "dsumkbn", "N", "x", "stride", "offset", "sum", "ix", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsumkbn", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsumkbn", "tmp", "require_dsum", "__commonJSMin", "exports", "module", "dsumkbn", "dsum", "N", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "dsumkbn", "dsum", "N", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsum", "tmp", "require_dsumkbn2", "__commonJSMin", "exports", "module", "abs", "dsumkbn2", "N", "x", "stride", "sum", "ccs", "ix", "cs", "cc", "v", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "dsumkbn2", "N", "x", "stride", "offset", "sum", "ccs", "ix", "cs", "cc", "v", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsumkbn2", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsumkbn2", "tmp", "require_dsumors", "__commonJSMin", "exports", "module", "M", "dsumors", "N", "x", "stride", "sum", "ix", "m", "i", "require_ndarray", "__commonJSMin", "exports", "module", "M", "dsumors", "N", "x", "stride", "offset", "sum", "ix", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsumors", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsumors", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "BLOCKSIZE", "dsumpw", "N", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_dsumpw", "__commonJSMin", "exports", "module", "sum", "dsumpw", "N", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dsumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "dsumpw", "tmp", "require_main", "__commonJSMin", "exports", "module", "M", "gapx", "N", "alpha", "x", "stride", "ix", "i", "m", "require_ndarray", "__commonJSMin", "exports", "module", "M", "gapx", "N", "alpha", "x", "stride", "offset", "ix", "m", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "abs", "gapxsumkbn", "N", "alpha", "x", "stride", "sum", "ix", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "gapxsumkbn", "N", "alpha", "x", "stride", "offset", "sum", "ix", "v", "t", "c", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "gapxsumkbn", "gapxsum", "N", "alpha", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "gapxsumkbn", "gapxsum", "N", "alpha", "x", "stride", "offset", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "abs", "gapxsumkbn2", "N", "alpha", "x", "stride", "sum", "ccs", "ix", "cs", "cc", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "gapxsumkbn2", "N", "alpha", "x", "stride", "offset", "sum", "ccs", "ix", "cs", "cc", "v", "t", "c", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "gapxsumors", "N", "alpha", "x", "stride", "sum", "ix", "i", "require_ndarray", "__commonJSMin", "exports", "module", "gapxsumors", "N", "alpha", "x", "stride", "offset", "sum", "ix", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "BLOCKSIZE", "gapxsumpw", "N", "alpha", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_main", "__commonJSMin", "exports", "module", "sum", "gapxsumpw", "N", "alpha", "x", "stride", "ix", "s", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "abs", "BLOCKSIZE", "gasumpw", "N", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_main", "__commonJSMin", "exports", "module", "abs", "sum", "gasumpw", "N", "x", "stride", "ix", "s", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "abs", "gcusumkbn", "N", "sum", "x", "strideX", "y", "strideY", "ix", "iy", "s", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "gcusumkbn", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "s", "v", "t", "c", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "gcusumkbn", "gcusum", "N", "sum", "x", "strideX", "y", "strideY", "require_ndarray", "__commonJSMin", "exports", "module", "gcusumkbn", "gcusum", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "abs", "gcusumkbn2", "N", "sum", "x", "strideX", "y", "strideY", "ccs", "ix", "iy", "cs", "cc", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "gcusumkbn2", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ccs", "ix", "iy", "cs", "cc", "v", "t", "c", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "gcusumors", "N", "sum", "x", "strideX", "y", "strideY", "ix", "iy", "i", "require_ndarray", "__commonJSMin", "exports", "module", "gcusumors", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "BLOCKSIZE", "gcusumpw", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "s", "n", "i", "require_main", "__commonJSMin", "exports", "module", "cusum", "gcusumpw", "N", "sum", "x", "strideX", "y", "strideY", "ix", "iy", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_accessors", "__commonJSMin", "exports", "module", "gfill", "N", "alpha", "x", "stride", "offset", "xbuf", "set", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "arraylike2object", "accessors", "M", "gfill", "N", "alpha", "x", "stride", "ix", "i", "m", "o", "require_ndarray", "__commonJSMin", "exports", "module", "arraylike2object", "accessors", "M", "gfill", "N", "alpha", "x", "stride", "offset", "ix", "m", "o", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_accessors", "__commonJSMin", "exports", "module", "gfillBy", "N", "x", "stride", "offset", "clbk", "thisArg", "xbuf", "set", "get", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "arraylike2object", "accessors", "gfillBy", "N", "x", "stride", "clbk", "thisArg", "ix", "o", "i", "require_ndarray", "__commonJSMin", "exports", "module", "arraylike2object", "accessors", "gfillBy", "N", "x", "stride", "offset", "clbk", "thisArg", "ix", "o", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "isnan", "abs", "gnannsumkbn", "N", "x", "strideX", "out", "strideOut", "sum", "ix", "io", "v", "c", "n", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "abs", "gnannsumkbn", "N", "x", "strideX", "offsetX", "out", "strideOut", "offsetOut", "sum", "ix", "io", "v", "t", "c", "n", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "isnan", "abs", "gnansumkbn", "N", "x", "stride", "sum", "ix", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "abs", "gnansumkbn", "N", "x", "stride", "offset", "sum", "ix", "t", "c", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "gnansumkbn", "gnansum", "N", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "gnansumkbn", "gnansum", "N", "x", "stride", "offset", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "isnan", "abs", "gnansumkbn2", "N", "x", "stride", "sum", "ccs", "ix", "cs", "cc", "v", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "abs", "gnansumkbn2", "N", "x", "stride", "offset", "sum", "ccs", "ix", "cs", "cc", "v", "t", "c", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "isnan", "gnansumors", "N", "x", "stride", "ix", "s", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "gnansumors", "N", "x", "stride", "offset", "ix", "s", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "floor", "BLOCKSIZE", "gnansumpw", "N", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_main", "__commonJSMin", "exports", "module", "isnan", "sum", "gnansumpw", "N", "x", "stride", "ix", "s", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_accessors", "__commonJSMin", "exports", "module", "floor", "grev", "N", "x", "stride", "offset", "xbuf", "set", "get", "tmp", "ix", "iy", "n", "i", "require_main", "__commonJSMin", "exports", "module", "floor", "arraylike2object", "accessors", "M", "grev", "N", "x", "stride", "tmp", "ix", "iy", "o", "m", "n", "i", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "arraylike2object", "accessors", "M", "grev", "N", "x", "stride", "offset", "tmp", "ix", "iy", "o", "m", "n", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "isPositiveZero", "isnan", "floor", "gsort2hp", "N", "order", "x", "strideX", "y", "strideY", "offsetX", "offsetY", "parent", "child", "v1", "v2", "tx", "ty", "ix", "iy", "n", "j", "k", "require_ndarray", "__commonJSMin", "exports", "module", "isPositiveZero", "isnan", "floor", "gsort2hp", "N", "order", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "parent", "child", "v1", "v2", "tx", "ty", "ix", "iy", "n", "j", "k", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "gsort2ins", "N", "order", "x", "strideX", "y", "strideY", "flg", "ix", "jx", "fx", "lx", "iy", "jy", "fy", "ly", "vx", "vy", "ux", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "gsort2ins", "N", "order", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "flg", "ix", "jx", "fx", "lx", "iy", "jy", "fy", "ly", "vx", "vy", "ux", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_gaps", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "GAPS", "NGAPS", "gsort2sh", "N", "order", "x", "strideX", "y", "strideY", "offsetX", "offsetY", "flg", "gap", "vx", "vy", "ux", "i", "j", "k", "require_ndarray", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "GAPS", "NGAPS", "gsort2sh", "N", "order", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "flg", "gap", "vx", "vy", "ux", "i", "j", "k", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "isPositiveZero", "isnan", "floor", "gsorthp", "N", "order", "x", "stride", "offset", "parent", "child", "v1", "v2", "n", "t", "i", "j", "k", "require_ndarray", "__commonJSMin", "exports", "module", "isPositiveZero", "isnan", "floor", "gsorthp", "N", "order", "x", "stride", "offset", "parent", "child", "v1", "v2", "n", "t", "i", "j", "k", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "gsortins", "N", "order", "x", "stride", "flg", "ix", "jx", "fx", "lx", "v", "u", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "gsortins", "N", "order", "x", "stride", "offset", "flg", "ix", "jx", "fx", "lx", "v", "u", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_gaps", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "GAPS", "NGAPS", "gsortsh", "N", "order", "x", "stride", "offset", "flg", "gap", "v", "u", "i", "j", "k", "require_ndarray", "__commonJSMin", "exports", "module", "isNegativeZero", "isnan", "GAPS", "NGAPS", "gsortsh", "N", "order", "x", "stride", "offset", "flg", "gap", "v", "u", "i", "j", "k", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "abs", "gsumkbn", "N", "x", "stride", "sum", "ix", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "gsumkbn", "N", "x", "stride", "offset", "sum", "ix", "t", "c", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "gsumkbn", "gsum", "N", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "gsumkbn", "gsum", "N", "x", "stride", "offset", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "abs", "gsumkbn2", "N", "x", "stride", "sum", "ccs", "ix", "cs", "cc", "v", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "abs", "gsumkbn2", "N", "x", "stride", "offset", "sum", "ccs", "ix", "cs", "cc", "v", "t", "c", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_main", "__commonJSMin", "exports", "module", "M", "gsumors", "N", "x", "stride", "ix", "m", "s", "i", "require_ndarray", "__commonJSMin", "exports", "module", "M", "gsumors", "N", "x", "stride", "offset", "ix", "m", "s", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "BLOCKSIZE", "gsumpw", "N", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_main", "__commonJSMin", "exports", "module", "sum", "gsumpw", "N", "x", "stride", "ix", "s", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "require_sapx", "__commonJSMin", "exports", "module", "M", "sapx", "N", "alpha", "x", "stride", "ix", "i", "m", "require_ndarray", "__commonJSMin", "exports", "module", "M", "sapx", "N", "alpha", "x", "stride", "offset", "ix", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sapx", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sapx", "tmp", "require_sapxsumkbn", "__commonJSMin", "exports", "module", "float64ToFloat32", "abs", "sapxsumkbn", "N", "alpha", "x", "stride", "sum", "ix", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "abs", "sapxsumkbn", "N", "alpha", "x", "stride", "offset", "sum", "ix", "v", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sapxsumkbn", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sapxsumkbn", "tmp", "require_sapxsum", "__commonJSMin", "exports", "module", "sapxsumkbn", "sapxsum", "N", "alpha", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "sapxsumkbn", "sapxsum", "N", "alpha", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sapxsum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sapxsum", "tmp", "require_sapxsumkbn2", "__commonJSMin", "exports", "module", "float64ToFloat32", "abs", "sapxsumkbn2", "N", "alpha", "x", "stride", "sum", "ccs", "ix", "cs", "cc", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "abs", "sapxsumkbn2", "N", "alpha", "x", "stride", "offset", "sum", "ccs", "ix", "cs", "cc", "v", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sapxsumkbn2", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sapxsumkbn2", "tmp", "require_sapxsumors", "__commonJSMin", "exports", "module", "float64ToFloat32", "sapxsumors", "N", "alpha", "x", "stride", "sum", "ix", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "sapxsumors", "N", "alpha", "x", "stride", "offset", "sum", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sapxsumors", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sapxsumors", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "floor", "BLOCKSIZE", "sapxsumpw", "N", "alpha", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_sapxsumpw", "__commonJSMin", "exports", "module", "float64ToFloat32", "sum", "sapxsumpw", "N", "alpha", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sapxsumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sapxsumpw", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "floor", "abs", "BLOCKSIZE", "sasumpw", "N", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_sasumpw", "__commonJSMin", "exports", "module", "float64ToFloat32", "abs", "sum", "sasumpw", "N", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sasumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sasumpw", "tmp", "require_scusumkbn", "__commonJSMin", "exports", "module", "float64ToFloat32", "abs", "scusumkbn", "N", "sum", "x", "strideX", "y", "strideY", "ix", "iy", "s", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "abs", "scusumkbn", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "s", "v", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "scusumkbn", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "scusumkbn", "tmp", "require_scusum", "__commonJSMin", "exports", "module", "scusumkbn", "scusum", "N", "sum", "x", "strideX", "y", "strideY", "require_ndarray", "__commonJSMin", "exports", "module", "scusumkbn", "scusum", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "scusum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "scusum", "tmp", "require_scusumkbn2", "__commonJSMin", "exports", "module", "float64ToFloat32", "abs", "scusumkbn2", "N", "sum", "x", "strideX", "y", "strideY", "ccs", "ix", "iy", "cs", "cc", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "abs", "scusumkbn2", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ccs", "ix", "iy", "cs", "cc", "v", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "scusumkbn2", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "scusumkbn2", "tmp", "require_scusumors", "__commonJSMin", "exports", "module", "float64ToFloat32", "scusumors", "N", "sum", "x", "strideX", "y", "strideY", "ix", "iy", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "scusumors", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "scusumors", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "scusumors", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "floor", "BLOCKSIZE", "scusumpw", "N", "sum", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "s", "n", "i", "require_scusumpw", "__commonJSMin", "exports", "module", "cusum", "scusumpw", "N", "sum", "x", "strideX", "y", "strideY", "ix", "iy", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "scusumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "scusumpw", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "floor", "BLOCKSIZE", "sdsapxsumpw", "N", "alpha", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_sdsapxsumpw", "__commonJSMin", "exports", "module", "float64ToFloat32", "sum", "sdsapxsumpw", "N", "alpha", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sdsapxsumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sdsapxsumpw", "tmp", "require_sdsapxsum", "__commonJSMin", "exports", "module", "sdsapxsumpw", "sdsapxsum", "N", "alpha", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "sdsapxsumpw", "sdsapxsum", "N", "alpha", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sdsapxsum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sdsapxsum", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "isnanf", "floor", "BLOCKSIZE", "sdsnansumpw", "N", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_sdsnansumpw", "__commonJSMin", "exports", "module", "float64ToFloat32", "isnanf", "sum", "sdsnansumpw", "N", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sdsnansumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sdsnansumpw", "tmp", "require_sdsnansum", "__commonJSMin", "exports", "module", "sdsnansumpw", "sdsnansum", "N", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "sdsnansumpw", "sdsnansum", "N", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sdsnansum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sdsnansum", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "floor", "BLOCKSIZE", "sdssumpw", "N", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_sdssumpw", "__commonJSMin", "exports", "module", "float64ToFloat32", "sum", "sdssumpw", "N", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sdssumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sdssumpw", "tmp", "require_sdssum", "__commonJSMin", "exports", "module", "sdssumpw", "sdssum", "N", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "sdssumpw", "sdssum", "N", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sdssum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sdssum", "tmp", "require_sfill", "__commonJSMin", "exports", "module", "M", "sfill", "N", "alpha", "x", "stride", "ix", "i", "m", "require_ndarray", "__commonJSMin", "exports", "module", "M", "sfill", "N", "alpha", "x", "stride", "offset", "ix", "m", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "sfill", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "sfill", "tmp", "require_snansumkbn", "__commonJSMin", "exports", "module", "float64ToFloat32", "isnanf", "abs", "snansumkbn", "N", "x", "stride", "sum", "ix", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "isnanf", "abs", "snansumkbn", "N", "x", "stride", "offset", "sum", "ix", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "snansumkbn", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "snansumkbn", "tmp", "require_snansum", "__commonJSMin", "exports", "module", "snansumkbn", "snansum", "N", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "snansumkbn", "snansum", "N", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "snansum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "snansum", "tmp", "require_snansumkbn2", "__commonJSMin", "exports", "module", "float64ToFloat32", "isnanf", "abs", "snansumkbn2", "N", "x", "stride", "sum", "ccs", "ix", "cs", "cc", "v", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "isnanf", "abs", "snansumkbn2", "N", "x", "stride", "offset", "sum", "ccs", "ix", "cs", "cc", "v", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "snansumkbn2", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "snansumkbn2", "tmp", "require_snansumors", "__commonJSMin", "exports", "module", "float64ToFloat32", "isnanf", "snansumors", "N", "x", "stride", "sum", "ix", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "isnanf", "snansumors", "N", "x", "stride", "offset", "sum", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "snansumors", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "snansumors", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "isnanf", "floor", "BLOCKSIZE", "snansumpw", "N", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_snansumpw", "__commonJSMin", "exports", "module", "float64ToFloat32", "isnanf", "sum", "snansumpw", "N", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "snansumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "snansumpw", "tmp", "require_srev", "__commonJSMin", "exports", "module", "floor", "M", "srev", "N", "x", "stride", "tmp", "ix", "iy", "m", "n", "i", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "M", "srev", "N", "x", "stride", "offset", "tmp", "ix", "iy", "m", "n", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "srev", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "srev", "tmp", "require_ssort2hp", "__commonJSMin", "exports", "module", "isPositiveZerof", "isnanf", "floor", "ssort2hp", "N", "order", "x", "strideX", "y", "strideY", "offsetX", "offsetY", "parent", "child", "v1", "v2", "tx", "ty", "ix", "iy", "n", "j", "k", "require_ndarray", "__commonJSMin", "exports", "module", "isPositiveZerof", "isnanf", "floor", "ssort2hp", "N", "order", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "parent", "child", "v1", "v2", "tx", "ty", "ix", "iy", "n", "j", "k", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "ssort2hp", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "ssort2hp", "tmp", "require_ssort2ins", "__commonJSMin", "exports", "module", "isNegativeZerof", "isnanf", "ssort2ins", "N", "order", "x", "strideX", "y", "strideY", "flg", "ix", "jx", "fx", "lx", "iy", "jy", "fy", "ly", "vx", "vy", "ux", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isNegativeZerof", "isnanf", "ssort2ins", "N", "order", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "flg", "ix", "jx", "fx", "lx", "iy", "jy", "fy", "ly", "vx", "vy", "ux", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "ssort2ins", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "ssort2ins", "tmp", "require_gaps", "__commonJSMin", "exports", "module", "require_ssort2sh", "__commonJSMin", "exports", "module", "isNegativeZerof", "isnanf", "GAPS", "NGAPS", "ssort2sh", "N", "order", "x", "strideX", "y", "strideY", "offsetX", "offsetY", "flg", "gap", "vx", "vy", "ux", "i", "j", "k", "require_ndarray", "__commonJSMin", "exports", "module", "isNegativeZerof", "isnanf", "GAPS", "NGAPS", "ssort2sh", "N", "order", "x", "strideX", "offsetX", "y", "strideY", "offsetY", "flg", "gap", "vx", "vy", "ux", "i", "j", "k", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "ssort2sh", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "ssort2sh", "tmp", "require_ssorthp", "__commonJSMin", "exports", "module", "isPositiveZerof", "isnanf", "floor", "ssorthp", "N", "order", "x", "stride", "offset", "parent", "child", "v1", "v2", "n", "t", "i", "j", "k", "require_ndarray", "__commonJSMin", "exports", "module", "isPositiveZerof", "isnanf", "floor", "ssorthp", "N", "order", "x", "stride", "offset", "parent", "child", "v1", "v2", "n", "t", "i", "j", "k", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "ssorthp", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "ssorthp", "tmp", "require_ssortins", "__commonJSMin", "exports", "module", "isNegativeZerof", "isnanf", "ssortins", "N", "order", "x", "stride", "flg", "ix", "jx", "fx", "lx", "v", "u", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isNegativeZerof", "isnanf", "ssortins", "N", "order", "x", "stride", "offset", "flg", "ix", "jx", "fx", "lx", "v", "u", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "ssortins", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "ssortins", "tmp", "require_gaps", "__commonJSMin", "exports", "module", "require_ssortsh", "__commonJSMin", "exports", "module", "isNegativeZerof", "isnanf", "GAPS", "NGAPS", "ssortsh", "N", "order", "x", "stride", "offset", "flg", "gap", "v", "u", "i", "j", "k", "require_ndarray", "__commonJSMin", "exports", "module", "isNegativeZerof", "isnanf", "GAPS", "NGAPS", "ssortsh", "N", "order", "x", "stride", "offset", "flg", "gap", "v", "u", "i", "j", "k", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "ssortsh", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "ssortsh", "tmp", "require_ssumkbn", "__commonJSMin", "exports", "module", "float64ToFloat32", "abs", "ssumkbn", "N", "x", "stride", "sum", "ix", "v", "t", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "abs", "ssumkbn", "N", "x", "stride", "offset", "sum", "ix", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "ssumkbn", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "ssumkbn", "tmp", "require_ssum", "__commonJSMin", "exports", "module", "ssumkbn", "ssum", "N", "x", "stride", "require_ndarray", "__commonJSMin", "exports", "module", "ssumkbn", "ssum", "N", "x", "stride", "offset", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "ssum", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "ssum", "tmp", "require_ssumkbn2", "__commonJSMin", "exports", "module", "float64ToFloat32", "abs", "ssumkbn2", "N", "x", "stride", "sum", "ccs", "ix", "cs", "cc", "v", "c", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "abs", "ssumkbn2", "N", "x", "stride", "offset", "sum", "ccs", "ix", "cs", "cc", "v", "t", "c", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "ssumkbn2", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "ssumkbn2", "tmp", "require_ssumors", "__commonJSMin", "exports", "module", "float64ToFloat32", "ssumors", "N", "x", "stride", "sum", "ix", "i", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "ssumors", "N", "x", "stride", "offset", "sum", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "ssumors", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "ssumors", "tmp", "require_ndarray", "__commonJSMin", "exports", "module", "float64ToFloat32", "floor", "BLOCKSIZE", "ssumpw", "N", "x", "stride", "offset", "ix", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "M", "s", "n", "i", "require_ssumpw", "__commonJSMin", "exports", "module", "float64ToFloat32", "sum", "ssumpw", "N", "x", "stride", "ix", "s", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "ssumpw", "ndarray", "require_lib", "__commonJSMin", "exports", "module", "join", "tryRequire", "isError", "main", "ssumpw", "tmp", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "ns", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "ns", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isCollection", "isFloat64Array", "isFloat32Array", "format", "ddot", "sdot", "dot", "gdot", "x", "y", "isxf64", "isxf32", "isyf64", "isyf32", "isxa", "isxv", "isya", "isyv", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isCollection", "isFloat64Array", "isFloat32Array", "format", "dswap", "sswap", "swap", "gswap", "x", "y", "isxf64", "isxf32", "isyf64", "isyf32", "isxa", "isxv", "isya", "isyv", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isFloat32VectorLike", "dot", "format", "sdot", "x", "y", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isFloat32VectorLike", "format", "swap", "sswap", "x", "y", "require_lib", "__commonJSMin", "exports", "module", "main", "setReadOnly", "ns"] +} diff --git a/ext/base/gfill-by/docs/types/index.d.ts b/ext/base/gfill-by/docs/types/index.d.ts index 97bf4fb1b..24752f35c 100644 --- a/ext/base/gfill-by/docs/types/index.d.ts +++ b/ext/base/gfill-by/docs/types/index.d.ts @@ -20,14 +20,14 @@ /// -import { Collection } from '@stdlib/types/object'; +import { Collection } from '@stdlib/types/array'; /** * Returns a fill value. * * @returns fill value */ -type Nullary = () => any; +type Nullary = () => U; /** * Returns a fill value. @@ -35,7 +35,7 @@ type Nullary = () => any; * @param value - array element * @returns fill value */ -type Unary = ( value: any ) => any; +type Unary = ( value: T ) => U; /** * Returns a fill value. @@ -44,7 +44,7 @@ type Unary = ( value: any ) => any; * @param aidx - array index * @returns fill value */ -type Binary = ( value: any, aidx: number ) => any; +type Binary = ( value: T, aidx: number ) => U; /** * Returns a fill value. @@ -54,7 +54,7 @@ type Binary = ( value: any, aidx: number ) => any; * @param sidx - strided index (offset + aidx*stride) * @returns fill value */ -type Ternary = ( value: any, aidx: number, sidx: number ) => any; +type Ternary = ( value: T, aidx: number, sidx: number ) => U; /** * Returns a fill value. @@ -65,7 +65,7 @@ type Ternary = ( value: any, aidx: number, sidx: number ) => any; * @param array - input array * @returns fill value */ -type Quaternary = ( value: any, aidx: number, sidx: number, array: Collection ) => any; // tslint-disable-line max-line-length +type Quaternary = ( value: T, aidx: number, sidx: number, array: Collection ) => U; /** * Returns a fill value. @@ -76,7 +76,7 @@ type Quaternary = ( value: any, aidx: number, sidx: number, array: Collection ) * @param array - input array * @returns fill value */ -type Callback = Nullary | Unary | Binary | Ternary | Quaternary; +type Callback = Nullary | Unary | Binary | Ternary | Quaternary; /** * Interface describing `gfillBy`. @@ -113,7 +113,7 @@ interface Routine { * gfillBy( x.length, x, 1, fill ); * // x => [ 5.0, 5.0, 5.0, 0.0, 5.0, 5.0, 5.0, 5.0 ] */ - ( N: number, x: Collection, stride: number, clbk: Callback, thisArg?: any ): Collection; // tslint:disable-line:max-line-length + ( N: number, x: Collection, stride: number, clbk: Callback, thisArg?: ThisParameterType> ): Collection; /** * Fills a strided array according to a provided callback function and using alternative indexing semantics. @@ -147,7 +147,7 @@ interface Routine { * gfillBy.ndarray( x.length, x, 1, 0, fill ); * // x => [ 5.0, 5.0, 5.0, 0.0, 5.0, 5.0, 5.0, 5.0 ] */ - ndarray( N: number, x: Collection, stride: number, offset: number, clbk: Callback, thisArg?: any ): Collection; // tslint:disable-line:max-line-length + ndarray( N: number, x: Collection, stride: number, offset: number, clbk: Callback, thisArg?: ThisParameterType> ): Collection; } /** diff --git a/ext/base/gfill-by/docs/types/test.ts b/ext/base/gfill-by/docs/types/test.ts index 3a6117814..316f22747 100644 --- a/ext/base/gfill-by/docs/types/test.ts +++ b/ext/base/gfill-by/docs/types/test.ts @@ -29,8 +29,8 @@ const fill = (): number => { { const x = new Float64Array( 10 ); - gfillBy( x.length, x, 1, fill ); // $ExpectType Collection - gfillBy( x.length, x, 1, fill, {} ); // $ExpectType Collection + gfillBy( x.length, x, 1, fill ); // $ExpectType Collection + gfillBy( x.length, x, 1, fill, {} ); // $ExpectType Collection } // The compiler throws an error if the function is provided a first argument which is not a number... @@ -101,8 +101,8 @@ const fill = (): number => { { const x = new Float64Array( 10 ); - gfillBy.ndarray( x.length, x, 1, 0, fill ); // $ExpectType Collection - gfillBy.ndarray( x.length, x, 1, 0, fill, {} ); // $ExpectType Collection + gfillBy.ndarray( x.length, x, 1, 0, fill ); // $ExpectType Collection + gfillBy.ndarray( x.length, x, 1, 0, fill, {} ); // $ExpectType Collection } // The compiler throws an error if the `ndarray` method is provided a first argument which is not a number... diff --git a/ext/base/gfill/docs/types/index.d.ts b/ext/base/gfill/docs/types/index.d.ts index ee871196d..3892df47d 100644 --- a/ext/base/gfill/docs/types/index.d.ts +++ b/ext/base/gfill/docs/types/index.d.ts @@ -20,7 +20,7 @@ /// -import { Collection } from '@stdlib/types/object'; +import { Collection } from '@stdlib/types/array'; /** * Interface describing `gfill`. @@ -41,7 +41,7 @@ interface Routine { * gfill( x.length, 5.0, x, 1 ); * // x => [ 5.0, 5.0, 5.0, 0.0, 5.0, 5.0, 5.0, 5.0 ] */ - ( N: number, alpha: any, x: Collection, stride: number ): Collection; + ( N: number, alpha: T, x: Collection, stride: number ): Collection; /** * Fills a strided array with a specified scalar value using alternative indexing semantics. @@ -59,7 +59,7 @@ interface Routine { * gfill.ndarray( x.length, 5.0, x, 1, 0 ); * // x => [ 5.0, 5.0, 5.0, 0.0, 5.0, 5.0, 5.0, 5.0 ] */ - ndarray( N: number, alpha: any, x: Collection, stride: number, offset: number ): Collection; // tslint:disable-line:max-line-length + ndarray( N: number, alpha: T, x: Collection, stride: number, offset: number ): Collection; } /** diff --git a/ext/base/gfill/docs/types/test.ts b/ext/base/gfill/docs/types/test.ts index f7fe1115f..49e6f8919 100644 --- a/ext/base/gfill/docs/types/test.ts +++ b/ext/base/gfill/docs/types/test.ts @@ -25,7 +25,7 @@ import gfill = require( './index' ); { const x = new Float64Array( 10 ); - gfill( x.length, 5.0, x, 1 ); // $ExpectType Collection + gfill( x.length, 5.0, x, 1 ); // $ExpectType Collection } // The compiler throws an error if the function is provided a first argument which is not a number... @@ -83,7 +83,7 @@ import gfill = require( './index' ); { const x = new Float64Array( 10 ); - gfill.ndarray( x.length, 5.0, x, 1, 0 ); // $ExpectType Collection + gfill.ndarray( x.length, 5.0, x, 1, 0 ); // $ExpectType Collection } // The compiler throws an error if the `ndarray` method is provided a first argument which is not a number... diff --git a/ext/base/grev/docs/types/index.d.ts b/ext/base/grev/docs/types/index.d.ts index f1c1ca43a..159e8df11 100644 --- a/ext/base/grev/docs/types/index.d.ts +++ b/ext/base/grev/docs/types/index.d.ts @@ -20,7 +20,7 @@ /// -import { Collection } from '@stdlib/types/object'; +import { Collection } from '@stdlib/types/array'; /** * Interface describing `grev`. @@ -40,7 +40,7 @@ interface Routine { * grev( x.length, x, 1 ); * // x => [ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.0 ] */ - ( N: number, x: Collection, stride: number ): Collection; + ( N: number, x: Collection, stride: number ): Collection; /** * Reverses a strided array in-place. using alternative indexing semantics. @@ -57,7 +57,7 @@ interface Routine { * grev.ndarray( x.length, x, 1, 0 ); * // x => [ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.0 ] */ - ndarray( N: number, x: Collection, stride: number, offset: number ): Collection; // tslint:disable-line:max-line-length + ndarray( N: number, x: Collection, stride: number, offset: number ): Collection; } /** diff --git a/ext/base/grev/docs/types/test.ts b/ext/base/grev/docs/types/test.ts index 96c53162b..4fe3703c1 100644 --- a/ext/base/grev/docs/types/test.ts +++ b/ext/base/grev/docs/types/test.ts @@ -25,7 +25,7 @@ import grev = require( './index' ); { const x = new Float64Array( 10 ); - grev( x.length, x, 1 ); // $ExpectType Collection + grev( x.length, x, 1 ); // $ExpectType Collection } // The compiler throws an error if the function is provided a first argument which is not a number... @@ -82,7 +82,7 @@ import grev = require( './index' ); { const x = new Float64Array( 10 ); - grev.ndarray( x.length, x, 1, 0 ); // $ExpectType Collection + grev.ndarray( x.length, x, 1, 0 ); // $ExpectType Collection } // The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...