diff --git a/base/lib/index.js b/base/lib/index.js index 648b3d737..d0ea33c57 100644 --- a/base/lib/index.js +++ b/base/lib/index.js @@ -99,6 +99,15 @@ setReadOnly( blas, 'ddot', require( './../../base/ddot' ) ); */ setReadOnly( blas, 'dnrm2', require( './../../base/dnrm2' ) ); +/** +* @name drotg +* @memberof blas +* @readonly +* @type {Function} +* @see {@link module:@stdlib/blas/base/drotg} +*/ +setReadOnly( blas, 'drotg', require( './../../base/drotg' ) ); + /** * @name dscal * @memberof blas diff --git a/dist/index.js b/dist/index.js index 88e165cd1..fe7316efa 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,1086 +1,1092 @@ -"use strict";var c=function(n,e){return function(){return e||n((e={exports:{}}).exports,e),e.exports}};var Un=c(function(hQ,Qn){ -var Jn=require('@stdlib/strided/base/reinterpret-complex64/dist');function sO(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=eo(1,n):v=eo(1,e),u=Y(s+o),u===0?(f=1,q=0,t=0,m=0):(t=Y(u*gM(Y(ro(Y(n/u))+ro(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}ao.exports=bM -});var io=c(function(TW,uo){ -var wM=require('@stdlib/array/float32/dist'),yM=Qa();function RM(n,e){var a=new wM(4);return yM(n,e,a,1,0)}uo.exports=RM -});var so=c(function(SW,vo){ -var kM=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),no=io(),_M=Qa();kM(no,"assign",_M);vo.exports=no -});var oo=c(function(ZW,to){ -var Ua=5;function EM(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=Yo(v)?o+=r-s+v:o+=v-s+r,r=s,u+=i;return r+o}Xo.exports=r7 -});var ef=c(function(hW,rf){ -var No=require('@stdlib/math/base/special/abs/dist');function e7(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=No(s)?t+=u-o+s:t+=s-o+u,u=o,v+=i;return u+t}rf.exports=e7 -});var nf=c(function(YW,uf){ -var a7=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),af=xo(),u7=ef();a7(af,"ndarray",u7);uf.exports=af -});var Vr=c(function(XW,sf){ -var i7=require("path").join,n7=require('@stdlib/utils/try-require/dist'),v7=require('@stdlib/assert/is-error/dist'),s7=nf(),Na,vf=n7(i7(__dirname,"./native.js"));v7(vf)?Na=s7:Na=vf;sf.exports=Na -});var of=c(function(dW,tf){ -var t7=Vr();function o7(n,e,a,i){return t7(n,e,a,i)}tf.exports=o7 -});var qf=c(function(xW,ff){ -var f7=Vr().ndarray;function q7(n,e,a,i,r){return f7(n,e,a,i,r)}ff.exports=q7 -});var lf=c(function(NW,mf){ -var c7=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),cf=of(),m7=qf();c7(cf,"ndarray",m7);mf.exports=cf -});var gf=c(function(r9,jf){ -var l7=require("path").join,p7=require('@stdlib/utils/try-require/dist'),j7=require('@stdlib/assert/is-error/dist'),g7=lf(),ru,pf=p7(l7(__dirname,"./native.js"));j7(pf)?ru=g7:ru=pf;jf.exports=ru -});var wf=c(function(e9,bf){ -var zr=require('@stdlib/math/base/special/abs/dist');function b7(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=zr(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,zr(s)>=zr(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=i;return r+s+u}bf.exports=b7 -});var Rf=c(function(a9,yf){ -var Dr=require('@stdlib/math/base/special/abs/dist');function w7(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=Dr(f)?m=u-q+f:m=f-q+u,u=q,q=o+m,Dr(o)>=Dr(m)?t=o-q+m:t=m-q+o,o=q,v+=t,s+=i;return u+o+v}yf.exports=w7 -});var Ef=c(function(u9,_f){ -var y7=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),kf=wf(),R7=Rf();y7(kf,"ndarray",R7);_f.exports=kf -});var Mf=c(function(i9,Ff){ -var k7=require("path").join,_7=require('@stdlib/utils/try-require/dist'),E7=require('@stdlib/assert/is-error/dist'),O7=Ef(),eu,Of=_7(k7(__dirname,"./native.js"));E7(Of)?eu=O7:eu=Of;Ff.exports=eu -});var Sf=c(function(n9,Tf){ -function F7(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=uq(t)?q+=o-f+t:q+=t-f+o,o=f,r[s]=o+q,v+=i,s+=u;return r}iq.exports=rT -});var tq=c(function(b9,sq){ -var vq=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;if(n<=0)return u;for(o=r,t=s,f=e,p=0,l=0;l=vq(q)?p+=f-m+q:p+=q-m+f,f=m,u[t]=f+p,o+=i,t+=v;return u}sq.exports=eT -});var qq=c(function(w9,fq){ -var aT=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),oq=nq(),uT=tq();aT(oq,"ndarray",uT);fq.exports=oq -});var Hr=c(function(y9,mq){ -var iT=require("path").join,nT=require('@stdlib/utils/try-require/dist'),vT=require('@stdlib/assert/is-error/dist'),sT=qq(),ou,cq=nT(iT(__dirname,"./native.js"));vT(cq)?ou=sT:ou=cq;mq.exports=ou -});var pq=c(function(R9,lq){ -var tT=Hr();function oT(n,e,a,i,r,u){return tT(n,e,a,i,r,u)}lq.exports=oT -});var gq=c(function(k9,jq){ -var fT=Hr().ndarray;function qT(n,e,a,i,r,u,v,s){return fT(n,e,a,i,r,u,v,s)}jq.exports=qT -});var yq=c(function(_9,wq){ -var cT=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),bq=pq(),mT=gq();cT(bq,"ndarray",mT);wq.exports=bq -});var _q=c(function(E9,kq){ -var lT=require("path").join,pT=require('@stdlib/utils/try-require/dist'),jT=require('@stdlib/assert/is-error/dist'),gT=yq(),fu,Rq=pT(lT(__dirname,"./native.js"));jT(Rq)?fu=gT:fu=Rq;kq.exports=fu -});var Oq=c(function(O9,Eq){ -var Jr=require('@stdlib/math/base/special/abs/dist');function bT(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=Jr(q)?p=e-m+q:p=q-m+e,e=m,m=t+p,Jr(t)>=Jr(p)?f=t-m+p:f=p-m+t,t=m,v+=f,r[o]=e+t+v,s+=i,o+=u;return r}Eq.exports=bT -});var Mq=c(function(F9,Fq){ -var Qr=require('@stdlib/math/base/special/abs/dist');function wT(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=Qr(p)?j=e-l+p:j=p-l+e,e=l,l=q+j,Qr(q)>=Qr(j)?m=q-l+j:m=j-l+q,q=l,o+=m,u[f]=e+q+o,t+=i,f+=v;return u}Fq.exports=wT -});var Zq=c(function(M9,Sq){ -var yT=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Tq=Oq(),RT=Mq();yT(Tq,"ndarray",RT);Sq.exports=Tq -});var Lq=c(function(T9,Aq){ -var kT=require("path").join,_T=require('@stdlib/utils/try-require/dist'),ET=require('@stdlib/assert/is-error/dist'),OT=Zq(),qu,Pq=_T(kT(__dirname,"./native.js"));ET(Pq)?qu=OT:qu=Pq;Aq.exports=qu -});var Cq=c(function(S9,Bq){ -function FT(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=Lc(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}Bc.exports=jS -});var Vc=c(function(X9,Kc){ -var Gc=require('@stdlib/math/base/assert/is-nan/dist'),Ic=require('@stdlib/math/base/special/abs/dist');function gS(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 Gc(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=Ic(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}Kc.exports=gS -});var Hc=c(function(d9,Dc){ -var bS=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),zc=Cc(),wS=Vc();bS(zc,"ndarray",wS);Dc.exports=zc -});var $r=c(function(x9,Qc){ -var yS=require("path").join,RS=require('@stdlib/utils/try-require/dist'),kS=require('@stdlib/assert/is-error/dist'),_S=Hc(),yu,Jc=RS(yS(__dirname,"./native.js"));kS(Jc)?yu=_S:yu=Jc;Qc.exports=yu -});var Wc=c(function(N9,Uc){ -var ES=$r();function OS(n,e,a,i,r){return ES(n,e,a,i,r)}Uc.exports=OS -});var hc=c(function(r$,$c){ -var FS=$r().ndarray;function MS(n,e,a,i,r,u,v){return FS(n,e,a,i,r,u,v)}$c.exports=MS -});var dc=c(function(e$,Xc){ -var TS=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Yc=Wc(),SS=hc();TS(Yc,"ndarray",SS);Xc.exports=Yc -});var rm=c(function(a$,Nc){ -var ZS=require("path").join,PS=require('@stdlib/utils/try-require/dist'),AS=require('@stdlib/assert/is-error/dist'),LS=dc(),Ru,xc=PS(ZS(__dirname,"./native.js"));AS(xc)?Ru=LS:Ru=xc;Nc.exports=Ru -});var um=c(function(u$,am){ -var em=require('@stdlib/math/base/assert/is-nan/dist'),hr=require('@stdlib/math/base/special/abs/dist');function BS(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 em(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=hr(q)?p=u-m+q:p=q-m+u,u=m,m=s+p,hr(s)>=hr(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}am.exports=BS -});var vm=c(function(i$,nm){ -var im=require('@stdlib/math/base/assert/is-nan/dist'),Yr=require('@stdlib/math/base/special/abs/dist');function CS(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 im(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=Yr(p)?j=s-l+p:j=p-l+s,s=l,l=t+j,Yr(t)>=Yr(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}nm.exports=CS -});var om=c(function(n$,tm){ -var GS=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),sm=um(),IS=vm();GS(sm,"ndarray",IS);tm.exports=sm -});var cm=c(function(v$,qm){ -var KS=require("path").join,VS=require('@stdlib/utils/try-require/dist'),zS=require('@stdlib/assert/is-error/dist'),DS=om(),ku,fm=VS(KS(__dirname,"./native.js"));zS(fm)?ku=DS:ku=fm;qm.exports=ku -});var pm=c(function(s$,lm){ -var mm=require('@stdlib/math/base/assert/is-nan/dist');function HS(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 mm(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=Im(u)?s+=i-v+u:s+=u-v+i,i=v),r+=a;return i+s}Km.exports=oZ -});var Jm=c(function(g$,Hm){ -var zm=require('@stdlib/math/base/assert/is-nan/dist'),Dm=require('@stdlib/math/base/special/abs/dist');function fZ(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return zm(e[i])?0:e[i];for(u=i,r=0,o=0,t=0;t=Dm(v)?o+=r-s+v:o+=v-s+r,r=s),u+=a;return r+o}Hm.exports=fZ -});var Wm=c(function(b$,Um){ -var qZ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Qm=Vm(),cZ=Jm();qZ(Qm,"ndarray",cZ);Um.exports=Qm -});var Xr=c(function(w$,hm){ -var mZ=require("path").join,lZ=require('@stdlib/utils/try-require/dist'),pZ=require('@stdlib/assert/is-error/dist'),jZ=Wm(),Mu,$m=lZ(mZ(__dirname,"./native.js"));pZ($m)?Mu=jZ:Mu=$m;hm.exports=Mu -});var Xm=c(function(y$,Ym){ -var gZ=Xr();function bZ(n,e,a){return gZ(n,e,a)}Ym.exports=bZ -});var xm=c(function(R$,dm){ -var wZ=Xr().ndarray;function yZ(n,e,a,i){return wZ(n,e,a,i)}dm.exports=yZ -});var e1=c(function(k$,r1){ -var RZ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Nm=Xm(),kZ=xm();RZ(Nm,"ndarray",kZ);r1.exports=Nm -});var i1=c(function(_$,u1){ -var _Z=require("path").join,EZ=require('@stdlib/utils/try-require/dist'),OZ=require('@stdlib/assert/is-error/dist'),FZ=e1(),Tu,a1=EZ(_Z(__dirname,"./native.js"));OZ(a1)?Tu=FZ:Tu=a1;u1.exports=Tu -});var s1=c(function(E$,v1){ -var n1=require('@stdlib/math/base/assert/is-nan/dist'),dr=require('@stdlib/math/base/special/abs/dist');function MZ(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return n1(e[0])?0:e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=dr(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,dr(v)>=dr(f)?s=v-t+f:s=f-t+v,v=t,r+=s),u+=a;return i+v+r}v1.exports=MZ -});var f1=c(function(O$,o1){ -var t1=require('@stdlib/math/base/assert/is-nan/dist'),xr=require('@stdlib/math/base/special/abs/dist');function TZ(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 t1(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}o1.exports=TZ -});var m1=c(function(F$,c1){ -var SZ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),q1=s1(),ZZ=f1();SZ(q1,"ndarray",ZZ);c1.exports=q1 -});var j1=c(function(M$,p1){ -var PZ=require("path").join,AZ=require('@stdlib/utils/try-require/dist'),LZ=require('@stdlib/assert/is-error/dist'),BZ=m1(),Su,l1=AZ(PZ(__dirname,"./native.js"));LZ(l1)?Su=BZ:Su=l1;p1.exports=Su -});var w1=c(function(T$,b1){ -var g1=require('@stdlib/math/base/assert/is-nan/dist');function CZ(n,e,a){var i,r,u;if(i=0,n<=0)return i;if(n===1||a===0)return g1(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||up(f)||f===q&&ap(f))&&(t+=1)),f=a[v+t*i],f>m||up(f)||f===m&&ap(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}}ip.exports=cA -});var op=c(function(qh,tp){ -var vp=require('@stdlib/math/base/assert/is-positive-zero/dist'),sp=require('@stdlib/math/base/assert/is-nan/dist'),mA=require('@stdlib/math/base/special/floor/dist');function lA(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=mA(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||sp(f)||f===q&&vp(f))&&(t+=1)),f=a[r+t*i],f>m||sp(f)||f===m&&vp(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}}tp.exports=lA -});var cp=c(function(ch,qp){ -var pA=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),fp=np(),jA=op();pA(fp,"ndarray",jA);qp.exports=fp -});var pp=c(function(mh,lp){ -var gA=require("path").join,bA=require('@stdlib/utils/try-require/dist'),wA=require('@stdlib/assert/is-error/dist'),yA=cp(),Uu,mp=bA(gA(__dirname,"./native.js"));wA(mp)?Uu=yA:Uu=mp;lp.exports=Uu -});var bp=c(function(lh,gp){ -var ae=require('@stdlib/math/base/assert/is-negative-zero/dist'),jp=require('@stdlib/math/base/assert/is-nan/dist');function RA(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=ae(j),o=s-i,m=q-u;o<=t&&(b=a[o],!(b<=j&&!(v&&b===j&&ae(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&&ae(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}gp.exports=RA -});var Rp=c(function(ph,yp){ -var ue=require('@stdlib/math/base/assert/is-negative-zero/dist'),wp=require('@stdlib/math/base/assert/is-nan/dist');function kA(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=ue(b),f=t-i,l=p-v;f<=q&&(_=a[f],!(_<=b&&!(o&&_===b&&ue(_)===!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&&ue(_)===!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}yp.exports=kA -});var Ep=c(function(jh,_p){ -var _A=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),kp=bp(),EA=Rp();_A(kp,"ndarray",EA);_p.exports=kp -});var Mp=c(function(gh,Fp){ -var OA=require("path").join,FA=require('@stdlib/utils/try-require/dist'),MA=require('@stdlib/assert/is-error/dist'),TA=Ep(),Wu,Op=FA(OA(__dirname,"./native.js"));MA(Op)?Wu=TA:Wu=Op;Fp.exports=Wu -});var $u=c(function(bh,SA){SA.exports=[701,301,132,57,23,10,4,1]});var Zp=c(function(wh,Sp){ -var ZA=require('@stdlib/math/base/assert/is-negative-zero/dist'),PA=require('@stdlib/math/base/assert/is-nan/dist'),Tp=$u(),AA=Tp.length;function LA(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}Sp.exports=LA -});var Lp=c(function(yh,Ap){ -var BA=require('@stdlib/math/base/assert/is-negative-zero/dist'),CA=require('@stdlib/math/base/assert/is-nan/dist'),Pp=$u(),GA=Pp.length;function IA(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}Ap.exports=IA -});var Gp=c(function(Rh,Cp){ -var KA=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Bp=Zp(),VA=Lp();KA(Bp,"ndarray",VA);Cp.exports=Bp -});var Vp=c(function(kh,Kp){ -var zA=require("path").join,DA=require('@stdlib/utils/try-require/dist'),HA=require('@stdlib/assert/is-error/dist'),JA=Gp(),hu,Ip=DA(zA(__dirname,"./native.js"));HA(Ip)?hu=JA:hu=Ip;Kp.exports=hu -});var Jp=c(function(_h,Hp){ -var zp=require('@stdlib/math/base/assert/is-positive-zero/dist'),Dp=require('@stdlib/math/base/assert/is-nan/dist'),QA=require('@stdlib/math/base/special/floor/dist');function UA(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=QA(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||Dp(s)||s===o&&zp(s))&&(v+=1)),s=a[r+v*i],s>f||Dp(s)||s===f&&zp(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}Hp.exports=UA -});var $p=c(function(Eh,Wp){ -var Qp=require('@stdlib/math/base/assert/is-positive-zero/dist'),Up=require('@stdlib/math/base/assert/is-nan/dist'),WA=require('@stdlib/math/base/special/floor/dist');function $A(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=WA(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=$A -});var Xp=c(function(Oh,Yp){ -var hA=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),hp=Jp(),YA=$p();hA(hp,"ndarray",YA);Yp.exports=hp -});var Np=c(function(Fh,xp){ -var XA=require("path").join,dA=require('@stdlib/utils/try-require/dist'),xA=require('@stdlib/assert/is-error/dist'),NA=Xp(),Yu,dp=dA(XA(__dirname,"./native.js"));xA(dp)?Yu=NA:Yu=dp;xp.exports=Yu -});var a2=c(function(Mh,e2){ -var ie=require('@stdlib/math/base/assert/is-negative-zero/dist'),r2=require('@stdlib/math/base/assert/is-nan/dist');function rL(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=ie(t),v=u-i;v<=s&&(f=a[v],!(f<=t&&!(r&&f===t&&ie(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&&ie(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}e2.exports=rL -});var n2=c(function(Th,i2){ -var ne=require('@stdlib/math/base/assert/is-negative-zero/dist'),u2=require('@stdlib/math/base/assert/is-nan/dist');function eL(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=ne(f),s=v-i;s<=o&&(q=a[s],!(q<=f&&!(u&&q===f&&ne(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&&ne(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}i2.exports=eL -});var t2=c(function(Sh,s2){ -var aL=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),v2=a2(),uL=n2();aL(v2,"ndarray",uL);s2.exports=v2 -});var q2=c(function(Zh,f2){ -var iL=require("path").join,nL=require('@stdlib/utils/try-require/dist'),vL=require('@stdlib/assert/is-error/dist'),sL=t2(),Xu,o2=nL(iL(__dirname,"./native.js"));vL(o2)?Xu=sL:Xu=o2;f2.exports=Xu -});var du=c(function(Ph,tL){tL.exports=[701,301,132,57,23,10,4,1]});var l2=c(function(Ah,m2){ -var oL=require('@stdlib/math/base/assert/is-negative-zero/dist'),fL=require('@stdlib/math/base/assert/is-nan/dist'),c2=du(),qL=c2.length;function cL(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}m2.exports=cL -});var g2=c(function(Lh,j2){ -var mL=require('@stdlib/math/base/assert/is-negative-zero/dist'),lL=require('@stdlib/math/base/assert/is-nan/dist'),p2=du(),pL=p2.length;function jL(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}j2.exports=jL -});var y2=c(function(Bh,w2){ -var gL=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),b2=l2(),bL=g2();gL(b2,"ndarray",bL);w2.exports=b2 -});var _2=c(function(Ch,k2){ -var wL=require("path").join,yL=require('@stdlib/utils/try-require/dist'),RL=require('@stdlib/assert/is-error/dist'),kL=y2(),xu,R2=yL(wL(__dirname,"./native.js"));RL(R2)?xu=kL:xu=R2;k2.exports=xu -});var ri=c(function(Gh,E2){ -var _L=require('@stdlib/math/base/special/floor/dist'),EL=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=x2(u)?s+=i-v+u:s+=u-v+i,i=v,r+=a;return i+s}N2.exports=dL -});var uj=c(function(Yh,aj){ -var ej=require('@stdlib/math/base/special/abs/dist');function xL(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=ej(v)?o+=r-s+v:o+=v-s+r,r=s,u+=a;return r+o}aj.exports=xL -});var vj=c(function(Xh,nj){ -var NL=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),ij=rj(),rB=uj();NL(ij,"ndarray",rB);nj.exports=ij -});var te=c(function(dh,tj){ -var eB=require("path").join,aB=require('@stdlib/utils/try-require/dist'),uB=require('@stdlib/assert/is-error/dist'),iB=vj(),ni,sj=aB(eB(__dirname,"./native.js"));uB(sj)?ni=iB:ni=sj;tj.exports=ni -});var fj=c(function(xh,oj){ -var nB=te();function vB(n,e,a){return nB(n,e,a)}oj.exports=vB -});var cj=c(function(Nh,qj){ -var sB=te().ndarray;function tB(n,e,a,i){return sB(n,e,a,i)}qj.exports=tB -});var pj=c(function(rY,lj){ -var oB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),mj=fj(),fB=cj();oB(mj,"ndarray",fB);lj.exports=mj -});var bj=c(function(eY,gj){ -var qB=require("path").join,cB=require('@stdlib/utils/try-require/dist'),mB=require('@stdlib/assert/is-error/dist'),lB=pj(),vi,jj=cB(qB(__dirname,"./native.js"));mB(jj)?vi=lB:vi=jj;gj.exports=vi -});var yj=c(function(aY,wj){ -var oe=require('@stdlib/math/base/special/abs/dist');function pB(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=oe(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,oe(v)>=oe(f)?s=v-t+f:s=f-t+v,v=t,r+=s,u+=a;return i+v+r}wj.exports=pB -});var kj=c(function(uY,Rj){ -var fe=require('@stdlib/math/base/special/abs/dist');function jB(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=fe(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,fe(s)>=fe(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=a;return r+s+u}Rj.exports=jB -});var Oj=c(function(iY,Ej){ -var gB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),_j=yj(),bB=kj();gB(_j,"ndarray",bB);Ej.exports=_j -});var Tj=c(function(nY,Mj){ -var wB=require("path").join,yB=require('@stdlib/utils/try-require/dist'),RB=require('@stdlib/assert/is-error/dist'),kB=Oj(),si,Fj=yB(wB(__dirname,"./native.js"));RB(Fj)?si=kB:si=Fj;Mj.exports=si -});var Zj=c(function(vY,Sj){ -var ti=6;function _B(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=eg(v)?o+=r-s+v:o+=v-s+r,r=s,u+=i;return r+o}ag.exports=UB -});var vg=c(function(bY,ng){ -var ig=require('@stdlib/math/base/special/abs/dist');function WB(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=ig(s)?t+=u-o+s:t+=s-o+u,u=o,v+=i;return u+t}ng.exports=WB -});var me=c(function(wY,tg){ -var $B=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),sg=ug(),hB=vg();$B(sg,"ndarray",hB);tg.exports=sg -});var fg=c(function(yY,og){ -var YB=me();function XB(n,e,a,i){return YB(n,e,a,i)}og.exports=XB -});var cg=c(function(RY,qg){ -var dB=me().ndarray;function xB(n,e,a,i,r){return dB(n,e,a,i,r)}qg.exports=xB -});var pg=c(function(kY,lg){ -var NB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),mg=fg(),rC=cg();NB(mg,"ndarray",rC);lg.exports=mg -});var gg=c(function(_Y,jg){ -var le=require('@stdlib/math/base/special/abs/dist');function eC(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=le(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,le(s)>=le(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=i;return r+s+u}jg.exports=eC -});var wg=c(function(EY,bg){ -var pe=require('@stdlib/math/base/special/abs/dist');function aC(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=pe(f)?m=u-q+f:m=f-q+u,u=q,q=o+m,pe(o)>=pe(m)?t=o-q+m:t=m-q+o,o=q,v+=t,s+=i;return u+o+v}bg.exports=aC -});var kg=c(function(OY,Rg){ -var uC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),yg=gg(),iC=wg();uC(yg,"ndarray",iC);Rg.exports=yg -});var Eg=c(function(FY,_g){ -function nC(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=Jg(t)?q+=o-f+t:q+=t-f+o,o=f,r[s]=o+q,v+=i,s+=u;return r}Qg.exports=RC -});var hg=c(function(GY,$g){ -var Wg=require('@stdlib/math/base/special/abs/dist');function kC(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=Wg(q)?p+=f-m+q:p+=q-m+f,f=m,u[t]=f+p,o+=i,t+=v;return u}$g.exports=kC -});var je=c(function(IY,Xg){ -var _C=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Yg=Ug(),EC=hg();_C(Yg,"ndarray",EC);Xg.exports=Yg -});var xg=c(function(KY,dg){ -var OC=je();function FC(n,e,a,i,r,u){return OC(n,e,a,i,r,u)}dg.exports=FC -});var rb=c(function(VY,Ng){ -var MC=je().ndarray;function TC(n,e,a,i,r,u,v,s){return MC(n,e,a,i,r,u,v,s)}Ng.exports=TC -});var ub=c(function(zY,ab){ -var SC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),eb=xg(),ZC=rb();SC(eb,"ndarray",ZC);ab.exports=eb -});var nb=c(function(DY,ib){ -var ge=require('@stdlib/math/base/special/abs/dist');function PC(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=ge(q)?p=e-m+q:p=q-m+e,e=m,m=t+p,ge(t)>=ge(p)?f=t-m+p:f=p-m+t,t=m,v+=f,r[o]=e+t+v,s+=i,o+=u;return r}ib.exports=PC -});var sb=c(function(HY,vb){ -var be=require('@stdlib/math/base/special/abs/dist');function AC(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=be(p)?j=e-l+p:j=p-l+e,e=l,l=q+j,be(q)>=be(j)?m=q-l+j:m=j-l+q,q=l,o+=m,u[f]=e+q+o,t+=i,f+=v;return u}vb.exports=AC -});var fb=c(function(JY,ob){ -var LC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),tb=nb(),BC=sb();LC(tb,"ndarray",BC);ob.exports=tb -});var cb=c(function(QY,qb){ -function CC(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=Db(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}Hb.exports=oG -});var $b=c(function(nX,Wb){ -var Qb=require('@stdlib/math/base/assert/is-nan/dist'),Ub=require('@stdlib/math/base/special/abs/dist');function fG(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 Qb(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=Ub(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}Wb.exports=fG -});var Xb=c(function(vX,Yb){ -var qG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),hb=Jb(),cG=$b();qG(hb,"ndarray",cG);Yb.exports=hb -});var rw=c(function(sX,Nb){ -var db=require('@stdlib/math/base/assert/is-nan/dist'),xb=require('@stdlib/math/base/special/abs/dist');function mG(n,e,a){var i,r,u,v,s,o;if(n<=0)return 0;if(n===1||a===0)return db(e[0])?0:e[0];for(a<0?r=(1-n)*a:r=0,i=0,s=0,o=0;o=xb(u)?s+=i-v+u:s+=u-v+i,i=v),r+=a;return i+s}Nb.exports=mG -});var iw=c(function(tX,uw){ -var ew=require('@stdlib/math/base/assert/is-nan/dist'),aw=require('@stdlib/math/base/special/abs/dist');function lG(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return ew(e[i])?0:e[i];for(u=i,r=0,o=0,t=0;t=aw(v)?o+=r-s+v:o+=v-s+r,r=s),u+=a;return r+o}uw.exports=lG -});var ye=c(function(oX,vw){ -var pG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),nw=rw(),jG=iw();pG(nw,"ndarray",jG);vw.exports=nw -});var tw=c(function(fX,sw){ -var gG=ye();function bG(n,e,a){return gG(n,e,a)}sw.exports=bG -});var fw=c(function(qX,ow){ -var wG=ye().ndarray;function yG(n,e,a,i){return wG(n,e,a,i)}ow.exports=yG -});var mw=c(function(cX,cw){ -var RG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),qw=tw(),kG=fw();RG(qw,"ndarray",kG);cw.exports=qw -});var jw=c(function(mX,pw){ -var lw=require('@stdlib/math/base/assert/is-nan/dist'),Re=require('@stdlib/math/base/special/abs/dist');function _G(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return lw(e[0])?0:e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=Re(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,Re(v)>=Re(f)?s=v-t+f:s=f-t+v,v=t,r+=s),u+=a;return i+v+r}pw.exports=_G -});var ww=c(function(lX,bw){ -var gw=require('@stdlib/math/base/assert/is-nan/dist'),ke=require('@stdlib/math/base/special/abs/dist');function EG(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 gw(e[i])?0:e[i];for(v=i,r=0,u=0,s=0,m=0;m=ke(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,ke(s)>=ke(q)?o=s-f+q:o=q-f+s,s=f,u+=o),v+=a;return r+s+u}bw.exports=EG -});var kw=c(function(pX,Rw){ -var OG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),yw=jw(),FG=ww();OG(yw,"ndarray",FG);Rw.exports=yw -});var Ow=c(function(jX,Ew){ -var _w=require('@stdlib/math/base/assert/is-nan/dist');function MG(n,e,a){var i,r,u;if(r=0,n<=0)return r;if(n===1||a===0)return _w(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||hw(f)||f===q&&$w(f))&&(t+=1)),f=a[v+t*i],f>m||hw(f)||f===m&&$w(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}}Yw.exports=XG -});var ry=c(function(MX,Nw){ -var dw=require('@stdlib/math/base/assert/is-positive-zero/dist'),xw=require('@stdlib/math/base/assert/is-nan/dist'),dG=require('@stdlib/math/base/special/floor/dist');function xG(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=dG(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||xw(f)||f===q&&dw(f))&&(t+=1)),f=a[r+t*i],f>m||xw(f)||f===m&&dw(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}}Nw.exports=xG -});var uy=c(function(TX,ay){ -var NG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),ey=Xw(),rI=ry();NG(ey,"ndarray",rI);ay.exports=ey -});var vy=c(function(SX,ny){ -var Ee=require('@stdlib/math/base/assert/is-negative-zero/dist'),iy=require('@stdlib/math/base/assert/is-nan/dist');function eI(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=Ee(j),o=s-i,m=q-u;o<=t&&(b=a[o],!(b<=j&&!(v&&b===j&&Ee(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&&Ee(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}ny.exports=eI -});var oy=c(function(ZX,ty){ -var Oe=require('@stdlib/math/base/assert/is-negative-zero/dist'),sy=require('@stdlib/math/base/assert/is-nan/dist');function aI(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=Oe(b),f=t-i,l=p-v;f<=q&&(_=a[f],!(_<=b&&!(o&&_===b&&Oe(_)===!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&&Oe(_)===!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}ty.exports=aI -});var cy=c(function(PX,qy){ -var uI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),fy=vy(),iI=oy();uI(fy,"ndarray",iI);qy.exports=fy -});var Fi=c(function(AX,nI){nI.exports=[701,301,132,57,23,10,4,1]});var py=c(function(LX,ly){ -var vI=require('@stdlib/math/base/assert/is-negative-zero/dist'),sI=require('@stdlib/math/base/assert/is-nan/dist'),my=Fi(),tI=my.length;function oI(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}ly.exports=oI -});var by=c(function(BX,gy){ -var fI=require('@stdlib/math/base/assert/is-negative-zero/dist'),qI=require('@stdlib/math/base/assert/is-nan/dist'),jy=Fi(),cI=jy.length;function mI(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}gy.exports=mI -});var Ry=c(function(CX,yy){ -var lI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),wy=py(),pI=by();lI(wy,"ndarray",pI);yy.exports=wy -});var Oy=c(function(GX,Ey){ -var ky=require('@stdlib/math/base/assert/is-positive-zero/dist'),_y=require('@stdlib/math/base/assert/is-nan/dist'),jI=require('@stdlib/math/base/special/floor/dist');function gI(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=jI(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||_y(s)||s===o&&ky(s))&&(v+=1)),s=a[r+v*i],s>f||_y(s)||s===f&&ky(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}Ey.exports=gI -});var Sy=c(function(IX,Ty){ -var Fy=require('@stdlib/math/base/assert/is-positive-zero/dist'),My=require('@stdlib/math/base/assert/is-nan/dist'),bI=require('@stdlib/math/base/special/floor/dist');function wI(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=bI(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=wI -});var Ay=c(function(KX,Py){ -var yI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Zy=Oy(),RI=Sy();yI(Zy,"ndarray",RI);Py.exports=Zy -});var Cy=c(function(VX,By){ -var Fe=require('@stdlib/math/base/assert/is-negative-zero/dist'),Ly=require('@stdlib/math/base/assert/is-nan/dist');function kI(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=Fe(t),v=u-i;v<=s&&(f=a[v],!(f<=t&&!(r&&f===t&&Fe(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&&Fe(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}By.exports=kI -});var Ky=c(function(zX,Iy){ -var Me=require('@stdlib/math/base/assert/is-negative-zero/dist'),Gy=require('@stdlib/math/base/assert/is-nan/dist');function _I(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=Me(f),s=v-i;s<=o&&(q=a[s],!(q<=f&&!(u&&q===f&&Me(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&&Me(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}Iy.exports=_I -});var Dy=c(function(DX,zy){ -var EI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Vy=Cy(),OI=Ky();EI(Vy,"ndarray",OI);zy.exports=Vy -});var Mi=c(function(HX,FI){FI.exports=[701,301,132,57,23,10,4,1]});var Qy=c(function(JX,Jy){ -var MI=require('@stdlib/math/base/assert/is-negative-zero/dist'),TI=require('@stdlib/math/base/assert/is-nan/dist'),Hy=Mi(),SI=Hy.length;function ZI(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}Jy.exports=ZI -});var $y=c(function(QX,Wy){ -var PI=require('@stdlib/math/base/assert/is-negative-zero/dist'),AI=require('@stdlib/math/base/assert/is-nan/dist'),Uy=Mi(),LI=Uy.length;function BI(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}Wy.exports=BI -});var Xy=c(function(UX,Yy){ -var CI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),hy=Qy(),GI=$y();CI(hy,"ndarray",GI);Yy.exports=hy -});var Ny=c(function(WX,xy){ -var dy=require('@stdlib/math/base/special/abs/dist');function II(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=dy(u)?s+=i-v+u:s+=u-v+i,i=v,r+=a;return i+s}xy.exports=II -});var aR=c(function($X,eR){ -var rR=require('@stdlib/math/base/special/abs/dist');function KI(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=rR(v)?o+=r-s+v:o+=v-s+r,r=s,u+=a;return r+o}eR.exports=KI -});var Te=c(function(hX,iR){ -var VI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),uR=Ny(),zI=aR();VI(uR,"ndarray",zI);iR.exports=uR -});var vR=c(function(YX,nR){ -var DI=Te();function HI(n,e,a){return DI(n,e,a)}nR.exports=HI -});var tR=c(function(XX,sR){ -var JI=Te().ndarray;function QI(n,e,a,i){return JI(n,e,a,i)}sR.exports=QI -});var qR=c(function(dX,fR){ -var UI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),oR=vR(),WI=tR();UI(oR,"ndarray",WI);fR.exports=oR -});var mR=c(function(xX,cR){ -var Se=require('@stdlib/math/base/special/abs/dist');function $I(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}cR.exports=$I -});var pR=c(function(NX,lR){ -var Ze=require('@stdlib/math/base/special/abs/dist');function hI(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=Ze(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,Ze(s)>=Ze(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=a;return r+s+u}lR.exports=hI -});var bR=c(function(rd,gR){ -var YI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),jR=mR(),XI=pR();YI(jR,"ndarray",XI);gR.exports=jR -});var yR=c(function(ed,wR){ -var Ti=6;function dI(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=HR(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)}JR.exports=pK -});var $R=c(function(cd,WR){ -var $=require('@stdlib/number/float64/base/to-float32/dist'),UR=require('@stdlib/math/base/special/abs/dist');function jK(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=UR(s)?t=$(t+$($(u-o)+s)):t=$(t+$($(s-o)+u)),u=o,v+=i;return $(u+t)}WR.exports=jK -});var XR=c(function(md,YR){ -var gK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),hR=QR(),bK=$R();gK(hR,"ndarray",bK);YR.exports=hR -});var Le=c(function(ld,xR){ -var wK=require("path").join,yK=require('@stdlib/utils/try-require/dist'),RK=require('@stdlib/assert/is-error/dist'),kK=XR(),Li,dR=yK(wK(__dirname,"./native.js"));RK(dR)?Li=kK:Li=dR;xR.exports=Li -});var rk=c(function(pd,NR){ -var _K=Le();function EK(n,e,a,i){return _K(n,e,a,i)}NR.exports=EK -});var ak=c(function(jd,ek){ -var OK=Le().ndarray;function FK(n,e,a,i,r){return OK(n,e,a,i,r)}ek.exports=FK -});var nk=c(function(gd,ik){ -var MK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),uk=rk(),TK=ak();MK(uk,"ndarray",TK);ik.exports=uk -});var tk=c(function(bd,sk){ -var SK=require("path").join,ZK=require('@stdlib/utils/try-require/dist'),PK=require('@stdlib/assert/is-error/dist'),AK=nk(),Bi,vk=ZK(SK(__dirname,"./native.js"));PK(vk)?Bi=AK:Bi=vk;sk.exports=Bi -});var fk=c(function(wd,ok){ -var K=require('@stdlib/number/float64/base/to-float32/dist'),Be=require('@stdlib/math/base/special/abs/dist');function LK(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=Be(t)?q=K(K(r-f)+t):q=K(K(t-f)+r),r=f,f=K(s+q),Be(s)>=Be(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))}ok.exports=LK -});var ck=c(function(yd,qk){ -var V=require('@stdlib/number/float64/base/to-float32/dist'),Ce=require('@stdlib/math/base/special/abs/dist');function BK(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=Ce(f)?m=V(V(u-q)+f):m=V(V(f-q)+u),u=q,q=V(o+m),Ce(o)>=Ce(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))}qk.exports=BK -});var pk=c(function(Rd,lk){ -var CK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),mk=fk(),GK=ck();CK(mk,"ndarray",GK);lk.exports=mk -});var bk=c(function(kd,gk){ -var IK=require("path").join,KK=require('@stdlib/utils/try-require/dist'),VK=require('@stdlib/assert/is-error/dist'),zK=pk(),Ci,jk=KK(IK(__dirname,"./native.js"));VK(jk)?Ci=zK:Ci=jk;gk.exports=Ci -});var yk=c(function(_d,wk){ -var Gi=require('@stdlib/number/float64/base/to-float32/dist');function DK(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=hk(t)?q=ur(q+ur(ur(o-f)+t)):q=ur(q+ur(ur(t-f)+o)),o=f,r[s]=ur(o+q),v+=i,s+=u;return r}Yk.exports=jV -});var Nk=c(function(Gd,xk){ -var ir=require('@stdlib/number/float64/base/to-float32/dist'),dk=require('@stdlib/math/base/special/abs/dist');function gV(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=dk(q)?p=ir(p+ir(ir(f-m)+q)):p=ir(p+ir(ir(q-m)+f)),f=m,u[t]=ir(f+p),o+=i,t+=v;return u}xk.exports=gV -});var a3=c(function(Id,e3){ -var bV=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),r3=Xk(),wV=Nk();bV(r3,"ndarray",wV);e3.exports=r3 -});var Ge=c(function(Kd,i3){ -var yV=require("path").join,RV=require('@stdlib/utils/try-require/dist'),kV=require('@stdlib/assert/is-error/dist'),_V=a3(),Wi,u3=RV(yV(__dirname,"./native.js"));kV(u3)?Wi=_V:Wi=u3;i3.exports=Wi -});var v3=c(function(Vd,n3){ -var EV=Ge();function OV(n,e,a,i,r,u){return EV(n,e,a,i,r,u)}n3.exports=OV -});var t3=c(function(zd,s3){ -var FV=Ge().ndarray;function MV(n,e,a,i,r,u,v,s){return FV(n,e,a,i,r,u,v,s)}s3.exports=MV -});var q3=c(function(Dd,f3){ -var TV=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),o3=v3(),SV=t3();TV(o3,"ndarray",SV);f3.exports=o3 -});var l3=c(function(Hd,m3){ -var ZV=require("path").join,PV=require('@stdlib/utils/try-require/dist'),AV=require('@stdlib/assert/is-error/dist'),LV=q3(),$i,c3=PV(ZV(__dirname,"./native.js"));AV(c3)?$i=LV:$i=c3;m3.exports=$i -});var j3=c(function(Jd,p3){ -var z=require('@stdlib/number/float64/base/to-float32/dist'),Ie=require('@stdlib/math/base/special/abs/dist');function BV(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=Ie(q)?p=z(z(e-m)+q):p=z(z(q-m)+e),e=m,m=z(t+p),Ie(t)>=Ie(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}p3.exports=BV -});var b3=c(function(Qd,g3){ -var D=require('@stdlib/number/float64/base/to-float32/dist'),Ke=require('@stdlib/math/base/special/abs/dist');function CV(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=Ke(p)?j=D(D(e-l)+p):j=D(D(p-l)+e),e=l,l=D(q+j),Ke(q)>=Ke(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}g3.exports=CV -});var R3=c(function(Ud,y3){ -var GV=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),w3=j3(),IV=b3();GV(w3,"ndarray",IV);y3.exports=w3 -});var E3=c(function(Wd,_3){ -var KV=require("path").join,VV=require('@stdlib/utils/try-require/dist'),zV=require('@stdlib/assert/is-error/dist'),DV=R3(),hi,k3=VV(KV(__dirname,"./native.js"));zV(k3)?hi=DV:hi=k3;_3.exports=hi -});var F3=c(function($d,O3){ -var HV=require('@stdlib/number/float64/base/to-float32/dist');function JV(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=i4(u)?s=tr(s+tr(tr(i-v)+u)):s=tr(s+tr(tr(u-v)+i)),i=v),r+=a;return tr(i+s)}n4.exports=ED -});var f4=c(function(Zx,o4){ -var or=require('@stdlib/number/float64/base/to-float32/dist'),s4=require('@stdlib/math/base/assert/is-nanf/dist'),t4=require('@stdlib/math/base/special/abs/dist');function OD(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return s4(e[i])?0:e[i];for(u=i,r=0,o=0,t=0;t=t4(v)?o=or(o+or(or(r-s)+v)):o=or(o+or(or(v-s)+r)),r=s),u+=a;return or(r+o)}o4.exports=OD -});var m4=c(function(Px,c4){ -var FD=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),q4=v4(),MD=f4();FD(q4,"ndarray",MD);c4.exports=q4 -});var Qe=c(function(Ax,p4){ -var TD=require("path").join,SD=require('@stdlib/utils/try-require/dist'),ZD=require('@stdlib/assert/is-error/dist'),PD=m4(),jn,l4=SD(TD(__dirname,"./native.js"));ZD(l4)?jn=PD:jn=l4;p4.exports=jn -});var g4=c(function(Lx,j4){ -var AD=Qe();function LD(n,e,a){return AD(n,e,a)}j4.exports=LD -});var w4=c(function(Bx,b4){ -var BD=Qe().ndarray;function CD(n,e,a,i){return BD(n,e,a,i)}b4.exports=CD -});var k4=c(function(Cx,R4){ -var GD=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),y4=g4(),ID=w4();GD(y4,"ndarray",ID);R4.exports=y4 -});var O4=c(function(Gx,E4){ -var KD=require("path").join,VD=require('@stdlib/utils/try-require/dist'),zD=require('@stdlib/assert/is-error/dist'),DD=k4(),gn,_4=VD(KD(__dirname,"./native.js"));zD(_4)?gn=DD:gn=_4;E4.exports=gn -});var T4=c(function(Ix,M4){ -var H=require('@stdlib/number/float64/base/to-float32/dist'),F4=require('@stdlib/math/base/assert/is-nanf/dist'),Ue=require('@stdlib/math/base/special/abs/dist');function HD(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return F4(e[0])?0:e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=Ue(o)?f=H(H(i-t)+o):f=H(H(o-t)+i),i=t,t=H(v+f),Ue(v)>=Ue(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))}M4.exports=HD -});var P4=c(function(Kx,Z4){ -var J=require('@stdlib/number/float64/base/to-float32/dist'),S4=require('@stdlib/math/base/assert/is-nanf/dist'),We=require('@stdlib/math/base/special/abs/dist');function JD(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 S4(e[i])?0:e[i];for(v=i,r=0,u=0,s=0,m=0;m=We(t)?q=J(J(r-f)+t):q=J(J(t-f)+r),r=f,f=J(s+q),We(s)>=We(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))}Z4.exports=JD -});var B4=c(function(Vx,L4){ -var QD=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),A4=T4(),UD=P4();QD(A4,"ndarray",UD);L4.exports=A4 -});var I4=c(function(zx,G4){ -var WD=require("path").join,$D=require('@stdlib/utils/try-require/dist'),hD=require('@stdlib/assert/is-error/dist'),YD=B4(),bn,C4=$D(WD(__dirname,"./native.js"));hD(C4)?bn=YD:bn=C4;G4.exports=bn -});var z4=c(function(Dx,V4){ -var XD=require('@stdlib/number/float64/base/to-float32/dist'),K4=require('@stdlib/math/base/assert/is-nanf/dist');function dD(n,e,a){var i,r,u;if(i=0,n<=0)return i;if(n===1||a===0)return K4(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||g8(f)||f===q&&j8(f))&&(t+=1)),f=a[v+t*i],f>m||g8(f)||f===m&&j8(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}}b8.exports=TH -});var _8=c(function(rN,k8){ -var y8=require('@stdlib/math/base/assert/is-positive-zerof/dist'),R8=require('@stdlib/math/base/assert/is-nanf/dist'),SH=require('@stdlib/math/base/special/floor/dist');function ZH(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=SH(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||R8(f)||f===q&&y8(f))&&(t+=1)),f=a[r+t*i],f>m||R8(f)||f===m&&y8(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}}k8.exports=ZH -});var F8=c(function(eN,O8){ -var PH=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),E8=w8(),AH=_8();PH(E8,"ndarray",AH);O8.exports=E8 -});var S8=c(function(aN,T8){ -var LH=require("path").join,BH=require('@stdlib/utils/try-require/dist'),CH=require('@stdlib/assert/is-error/dist'),GH=F8(),En,M8=BH(LH(__dirname,"./native.js"));CH(M8)?En=GH:En=M8;T8.exports=En -});var A8=c(function(uN,P8){ -var he=require('@stdlib/math/base/assert/is-negative-zerof/dist'),Z8=require('@stdlib/math/base/assert/is-nanf/dist');function IH(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=he(j),o=s-i,m=q-u;o<=t&&(b=a[o],!(b<=j&&!(v&&b===j&&he(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&&he(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}P8.exports=IH -});var C8=c(function(iN,B8){ -var Ye=require('@stdlib/math/base/assert/is-negative-zerof/dist'),L8=require('@stdlib/math/base/assert/is-nanf/dist');function KH(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=Ye(b),f=t-i,l=p-v;f<=q&&(_=a[f],!(_<=b&&!(o&&_===b&&Ye(_)===!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&&Ye(_)===!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}B8.exports=KH -});var K8=c(function(nN,I8){ -var VH=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),G8=A8(),zH=C8();VH(G8,"ndarray",zH);I8.exports=G8 -});var D8=c(function(vN,z8){ -var DH=require("path").join,HH=require('@stdlib/utils/try-require/dist'),JH=require('@stdlib/assert/is-error/dist'),QH=K8(),On,V8=HH(DH(__dirname,"./native.js"));JH(V8)?On=QH:On=V8;z8.exports=On -});var Fn=c(function(sN,UH){UH.exports=[701,301,132,57,23,10,4,1]});var Q8=c(function(tN,J8){ -var WH=require('@stdlib/math/base/assert/is-negative-zerof/dist'),$H=require('@stdlib/math/base/assert/is-nanf/dist'),H8=Fn(),hH=H8.length;function YH(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}J8.exports=YH -});var $8=c(function(oN,W8){ -var XH=require('@stdlib/math/base/assert/is-negative-zerof/dist'),dH=require('@stdlib/math/base/assert/is-nanf/dist'),U8=Fn(),xH=U8.length;function NH(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}W8.exports=NH -});var X8=c(function(fN,Y8){ -var rJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),h8=Q8(),eJ=$8();rJ(h8,"ndarray",eJ);Y8.exports=h8 -});var N8=c(function(qN,x8){ -var aJ=require("path").join,uJ=require('@stdlib/utils/try-require/dist'),iJ=require('@stdlib/assert/is-error/dist'),nJ=X8(),Mn,d8=uJ(aJ(__dirname,"./native.js"));iJ(d8)?Mn=nJ:Mn=d8;x8.exports=Mn -});var uE=c(function(cN,aE){ -var rE=require('@stdlib/math/base/assert/is-positive-zerof/dist'),eE=require('@stdlib/math/base/assert/is-nanf/dist'),vJ=require('@stdlib/math/base/special/floor/dist');function sJ(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=vJ(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||eE(s)||s===o&&rE(s))&&(v+=1)),s=a[r+v*i],s>f||eE(s)||s===f&&rE(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}aE.exports=sJ -});var sE=c(function(mN,vE){ -var iE=require('@stdlib/math/base/assert/is-positive-zerof/dist'),nE=require('@stdlib/math/base/assert/is-nanf/dist'),tJ=require('@stdlib/math/base/special/floor/dist');function oJ(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=tJ(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=oJ -});var fE=c(function(lN,oE){ -var fJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),tE=uE(),qJ=sE();fJ(tE,"ndarray",qJ);oE.exports=tE -});var mE=c(function(pN,cE){ -var cJ=require("path").join,mJ=require('@stdlib/utils/try-require/dist'),lJ=require('@stdlib/assert/is-error/dist'),pJ=fE(),Tn,qE=mJ(cJ(__dirname,"./native.js"));lJ(qE)?Tn=pJ:Tn=qE;cE.exports=Tn -});var jE=c(function(jN,pE){ -var Xe=require('@stdlib/math/base/assert/is-negative-zerof/dist'),lE=require('@stdlib/math/base/assert/is-nanf/dist');function jJ(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=Xe(t),v=u-i;v<=s&&(f=a[v],!(f<=t&&!(r&&f===t&&Xe(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&&Xe(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}pE.exports=jJ -});var wE=c(function(gN,bE){ -var de=require('@stdlib/math/base/assert/is-negative-zerof/dist'),gE=require('@stdlib/math/base/assert/is-nanf/dist');function gJ(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=de(f),s=v-i;s<=o&&(q=a[s],!(q<=f&&!(u&&q===f&&de(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&&de(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}bE.exports=gJ -});var kE=c(function(bN,RE){ -var bJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),yE=jE(),wJ=wE();bJ(yE,"ndarray",wJ);RE.exports=yE -});var OE=c(function(wN,EE){ -var yJ=require("path").join,RJ=require('@stdlib/utils/try-require/dist'),kJ=require('@stdlib/assert/is-error/dist'),_J=kE(),Sn,_E=RJ(yJ(__dirname,"./native.js"));kJ(_E)?Sn=_J:Sn=_E;EE.exports=Sn -});var Zn=c(function(yN,EJ){EJ.exports=[701,301,132,57,23,10,4,1]});var TE=c(function(RN,ME){ -var OJ=require('@stdlib/math/base/assert/is-negative-zerof/dist'),FJ=require('@stdlib/math/base/assert/is-nanf/dist'),FE=Zn(),MJ=FE.length;function TJ(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}ME.exports=TJ -});var PE=c(function(kN,ZE){ -var SJ=require('@stdlib/math/base/assert/is-negative-zerof/dist'),ZJ=require('@stdlib/math/base/assert/is-nanf/dist'),SE=Zn(),PJ=SE.length;function AJ(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}ZE.exports=AJ -});var BE=c(function(_N,LE){ -var LJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),AE=TE(),BJ=PE();LJ(AE,"ndarray",BJ);LE.exports=AE -});var IE=c(function(EN,GE){ -var CJ=require("path").join,GJ=require('@stdlib/utils/try-require/dist'),IJ=require('@stdlib/assert/is-error/dist'),KJ=BE(),Pn,CE=GJ(CJ(__dirname,"./native.js"));IJ(CE)?Pn=KJ:Pn=CE;GE.exports=Pn -});var zE=c(function(ON,VE){ -var nr=require('@stdlib/number/float64/base/to-float32/dist'),KE=require('@stdlib/math/base/special/abs/dist');function VJ(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=KE(u)?s=nr(s+nr(nr(i-v)+u)):s=nr(s+nr(nr(u-v)+i)),i=v,r+=a;return nr(i+s)}VE.exports=VJ -});var JE=c(function(FN,HE){ -var vr=require('@stdlib/number/float64/base/to-float32/dist'),DE=require('@stdlib/math/base/special/abs/dist');function zJ(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=DE(v)?o=vr(o+vr(vr(r-s)+v)):o=vr(o+vr(vr(v-s)+r)),r=s,u+=a;return vr(r+o)}HE.exports=zJ -});var WE=c(function(MN,UE){ -var DJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),QE=zE(),HJ=JE();DJ(QE,"ndarray",HJ);UE.exports=QE -});var xe=c(function(TN,hE){ -var JJ=require("path").join,QJ=require('@stdlib/utils/try-require/dist'),UJ=require('@stdlib/assert/is-error/dist'),WJ=WE(),An,$E=QJ(JJ(__dirname,"./native.js"));UJ($E)?An=WJ:An=$E;hE.exports=An -});var XE=c(function(SN,YE){ -var $J=xe();function hJ(n,e,a){return $J(n,e,a)}YE.exports=hJ -});var xE=c(function(ZN,dE){ -var YJ=xe().ndarray;function XJ(n,e,a,i){return YJ(n,e,a,i)}dE.exports=XJ -});var e6=c(function(PN,r6){ -var dJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),NE=XE(),xJ=xE();dJ(NE,"ndarray",xJ);r6.exports=NE -});var i6=c(function(AN,u6){ -var NJ=require("path").join,rQ=require('@stdlib/utils/try-require/dist'),eQ=require('@stdlib/assert/is-error/dist'),aQ=e6(),Ln,a6=rQ(NJ(__dirname,"./native.js"));eQ(a6)?Ln=aQ:Ln=a6;u6.exports=Ln -});var v6=c(function(LN,n6){ -var Q=require('@stdlib/number/float64/base/to-float32/dist'),Ne=require('@stdlib/math/base/special/abs/dist');function uQ(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=Ne(o)?f=Q(Q(i-t)+o):f=Q(Q(o-t)+i),i=t,t=Q(v+f),Ne(v)>=Ne(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))}n6.exports=uQ -});var t6=c(function(BN,s6){ -var U=require('@stdlib/number/float64/base/to-float32/dist'),ra=require('@stdlib/math/base/special/abs/dist');function iQ(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=ra(t)?q=U(U(r-f)+t):q=U(U(t-f)+r),r=f,f=U(s+q),ra(s)>=ra(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))}s6.exports=iQ -});var q6=c(function(CN,f6){ -var nQ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),o6=v6(),vQ=t6();nQ(o6,"ndarray",vQ);f6.exports=o6 -});var l6=c(function(GN,m6){ -var sQ=require("path").join,tQ=require('@stdlib/utils/try-require/dist'),oQ=require('@stdlib/assert/is-error/dist'),fQ=q6(),Bn,c6=tQ(sQ(__dirname,"./native.js"));oQ(c6)?Bn=fQ:Bn=c6;m6.exports=Bn -});var j6=c(function(IN,p6){ -var qQ=require('@stdlib/number/float64/base/to-float32/dist');function cQ(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;u0)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;qo?v=ps(1,n):v=ps(1,e),u=s+o,u===0?(f=1,q=0,t=0,m=0):(t=u*R5(ls(n/u)+ls(e/u)),t*=v,f=n/t,q=e/t,m=1,s>o?m=q:f!==0&&(m=1/f)),n=t,e=m,a[r]=n,a[r+i]=e,a[r+2*i]=f,a[r+3*i]=q,a}gs.exports=k5 +});var bs=c(function(zU,js){ +var _5=require('@stdlib/array/float64/dist'),E5=ba();function O5(n,e){var a=new _5(4);return E5(n,e,a,1,0)}js.exports=O5 +});var Rs=c(function(DU,ys){ +var F5=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),ws=bs(),M5=ba();F5(ws,"assign",M5);ys.exports=ws +});var _s=c(function(HU,ks){ +var wa=5;function T5(n,e,a,i){var r,u;if(n<=0||i<=0||e===1)return a;if(i===1){if(u=n%wa,u>0)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=qo(1,n):v=qo(1,e),u=Y(s+o),u===0?(f=1,q=0,t=0,m=0):(t=Y(u*BM(Y(fo(Y(n/u))+fo(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}co.exports=CM +});var lo=c(function(hW,mo){ +var GM=require('@stdlib/array/float32/dist'),IM=Ua();function KM(n,e){var a=new GM(4);return IM(n,e,a,1,0)}mo.exports=KM +});var jo=c(function(YW,go){ +var VM=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),po=lo(),zM=Ua();VM(po,"assign",zM);go.exports=po +});var wo=c(function(XW,bo){ +var Wa=5;function DM(n,e,a,i){var r,u;if(n<=0||i<=0||e===1)return a;if(i===1){if(u=n%Wa,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=sf(v)?o+=r-s+v:o+=v-s+r,r=s,u+=i;return r+o}tf.exports=j7 +});var cf=c(function(l9,qf){ +var ff=require('@stdlib/math/base/special/abs/dist');function b7(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=ff(s)?t+=u-o+s:t+=s-o+u,u=o,v+=i;return u+t}qf.exports=b7 +});var pf=c(function(p9,lf){ +var w7=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),mf=of(),y7=cf();w7(mf,"ndarray",y7);lf.exports=mf +});var Vr=c(function(g9,jf){ +var R7=require("path").join,k7=require('@stdlib/utils/try-require/dist'),_7=require('@stdlib/assert/is-error/dist'),E7=pf(),ru,gf=k7(R7(__dirname,"./native.js"));_7(gf)?ru=E7:ru=gf;jf.exports=ru +});var wf=c(function(j9,bf){ +var O7=Vr();function F7(n,e,a,i){return O7(n,e,a,i)}bf.exports=F7 +});var Rf=c(function(b9,yf){ +var M7=Vr().ndarray;function T7(n,e,a,i,r){return M7(n,e,a,i,r)}yf.exports=T7 +});var Ef=c(function(w9,_f){ +var S7=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),kf=wf(),Z7=Rf();S7(kf,"ndarray",Z7);_f.exports=kf +});var Mf=c(function(y9,Ff){ +var P7=require("path").join,A7=require('@stdlib/utils/try-require/dist'),L7=require('@stdlib/assert/is-error/dist'),B7=Ef(),eu,Of=A7(P7(__dirname,"./native.js"));L7(Of)?eu=B7:eu=Of;Ff.exports=eu +});var Sf=c(function(R9,Tf){ +var zr=require('@stdlib/math/base/special/abs/dist');function C7(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=zr(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,zr(s)>=zr(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=i;return r+s+u}Tf.exports=C7 +});var Pf=c(function(k9,Zf){ +var Dr=require('@stdlib/math/base/special/abs/dist');function G7(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=Dr(f)?m=u-q+f:m=f-q+u,u=q,q=o+m,Dr(o)>=Dr(m)?t=o-q+m:t=m-q+o,o=q,v+=t,s+=i;return u+o+v}Zf.exports=G7 +});var Bf=c(function(_9,Lf){ +var I7=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Af=Sf(),K7=Pf();I7(Af,"ndarray",K7);Lf.exports=Af +});var If=c(function(E9,Gf){ +var V7=require("path").join,z7=require('@stdlib/utils/try-require/dist'),D7=require('@stdlib/assert/is-error/dist'),H7=Bf(),au,Cf=z7(V7(__dirname,"./native.js"));D7(Cf)?au=H7:au=Cf;Gf.exports=au +});var Vf=c(function(O9,Kf){ +function J7(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=mq(t)?q+=o-f+t:q+=t-f+o,o=f,r[s]=o+q,v+=i,s+=u;return r}lq.exports=jT +});var bq=c(function(K9,jq){ +var gq=require('@stdlib/math/base/special/abs/dist');function bT(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=gq(q)?p+=f-m+q:p+=q-m+f,f=m,u[t]=f+p,o+=i,t+=v;return u}jq.exports=bT +});var Rq=c(function(V9,yq){ +var wT=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),wq=pq(),yT=bq();wT(wq,"ndarray",yT);yq.exports=wq +});var Hr=c(function(z9,_q){ +var RT=require("path").join,kT=require('@stdlib/utils/try-require/dist'),_T=require('@stdlib/assert/is-error/dist'),ET=Rq(),fu,kq=kT(RT(__dirname,"./native.js"));_T(kq)?fu=ET:fu=kq;_q.exports=fu +});var Oq=c(function(D9,Eq){ +var OT=Hr();function FT(n,e,a,i,r,u){return OT(n,e,a,i,r,u)}Eq.exports=FT +});var Mq=c(function(H9,Fq){ +var MT=Hr().ndarray;function TT(n,e,a,i,r,u,v,s){return MT(n,e,a,i,r,u,v,s)}Fq.exports=TT +});var Zq=c(function(J9,Sq){ +var ST=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Tq=Oq(),ZT=Mq();ST(Tq,"ndarray",ZT);Sq.exports=Tq +});var Lq=c(function(Q9,Aq){ +var PT=require("path").join,AT=require('@stdlib/utils/try-require/dist'),LT=require('@stdlib/assert/is-error/dist'),BT=Zq(),qu,Pq=AT(PT(__dirname,"./native.js"));LT(Pq)?qu=BT:qu=Pq;Aq.exports=qu +});var Cq=c(function(U9,Bq){ +var Jr=require('@stdlib/math/base/special/abs/dist');function CT(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=Jr(q)?p=e-m+q:p=q-m+e,e=m,m=t+p,Jr(t)>=Jr(p)?f=t-m+p:f=p-m+t,t=m,v+=f,r[o]=e+t+v,s+=i,o+=u;return r}Bq.exports=CT +});var Iq=c(function(W9,Gq){ +var Qr=require('@stdlib/math/base/special/abs/dist');function GT(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,g,j;if(n<=0)return u;for(t=r,f=s,o=0,q=0,j=0;j=Qr(p)?g=e-l+p:g=p-l+e,e=l,l=q+g,Qr(q)>=Qr(g)?m=q-l+g:m=g-l+q,q=l,o+=m,u[f]=e+q+o,t+=i,f+=v;return u}Gq.exports=GT +});var zq=c(function($9,Vq){ +var IT=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Kq=Cq(),KT=Iq();IT(Kq,"ndarray",KT);Vq.exports=Kq +});var Jq=c(function(h9,Hq){ +var VT=require("path").join,zT=require('@stdlib/utils/try-require/dist'),DT=require('@stdlib/assert/is-error/dist'),HT=zq(),cu,Dq=zT(VT(__dirname,"./native.js"));DT(Dq)?cu=HT:cu=Dq;Hq.exports=cu +});var Uq=c(function(Y9,Qq){ +function JT(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=Jc(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}Qc.exports=LS +});var Yc=c(function(g$,hc){ +var Wc=require('@stdlib/math/base/assert/is-nan/dist'),$c=require('@stdlib/math/base/special/abs/dist');function BS(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 Wc(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=$c(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=BS +});var xc=c(function(j$,dc){ +var CS=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Xc=Uc(),GS=Yc();CS(Xc,"ndarray",GS);dc.exports=Xc +});var $r=c(function(b$,rm){ +var IS=require("path").join,KS=require('@stdlib/utils/try-require/dist'),VS=require('@stdlib/assert/is-error/dist'),zS=xc(),Ru,Nc=KS(IS(__dirname,"./native.js"));VS(Nc)?Ru=zS:Ru=Nc;rm.exports=Ru +});var am=c(function(w$,em){ +var DS=$r();function HS(n,e,a,i,r){return DS(n,e,a,i,r)}em.exports=HS +});var im=c(function(y$,um){ +var JS=$r().ndarray;function QS(n,e,a,i,r,u,v){return JS(n,e,a,i,r,u,v)}um.exports=QS +});var sm=c(function(R$,vm){ +var US=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),nm=am(),WS=im();US(nm,"ndarray",WS);vm.exports=nm +});var fm=c(function(k$,om){ +var $S=require("path").join,hS=require('@stdlib/utils/try-require/dist'),YS=require('@stdlib/assert/is-error/dist'),XS=sm(),ku,tm=hS($S(__dirname,"./native.js"));YS(tm)?ku=XS:ku=tm;om.exports=ku +});var mm=c(function(_$,cm){ +var qm=require('@stdlib/math/base/assert/is-nan/dist'),hr=require('@stdlib/math/base/special/abs/dist');function dS(n,e,a,i,r){var u,v,s,o,t,f,q,m,p,l,g;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 qm(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,g=0;g=hr(q)?p=u-m+q:p=q-m+u,u=m,m=s+p,hr(s)>=hr(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}cm.exports=dS +});var gm=c(function(E$,pm){ +var lm=require('@stdlib/math/base/assert/is-nan/dist'),Yr=require('@stdlib/math/base/special/abs/dist');function xS(n,e,a,i,r,u,v){var s,o,t,f,q,m,p,l,g,j,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 lm(e[q])?(r[m]=s,r[m+u]=0,r):(r[m]=e[q],r[m+u]=1,r);for(o=0,t=0,j=0,b=0;b=Yr(p)?g=s-l+p:g=p-l+s,s=l,l=t+g,Yr(t)>=Yr(g)?f=t-l+g:f=g-l+t,t=l,o+=f,j+=1),q+=a;return r[m]=s+t+o,r[m+u]=j,r}pm.exports=xS +});var wm=c(function(O$,bm){ +var NS=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),jm=mm(),rZ=gm();NS(jm,"ndarray",rZ);bm.exports=jm +});var km=c(function(F$,Rm){ +var eZ=require("path").join,aZ=require('@stdlib/utils/try-require/dist'),uZ=require('@stdlib/assert/is-error/dist'),iZ=wm(),_u,ym=aZ(eZ(__dirname,"./native.js"));uZ(ym)?_u=iZ:_u=ym;Rm.exports=_u +});var Om=c(function(M$,Em){ +var _m=require('@stdlib/math/base/assert/is-nan/dist');function nZ(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 _m(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=$m(u)?s+=i-v+u:s+=u-v+i,i=v),r+=a;return i+s}hm.exports=FZ +});var Nm=c(function(I$,xm){ +var Xm=require('@stdlib/math/base/assert/is-nan/dist'),dm=require('@stdlib/math/base/special/abs/dist');function MZ(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return Xm(e[i])?0:e[i];for(u=i,r=0,o=0,t=0;t=dm(v)?o+=r-s+v:o+=v-s+r,r=s),u+=a;return r+o}xm.exports=MZ +});var a1=c(function(K$,e1){ +var TZ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),r1=Ym(),SZ=Nm();TZ(r1,"ndarray",SZ);e1.exports=r1 +});var Xr=c(function(V$,i1){ +var ZZ=require("path").join,PZ=require('@stdlib/utils/try-require/dist'),AZ=require('@stdlib/assert/is-error/dist'),LZ=a1(),Tu,u1=PZ(ZZ(__dirname,"./native.js"));AZ(u1)?Tu=LZ:Tu=u1;i1.exports=Tu +});var v1=c(function(z$,n1){ +var BZ=Xr();function CZ(n,e,a){return BZ(n,e,a)}n1.exports=CZ +});var t1=c(function(D$,s1){ +var GZ=Xr().ndarray;function IZ(n,e,a,i){return GZ(n,e,a,i)}s1.exports=IZ +});var q1=c(function(H$,f1){ +var KZ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),o1=v1(),VZ=t1();KZ(o1,"ndarray",VZ);f1.exports=o1 +});var l1=c(function(J$,m1){ +var zZ=require("path").join,DZ=require('@stdlib/utils/try-require/dist'),HZ=require('@stdlib/assert/is-error/dist'),JZ=q1(),Su,c1=DZ(zZ(__dirname,"./native.js"));HZ(c1)?Su=JZ:Su=c1;m1.exports=Su +});var j1=c(function(Q$,g1){ +var p1=require('@stdlib/math/base/assert/is-nan/dist'),dr=require('@stdlib/math/base/special/abs/dist');function QZ(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return p1(e[0])?0:e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=dr(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,dr(v)>=dr(f)?s=v-t+f:s=f-t+v,v=t,r+=s),u+=a;return i+v+r}g1.exports=QZ +});var y1=c(function(U$,w1){ +var b1=require('@stdlib/math/base/assert/is-nan/dist'),xr=require('@stdlib/math/base/special/abs/dist');function UZ(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 b1(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}w1.exports=UZ +});var _1=c(function(W$,k1){ +var WZ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),R1=j1(),$Z=y1();WZ(R1,"ndarray",$Z);k1.exports=R1 +});var F1=c(function($$,O1){ +var hZ=require("path").join,YZ=require('@stdlib/utils/try-require/dist'),XZ=require('@stdlib/assert/is-error/dist'),dZ=_1(),Zu,E1=YZ(hZ(__dirname,"./native.js"));XZ(E1)?Zu=dZ:Zu=E1;O1.exports=Zu +});var S1=c(function(h$,T1){ +var M1=require('@stdlib/math/base/assert/is-nan/dist');function xZ(n,e,a){var i,r,u;if(i=0,n<=0)return i;if(n===1||a===0)return M1(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(j-=1,j===0)return a;l=v+j*i,m=a[l],g=s+j*u,p=r[g],a[l]=a[v],r[g]=r[s]}for(b=o,t=b*2+1;tq||mp(f)||f===q&&cp(f))&&(t+=1)),f=a[v+t*i],f>m||mp(f)||f===m&&cp(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}}lp.exports=SA +});var wp=c(function(Ph,bp){ +var gp=require('@stdlib/math/base/assert/is-positive-zero/dist'),jp=require('@stdlib/math/base/assert/is-nan/dist'),ZA=require('@stdlib/math/base/special/floor/dist');function PA(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,g,j,b,R;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),j=n,o=ZA(n/2);;){if(o>0)o-=1,m=a[r+o*i],p=u[s+o*v];else{if(j-=1,j===0)return a;l=r+j*i,m=a[l],g=s+j*v,p=u[g],a[l]=a[r],u[g]=u[s]}for(b=o,t=b*2+1;tq||jp(f)||f===q&&gp(f))&&(t+=1)),f=a[r+t*i],f>m||jp(f)||f===m&&gp(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}}bp.exports=PA +});var kp=c(function(Ah,Rp){ +var AA=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),yp=pp(),LA=wp();AA(yp,"ndarray",LA);Rp.exports=yp +});var Op=c(function(Lh,Ep){ +var BA=require("path").join,CA=require('@stdlib/utils/try-require/dist'),GA=require('@stdlib/assert/is-error/dist'),IA=kp(),Wu,_p=CA(BA(__dirname,"./native.js"));GA(_p)?Wu=IA:Wu=_p;Ep.exports=Wu +});var Tp=c(function(Bh,Mp){ +var ae=require('@stdlib/math/base/assert/is-negative-zero/dist'),Fp=require('@stdlib/math/base/assert/is-nan/dist');function KA(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,g,j,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]=g,r[l]=j}else{for(v=ae(g),o=s-i,m=q-u;o<=t&&(b=a[o],!(b<=g&&!(v&&b===g&&ae(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=g,r[m+u]=j,s+=i,q+=u}return a}for(t=0,f=(n-1)*i,s=t+i,R=1;R=t&&(b=a[o],!(b<=g&&!(v&&b===g&&ae(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=g,r[m+u]=j,s+=i,q+=u}return a}Mp.exports=KA +});var Pp=c(function(Ch,Zp){ +var ue=require('@stdlib/math/base/assert/is-negative-zero/dist'),Sp=require('@stdlib/math/base/assert/is-nan/dist');function VA(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,g,j,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,g=s,j=g+(n-1)*v,p=g+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[j]=R}else{for(o=ue(b),f=t-i,l=p-v;f<=q&&(_=a[f],!(_<=b&&!(o&&_===b&&ue(_)===!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&&ue(_)===!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}Zp.exports=VA +});var Bp=c(function(Gh,Lp){ +var zA=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Ap=Tp(),DA=Pp();zA(Ap,"ndarray",DA);Lp.exports=Ap +});var Ip=c(function(Ih,Gp){ +var HA=require("path").join,JA=require('@stdlib/utils/try-require/dist'),QA=require('@stdlib/assert/is-error/dist'),UA=Bp(),$u,Cp=JA(HA(__dirname,"./native.js"));QA(Cp)?$u=UA:$u=Cp;Gp.exports=$u +});var hu=c(function(Kh,WA){WA.exports=[701,301,132,57,23,10,4,1]});var zp=c(function(Vh,Vp){ +var $A=require('@stdlib/math/base/assert/is-negative-zero/dist'),hA=require('@stdlib/math/base/assert/is-nan/dist'),Kp=hu(),YA=Kp.length;function XA(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,g;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+(g-t)*i],!(m<=f&&!(o&&m===f)));g-=t)a[v+g*i]=m,r[s+g*u]=r[s+(g-t)*u];a[v+g*i]=f,r[s+g*u]=q}return a}Vp.exports=XA +});var Jp=c(function(zh,Hp){ +var dA=require('@stdlib/math/base/assert/is-negative-zero/dist'),xA=require('@stdlib/math/base/assert/is-nan/dist'),Dp=hu(),NA=Dp.length;function rL(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,g;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+(g-t)*i],!(m<=f&&!(o&&m===f)));g-=t)a[r+g*i]=m,u[s+g*v]=u[s+(g-t)*v];a[r+g*i]=f,u[s+g*v]=q}return a}Hp.exports=rL +});var Wp=c(function(Dh,Up){ +var eL=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Qp=zp(),aL=Jp();eL(Qp,"ndarray",aL);Up.exports=Qp +});var Yp=c(function(Hh,hp){ +var uL=require("path").join,iL=require('@stdlib/utils/try-require/dist'),nL=require('@stdlib/assert/is-error/dist'),vL=Wp(),Yu,$p=iL(uL(__dirname,"./native.js"));nL($p)?Yu=vL:Yu=$p;hp.exports=Yu +});var Np=c(function(Jh,xp){ +var Xp=require('@stdlib/math/base/assert/is-positive-zero/dist'),dp=require('@stdlib/math/base/assert/is-nan/dist'),sL=require('@stdlib/math/base/special/floor/dist');function tL(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=sL(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||dp(s)||s===o&&Xp(s))&&(v+=1)),s=a[r+v*i],s>f||dp(s)||s===f&&Xp(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}xp.exports=tL +});var u2=c(function(Qh,a2){ +var r2=require('@stdlib/math/base/assert/is-positive-zero/dist'),e2=require('@stdlib/math/base/assert/is-nan/dist'),oL=require('@stdlib/math/base/special/floor/dist');function fL(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=oL(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||e2(s)||s===o&&r2(s))&&(v+=1)),s=a[r+v*i],s>f||e2(s)||s===f&&r2(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}a2.exports=fL +});var v2=c(function(Uh,n2){ +var qL=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),i2=Np(),cL=u2();qL(i2,"ndarray",cL);n2.exports=i2 +});var o2=c(function(Wh,t2){ +var mL=require("path").join,lL=require('@stdlib/utils/try-require/dist'),pL=require('@stdlib/assert/is-error/dist'),gL=v2(),Xu,s2=lL(mL(__dirname,"./native.js"));pL(s2)?Xu=gL:Xu=s2;t2.exports=Xu +});var c2=c(function($h,q2){ +var ie=require('@stdlib/math/base/assert/is-negative-zero/dist'),f2=require('@stdlib/math/base/assert/is-nan/dist');function jL(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=ie(t),v=u-i;v<=s&&(f=a[v],!(f<=t&&!(r&&f===t&&ie(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&&ie(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}q2.exports=jL +});var p2=c(function(hh,l2){ +var ne=require('@stdlib/math/base/assert/is-negative-zero/dist'),m2=require('@stdlib/math/base/assert/is-nan/dist');function bL(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=ne(f),s=v-i;s<=o&&(q=a[s],!(q<=f&&!(u&&q===f&&ne(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&&ne(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}l2.exports=bL +});var b2=c(function(Yh,j2){ +var wL=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),g2=c2(),yL=p2();wL(g2,"ndarray",yL);j2.exports=g2 +});var R2=c(function(Xh,y2){ +var RL=require("path").join,kL=require('@stdlib/utils/try-require/dist'),_L=require('@stdlib/assert/is-error/dist'),EL=b2(),du,w2=kL(RL(__dirname,"./native.js"));_L(w2)?du=EL:du=w2;y2.exports=du +});var xu=c(function(dh,OL){OL.exports=[701,301,132,57,23,10,4,1]});var E2=c(function(xh,_2){ +var FL=require('@stdlib/math/base/assert/is-negative-zero/dist'),ML=require('@stdlib/math/base/assert/is-nan/dist'),k2=xu(),TL=k2.length;function SL(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}_2.exports=SL +});var M2=c(function(Nh,F2){ +var ZL=require('@stdlib/math/base/assert/is-negative-zero/dist'),PL=require('@stdlib/math/base/assert/is-nan/dist'),O2=xu(),AL=O2.length;function LL(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}F2.exports=LL +});var Z2=c(function(rY,S2){ +var BL=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),T2=E2(),CL=M2();BL(T2,"ndarray",CL);S2.exports=T2 +});var L2=c(function(eY,A2){ +var GL=require("path").join,IL=require('@stdlib/utils/try-require/dist'),KL=require('@stdlib/assert/is-error/dist'),VL=Z2(),Nu,P2=IL(GL(__dirname,"./native.js"));KL(P2)?Nu=VL:Nu=P2;A2.exports=Nu +});var ei=c(function(aY,B2){ +var zL=require('@stdlib/math/base/special/floor/dist'),DL=128;function ri(n,e,a,i){var r,u,v,s,o,t,f,q,m,p,l,g,j;if(n<=0)return 0;if(n===1||a===0)return e[i];if(r=i,n<8){for(l=0,j=0;j0)for(v=0;v0)for(s=0;s=tg(u)?s+=i-v+u:s+=u-v+i,i=v,r+=a;return i+s}og.exports=lB +});var mg=c(function(pY,cg){ +var qg=require('@stdlib/math/base/special/abs/dist');function pB(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=qg(v)?o+=r-s+v:o+=v-s+r,r=s,u+=a;return r+o}cg.exports=pB +});var gg=c(function(gY,pg){ +var gB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),lg=fg(),jB=mg();gB(lg,"ndarray",jB);pg.exports=lg +});var te=c(function(jY,bg){ +var bB=require("path").join,wB=require('@stdlib/utils/try-require/dist'),yB=require('@stdlib/assert/is-error/dist'),RB=gg(),vi,jg=wB(bB(__dirname,"./native.js"));yB(jg)?vi=RB:vi=jg;bg.exports=vi +});var yg=c(function(bY,wg){ +var kB=te();function _B(n,e,a){return kB(n,e,a)}wg.exports=_B +});var kg=c(function(wY,Rg){ +var EB=te().ndarray;function OB(n,e,a,i){return EB(n,e,a,i)}Rg.exports=OB +});var Og=c(function(yY,Eg){ +var FB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),_g=yg(),MB=kg();FB(_g,"ndarray",MB);Eg.exports=_g +});var Tg=c(function(RY,Mg){ +var TB=require("path").join,SB=require('@stdlib/utils/try-require/dist'),ZB=require('@stdlib/assert/is-error/dist'),PB=Og(),si,Fg=SB(TB(__dirname,"./native.js"));ZB(Fg)?si=PB:si=Fg;Mg.exports=si +});var Zg=c(function(kY,Sg){ +var oe=require('@stdlib/math/base/special/abs/dist');function AB(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=oe(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,oe(v)>=oe(f)?s=v-t+f:s=f-t+v,v=t,r+=s,u+=a;return i+v+r}Sg.exports=AB +});var Ag=c(function(_Y,Pg){ +var fe=require('@stdlib/math/base/special/abs/dist');function LB(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=fe(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,fe(s)>=fe(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=a;return r+s+u}Pg.exports=LB +});var Cg=c(function(EY,Bg){ +var BB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Lg=Zg(),CB=Ag();BB(Lg,"ndarray",CB);Bg.exports=Lg +});var Kg=c(function(OY,Ig){ +var GB=require("path").join,IB=require('@stdlib/utils/try-require/dist'),KB=require('@stdlib/assert/is-error/dist'),VB=Cg(),ti,Gg=IB(GB(__dirname,"./native.js"));KB(Gg)?ti=VB:ti=Gg;Ig.exports=ti +});var zg=c(function(FY,Vg){ +var oi=6;function zB(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%oi,u>0)for(v=0;v0)for(s=0;s0)for(u=0;u0)for(s=0;s=qj(v)?o+=r-s+v:o+=v-s+r,r=s,u+=i;return r+o}cj.exports=tC +});var gj=c(function(KY,pj){ +var lj=require('@stdlib/math/base/special/abs/dist');function oC(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=lj(s)?t+=u-o+s:t+=s-o+u,u=o,v+=i;return u+t}pj.exports=oC +});var me=c(function(VY,bj){ +var fC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),jj=mj(),qC=gj();fC(jj,"ndarray",qC);bj.exports=jj +});var yj=c(function(zY,wj){ +var cC=me();function mC(n,e,a,i){return cC(n,e,a,i)}wj.exports=mC +});var kj=c(function(DY,Rj){ +var lC=me().ndarray;function pC(n,e,a,i,r){return lC(n,e,a,i,r)}Rj.exports=pC +});var Oj=c(function(HY,Ej){ +var gC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),_j=yj(),jC=kj();gC(_j,"ndarray",jC);Ej.exports=_j +});var Mj=c(function(JY,Fj){ +var le=require('@stdlib/math/base/special/abs/dist');function bC(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=le(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,le(s)>=le(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=i;return r+s+u}Fj.exports=bC +});var Sj=c(function(QY,Tj){ +var pe=require('@stdlib/math/base/special/abs/dist');function wC(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=pe(f)?m=u-q+f:m=f-q+u,u=q,q=o+m,pe(o)>=pe(m)?t=o-q+m:t=m-q+o,o=q,v+=t,s+=i;return u+o+v}Tj.exports=wC +});var Aj=c(function(UY,Pj){ +var yC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Zj=Mj(),RC=Sj();yC(Zj,"ndarray",RC);Pj.exports=Zj +});var Bj=c(function(WY,Lj){ +function kC(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=Nj(t)?q+=o-f+t:q+=t-f+o,o=f,r[s]=o+q,v+=i,s+=u;return r}rb.exports=KC +});var ib=c(function(aX,ub){ +var ab=require('@stdlib/math/base/special/abs/dist');function VC(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=ab(q)?p+=f-m+q:p+=q-m+f,f=m,u[t]=f+p,o+=i,t+=v;return u}ub.exports=VC +});var ge=c(function(uX,vb){ +var zC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),nb=eb(),DC=ib();zC(nb,"ndarray",DC);vb.exports=nb +});var tb=c(function(iX,sb){ +var HC=ge();function JC(n,e,a,i,r,u){return HC(n,e,a,i,r,u)}sb.exports=JC +});var fb=c(function(nX,ob){ +var QC=ge().ndarray;function UC(n,e,a,i,r,u,v,s){return QC(n,e,a,i,r,u,v,s)}ob.exports=UC +});var mb=c(function(vX,cb){ +var WC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),qb=tb(),$C=fb();WC(qb,"ndarray",$C);cb.exports=qb +});var pb=c(function(sX,lb){ +var je=require('@stdlib/math/base/special/abs/dist');function hC(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=je(q)?p=e-m+q:p=q-m+e,e=m,m=t+p,je(t)>=je(p)?f=t-m+p:f=p-m+t,t=m,v+=f,r[o]=e+t+v,s+=i,o+=u;return r}lb.exports=hC +});var jb=c(function(tX,gb){ +var be=require('@stdlib/math/base/special/abs/dist');function YC(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,g,j;if(n<=0)return u;for(t=r,f=s,o=0,q=0,j=0;j=be(p)?g=e-l+p:g=p-l+e,e=l,l=q+g,be(q)>=be(g)?m=q-l+g:m=g-l+q,q=l,o+=m,u[f]=e+q+o,t+=i,f+=v;return u}gb.exports=YC +});var yb=c(function(oX,wb){ +var XC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),bb=pb(),dC=jb();XC(bb,"ndarray",dC);wb.exports=bb +});var kb=c(function(fX,Rb){ +function xC(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=db(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}xb.exports=FG +});var uw=c(function(OX,aw){ +var rw=require('@stdlib/math/base/assert/is-nan/dist'),ew=require('@stdlib/math/base/special/abs/dist');function MG(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 rw(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=ew(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}aw.exports=MG +});var vw=c(function(FX,nw){ +var TG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),iw=Nb(),SG=uw();TG(iw,"ndarray",SG);nw.exports=iw +});var fw=c(function(MX,ow){ +var sw=require('@stdlib/math/base/assert/is-nan/dist'),tw=require('@stdlib/math/base/special/abs/dist');function ZG(n,e,a){var i,r,u,v,s,o;if(n<=0)return 0;if(n===1||a===0)return sw(e[0])?0:e[0];for(a<0?r=(1-n)*a:r=0,i=0,s=0,o=0;o=tw(u)?s+=i-v+u:s+=u-v+i,i=v),r+=a;return i+s}ow.exports=ZG +});var lw=c(function(TX,mw){ +var qw=require('@stdlib/math/base/assert/is-nan/dist'),cw=require('@stdlib/math/base/special/abs/dist');function PG(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return qw(e[i])?0:e[i];for(u=i,r=0,o=0,t=0;t=cw(v)?o+=r-s+v:o+=v-s+r,r=s),u+=a;return r+o}mw.exports=PG +});var ye=c(function(SX,gw){ +var AG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),pw=fw(),LG=lw();AG(pw,"ndarray",LG);gw.exports=pw +});var bw=c(function(ZX,jw){ +var BG=ye();function CG(n,e,a){return BG(n,e,a)}jw.exports=CG +});var yw=c(function(PX,ww){ +var GG=ye().ndarray;function IG(n,e,a,i){return GG(n,e,a,i)}ww.exports=IG +});var _w=c(function(AX,kw){ +var KG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Rw=bw(),VG=yw();KG(Rw,"ndarray",VG);kw.exports=Rw +});var Fw=c(function(LX,Ow){ +var Ew=require('@stdlib/math/base/assert/is-nan/dist'),Re=require('@stdlib/math/base/special/abs/dist');function zG(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return Ew(e[0])?0:e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=Re(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,Re(v)>=Re(f)?s=v-t+f:s=f-t+v,v=t,r+=s),u+=a;return i+v+r}Ow.exports=zG +});var Sw=c(function(BX,Tw){ +var Mw=require('@stdlib/math/base/assert/is-nan/dist'),ke=require('@stdlib/math/base/special/abs/dist');function DG(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 Mw(e[i])?0:e[i];for(v=i,r=0,u=0,s=0,m=0;m=ke(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,ke(s)>=ke(q)?o=s-f+q:o=q-f+s,s=f,u+=o),v+=a;return r+s+u}Tw.exports=DG +});var Aw=c(function(CX,Pw){ +var HG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Zw=Fw(),JG=Sw();HG(Zw,"ndarray",JG);Pw.exports=Zw +});var Cw=c(function(GX,Bw){ +var Lw=require('@stdlib/math/base/assert/is-nan/dist');function QG(n,e,a){var i,r,u;if(r=0,n<=0)return r;if(n===1||a===0)return Lw(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(j-=1,j===0)return a;l=v+j*i,m=a[l],g=s+j*u,p=r[g],a[l]=a[v],r[g]=r[s]}for(b=o,t=b*2+1;tq||iy(f)||f===q&&uy(f))&&(t+=1)),f=a[v+t*i],f>m||iy(f)||f===m&&uy(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}}ny.exports=mI +});var fy=c(function($X,oy){ +var sy=require('@stdlib/math/base/assert/is-positive-zero/dist'),ty=require('@stdlib/math/base/assert/is-nan/dist'),lI=require('@stdlib/math/base/special/floor/dist');function pI(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,g,j,b,R;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),j=n,o=lI(n/2);;){if(o>0)o-=1,m=a[r+o*i],p=u[s+o*v];else{if(j-=1,j===0)return a;l=r+j*i,m=a[l],g=s+j*v,p=u[g],a[l]=a[r],u[g]=u[s]}for(b=o,t=b*2+1;tq||ty(f)||f===q&&sy(f))&&(t+=1)),f=a[r+t*i],f>m||ty(f)||f===m&&sy(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}}oy.exports=pI +});var my=c(function(hX,cy){ +var gI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),qy=vy(),jI=fy();gI(qy,"ndarray",jI);cy.exports=qy +});var gy=c(function(YX,py){ +var Ee=require('@stdlib/math/base/assert/is-negative-zero/dist'),ly=require('@stdlib/math/base/assert/is-nan/dist');function bI(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,g,j,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]=g,r[l]=j}else{for(v=Ee(g),o=s-i,m=q-u;o<=t&&(b=a[o],!(b<=g&&!(v&&b===g&&Ee(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=g,r[m+u]=j,s+=i,q+=u}return a}for(t=0,f=(n-1)*i,s=t+i,R=1;R=t&&(b=a[o],!(b<=g&&!(v&&b===g&&Ee(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=g,r[m+u]=j,s+=i,q+=u}return a}py.exports=bI +});var wy=c(function(XX,by){ +var Oe=require('@stdlib/math/base/assert/is-negative-zero/dist'),jy=require('@stdlib/math/base/assert/is-nan/dist');function wI(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,g,j,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,g=s,j=g+(n-1)*v,p=g+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[j]=R}else{for(o=Oe(b),f=t-i,l=p-v;f<=q&&(_=a[f],!(_<=b&&!(o&&_===b&&Oe(_)===!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&&Oe(_)===!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}by.exports=wI +});var ky=c(function(dX,Ry){ +var yI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),yy=gy(),RI=wy();yI(yy,"ndarray",RI);Ry.exports=yy +});var Mi=c(function(xX,kI){kI.exports=[701,301,132,57,23,10,4,1]});var Oy=c(function(NX,Ey){ +var _I=require('@stdlib/math/base/assert/is-negative-zero/dist'),EI=require('@stdlib/math/base/assert/is-nan/dist'),_y=Mi(),OI=_y.length;function FI(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,g;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+(g-t)*i],!(m<=f&&!(o&&m===f)));g-=t)a[v+g*i]=m,r[s+g*u]=r[s+(g-t)*u];a[v+g*i]=f,r[s+g*u]=q}return a}Ey.exports=FI +});var Ty=c(function(rd,My){ +var MI=require('@stdlib/math/base/assert/is-negative-zero/dist'),TI=require('@stdlib/math/base/assert/is-nan/dist'),Fy=Mi(),SI=Fy.length;function ZI(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,g;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+(g-t)*i],!(m<=f&&!(o&&m===f)));g-=t)a[r+g*i]=m,u[s+g*v]=u[s+(g-t)*v];a[r+g*i]=f,u[s+g*v]=q}return a}My.exports=ZI +});var Py=c(function(ed,Zy){ +var PI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Sy=Oy(),AI=Ty();PI(Sy,"ndarray",AI);Zy.exports=Sy +});var Cy=c(function(ad,By){ +var Ay=require('@stdlib/math/base/assert/is-positive-zero/dist'),Ly=require('@stdlib/math/base/assert/is-nan/dist'),LI=require('@stdlib/math/base/special/floor/dist');function BI(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=LI(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||Ly(s)||s===o&&Ay(s))&&(v+=1)),s=a[r+v*i],s>f||Ly(s)||s===f&&Ay(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}By.exports=BI +});var Vy=c(function(ud,Ky){ +var Gy=require('@stdlib/math/base/assert/is-positive-zero/dist'),Iy=require('@stdlib/math/base/assert/is-nan/dist'),CI=require('@stdlib/math/base/special/floor/dist');function GI(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=CI(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||Iy(s)||s===o&&Gy(s))&&(v+=1)),s=a[r+v*i],s>f||Iy(s)||s===f&&Gy(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}Ky.exports=GI +});var Hy=c(function(id,Dy){ +var II=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),zy=Cy(),KI=Vy();II(zy,"ndarray",KI);Dy.exports=zy +});var Uy=c(function(nd,Qy){ +var Fe=require('@stdlib/math/base/assert/is-negative-zero/dist'),Jy=require('@stdlib/math/base/assert/is-nan/dist');function VI(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=Fe(t),v=u-i;v<=s&&(f=a[v],!(f<=t&&!(r&&f===t&&Fe(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&&Fe(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}Qy.exports=VI +});var hy=c(function(vd,$y){ +var Me=require('@stdlib/math/base/assert/is-negative-zero/dist'),Wy=require('@stdlib/math/base/assert/is-nan/dist');function zI(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=Me(f),s=v-i;s<=o&&(q=a[s],!(q<=f&&!(u&&q===f&&Me(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&&Me(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}$y.exports=zI +});var dy=c(function(sd,Xy){ +var DI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Yy=Uy(),HI=hy();DI(Yy,"ndarray",HI);Xy.exports=Yy +});var Ti=c(function(td,JI){JI.exports=[701,301,132,57,23,10,4,1]});var rR=c(function(od,Ny){ +var QI=require('@stdlib/math/base/assert/is-negative-zero/dist'),UI=require('@stdlib/math/base/assert/is-nan/dist'),xy=Ti(),WI=xy.length;function $I(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}Ny.exports=$I +});var uR=c(function(fd,aR){ +var hI=require('@stdlib/math/base/assert/is-negative-zero/dist'),YI=require('@stdlib/math/base/assert/is-nan/dist'),eR=Ti(),XI=eR.length;function dI(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}aR.exports=dI +});var vR=c(function(qd,nR){ +var xI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),iR=rR(),NI=uR();xI(iR,"ndarray",NI);nR.exports=iR +});var oR=c(function(cd,tR){ +var sR=require('@stdlib/math/base/special/abs/dist');function rK(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=sR(u)?s+=i-v+u:s+=u-v+i,i=v,r+=a;return i+s}tR.exports=rK +});var cR=c(function(md,qR){ +var fR=require('@stdlib/math/base/special/abs/dist');function eK(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=fR(v)?o+=r-s+v:o+=v-s+r,r=s,u+=a;return r+o}qR.exports=eK +});var Te=c(function(ld,lR){ +var aK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),mR=oR(),uK=cR();aK(mR,"ndarray",uK);lR.exports=mR +});var gR=c(function(pd,pR){ +var iK=Te();function nK(n,e,a){return iK(n,e,a)}pR.exports=nK +});var bR=c(function(gd,jR){ +var vK=Te().ndarray;function sK(n,e,a,i){return vK(n,e,a,i)}jR.exports=sK +});var RR=c(function(jd,yR){ +var tK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),wR=gR(),oK=bR();tK(wR,"ndarray",oK);yR.exports=wR +});var _R=c(function(bd,kR){ +var Se=require('@stdlib/math/base/special/abs/dist');function fK(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}kR.exports=fK +});var OR=c(function(wd,ER){ +var Ze=require('@stdlib/math/base/special/abs/dist');function qK(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=Ze(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,Ze(s)>=Ze(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=a;return r+s+u}ER.exports=qK +});var TR=c(function(yd,MR){ +var cK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),FR=_R(),mK=OR();cK(FR,"ndarray",mK);MR.exports=FR +});var ZR=c(function(Rd,SR){ +var Si=6;function lK(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%Si,r>0)for(v=0;v0)for(s=0;s0)for(u=0;u0)for(s=0;s=xR(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)}NR.exports=AK +});var uk=c(function(Ad,ak){ +var $=require('@stdlib/number/float64/base/to-float32/dist'),ek=require('@stdlib/math/base/special/abs/dist');function LK(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=ek(s)?t=$(t+$($(u-o)+s)):t=$(t+$($(s-o)+u)),u=o,v+=i;return $(u+t)}ak.exports=LK +});var vk=c(function(Ld,nk){ +var BK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),ik=rk(),CK=uk();BK(ik,"ndarray",CK);nk.exports=ik +});var Le=c(function(Bd,tk){ +var GK=require("path").join,IK=require('@stdlib/utils/try-require/dist'),KK=require('@stdlib/assert/is-error/dist'),VK=vk(),Bi,sk=IK(GK(__dirname,"./native.js"));KK(sk)?Bi=VK:Bi=sk;tk.exports=Bi +});var fk=c(function(Cd,ok){ +var zK=Le();function DK(n,e,a,i){return zK(n,e,a,i)}ok.exports=DK +});var ck=c(function(Gd,qk){ +var HK=Le().ndarray;function JK(n,e,a,i,r){return HK(n,e,a,i,r)}qk.exports=JK +});var pk=c(function(Id,lk){ +var QK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),mk=fk(),UK=ck();QK(mk,"ndarray",UK);lk.exports=mk +});var bk=c(function(Kd,jk){ +var WK=require("path").join,$K=require('@stdlib/utils/try-require/dist'),hK=require('@stdlib/assert/is-error/dist'),YK=pk(),Ci,gk=$K(WK(__dirname,"./native.js"));hK(gk)?Ci=YK:Ci=gk;jk.exports=Ci +});var yk=c(function(Vd,wk){ +var K=require('@stdlib/number/float64/base/to-float32/dist'),Be=require('@stdlib/math/base/special/abs/dist');function XK(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=Be(t)?q=K(K(r-f)+t):q=K(K(t-f)+r),r=f,f=K(s+q),Be(s)>=Be(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))}wk.exports=XK +});var kk=c(function(zd,Rk){ +var V=require('@stdlib/number/float64/base/to-float32/dist'),Ce=require('@stdlib/math/base/special/abs/dist');function dK(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=Ce(f)?m=V(V(u-q)+f):m=V(V(f-q)+u),u=q,q=V(o+m),Ce(o)>=Ce(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))}Rk.exports=dK +});var Ok=c(function(Dd,Ek){ +var xK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),_k=yk(),NK=kk();xK(_k,"ndarray",NK);Ek.exports=_k +});var Tk=c(function(Hd,Mk){ +var rV=require("path").join,eV=require('@stdlib/utils/try-require/dist'),aV=require('@stdlib/assert/is-error/dist'),uV=Ok(),Gi,Fk=eV(rV(__dirname,"./native.js"));aV(Fk)?Gi=uV:Gi=Fk;Mk.exports=Gi +});var Zk=c(function(Jd,Sk){ +var Ii=require('@stdlib/number/float64/base/to-float32/dist');function iV(n,e,a,i){var r,u,v;if(n<=0)return 0;if(n===1||i===0)return Ii(e+a[0]);for(i<0?u=(1-n)*i:u=0,r=0,v=0;v=i3(t)?q=ur(q+ur(ur(o-f)+t)):q=ur(q+ur(ur(t-f)+o)),o=f,r[s]=ur(o+q),v+=i,s+=u;return r}n3.exports=LV +});var o3=c(function(ax,t3){ +var ir=require('@stdlib/number/float64/base/to-float32/dist'),s3=require('@stdlib/math/base/special/abs/dist');function BV(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=s3(q)?p=ir(p+ir(ir(f-m)+q)):p=ir(p+ir(ir(q-m)+f)),f=m,u[t]=ir(f+p),o+=i,t+=v;return u}t3.exports=BV +});var c3=c(function(ux,q3){ +var CV=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),f3=v3(),GV=o3();CV(f3,"ndarray",GV);q3.exports=f3 +});var Ge=c(function(ix,l3){ +var IV=require("path").join,KV=require('@stdlib/utils/try-require/dist'),VV=require('@stdlib/assert/is-error/dist'),zV=c3(),$i,m3=KV(IV(__dirname,"./native.js"));VV(m3)?$i=zV:$i=m3;l3.exports=$i +});var g3=c(function(nx,p3){ +var DV=Ge();function HV(n,e,a,i,r,u){return DV(n,e,a,i,r,u)}p3.exports=HV +});var b3=c(function(vx,j3){ +var JV=Ge().ndarray;function QV(n,e,a,i,r,u,v,s){return JV(n,e,a,i,r,u,v,s)}j3.exports=QV +});var R3=c(function(sx,y3){ +var UV=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),w3=g3(),WV=b3();UV(w3,"ndarray",WV);y3.exports=w3 +});var E3=c(function(tx,_3){ +var $V=require("path").join,hV=require('@stdlib/utils/try-require/dist'),YV=require('@stdlib/assert/is-error/dist'),XV=R3(),hi,k3=hV($V(__dirname,"./native.js"));YV(k3)?hi=XV:hi=k3;_3.exports=hi +});var F3=c(function(ox,O3){ +var z=require('@stdlib/number/float64/base/to-float32/dist'),Ie=require('@stdlib/math/base/special/abs/dist');function dV(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=Ie(q)?p=z(z(e-m)+q):p=z(z(q-m)+e),e=m,m=z(t+p),Ie(t)>=Ie(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}O3.exports=dV +});var T3=c(function(fx,M3){ +var D=require('@stdlib/number/float64/base/to-float32/dist'),Ke=require('@stdlib/math/base/special/abs/dist');function xV(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,g,j;if(n<=0)return u;for(t=r,f=s,o=0,q=0,j=0;j=Ke(p)?g=D(D(e-l)+p):g=D(D(p-l)+e),e=l,l=D(q+g),Ke(q)>=Ke(g)?m=D(D(q-l)+g):m=D(D(g-l)+q),q=l,o=D(o+m),u[f]=D(e+D(q+o)),t+=i,f+=v;return u}M3.exports=xV +});var P3=c(function(qx,Z3){ +var NV=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),S3=F3(),rz=T3();NV(S3,"ndarray",rz);Z3.exports=S3 +});var B3=c(function(cx,L3){ +var ez=require("path").join,az=require('@stdlib/utils/try-require/dist'),uz=require('@stdlib/assert/is-error/dist'),iz=P3(),Yi,A3=az(ez(__dirname,"./native.js"));uz(A3)?Yi=iz:Yi=A3;L3.exports=Yi +});var G3=c(function(mx,C3){ +var nz=require('@stdlib/number/float64/base/to-float32/dist');function vz(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=l4(u)?s=tr(s+tr(tr(i-v)+u)):s=tr(s+tr(tr(u-v)+i)),i=v),r+=a;return tr(i+s)}p4.exports=DD +});var y4=c(function(Xx,w4){ +var or=require('@stdlib/number/float64/base/to-float32/dist'),j4=require('@stdlib/math/base/assert/is-nanf/dist'),b4=require('@stdlib/math/base/special/abs/dist');function HD(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return j4(e[i])?0:e[i];for(u=i,r=0,o=0,t=0;t=b4(v)?o=or(o+or(or(r-s)+v)):o=or(o+or(or(v-s)+r)),r=s),u+=a;return or(r+o)}w4.exports=HD +});var _4=c(function(dx,k4){ +var JD=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),R4=g4(),QD=y4();JD(R4,"ndarray",QD);k4.exports=R4 +});var Qe=c(function(xx,O4){ +var UD=require("path").join,WD=require('@stdlib/utils/try-require/dist'),$D=require('@stdlib/assert/is-error/dist'),hD=_4(),jn,E4=WD(UD(__dirname,"./native.js"));$D(E4)?jn=hD:jn=E4;O4.exports=jn +});var M4=c(function(Nx,F4){ +var YD=Qe();function XD(n,e,a){return YD(n,e,a)}F4.exports=XD +});var S4=c(function(rN,T4){ +var dD=Qe().ndarray;function xD(n,e,a,i){return dD(n,e,a,i)}T4.exports=xD +});var A4=c(function(eN,P4){ +var ND=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Z4=M4(),rH=S4();ND(Z4,"ndarray",rH);P4.exports=Z4 +});var C4=c(function(aN,B4){ +var eH=require("path").join,aH=require('@stdlib/utils/try-require/dist'),uH=require('@stdlib/assert/is-error/dist'),iH=A4(),bn,L4=aH(eH(__dirname,"./native.js"));uH(L4)?bn=iH:bn=L4;B4.exports=bn +});var K4=c(function(uN,I4){ +var H=require('@stdlib/number/float64/base/to-float32/dist'),G4=require('@stdlib/math/base/assert/is-nanf/dist'),Ue=require('@stdlib/math/base/special/abs/dist');function nH(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return G4(e[0])?0:e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=Ue(o)?f=H(H(i-t)+o):f=H(H(o-t)+i),i=t,t=H(v+f),Ue(v)>=Ue(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))}I4.exports=nH +});var D4=c(function(iN,z4){ +var J=require('@stdlib/number/float64/base/to-float32/dist'),V4=require('@stdlib/math/base/assert/is-nanf/dist'),We=require('@stdlib/math/base/special/abs/dist');function vH(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 V4(e[i])?0:e[i];for(v=i,r=0,u=0,s=0,m=0;m=We(t)?q=J(J(r-f)+t):q=J(J(t-f)+r),r=f,f=J(s+q),We(s)>=We(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))}z4.exports=vH +});var Q4=c(function(nN,J4){ +var sH=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),H4=K4(),tH=D4();sH(H4,"ndarray",tH);J4.exports=H4 +});var $4=c(function(vN,W4){ +var oH=require("path").join,fH=require('@stdlib/utils/try-require/dist'),qH=require('@stdlib/assert/is-error/dist'),cH=Q4(),wn,U4=fH(oH(__dirname,"./native.js"));qH(U4)?wn=cH:wn=U4;W4.exports=wn +});var X4=c(function(sN,Y4){ +var mH=require('@stdlib/number/float64/base/to-float32/dist'),h4=require('@stdlib/math/base/assert/is-nanf/dist');function lH(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(j-=1,j===0)return a;l=v+j*i,m=a[l],g=s+j*u,p=r[g],a[l]=a[v],r[g]=r[s]}for(b=o,t=b*2+1;tq||M8(f)||f===q&&F8(f))&&(t+=1)),f=a[v+t*i],f>m||M8(f)||f===m&&F8(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}}T8.exports=UH +});var L8=c(function(yN,A8){ +var Z8=require('@stdlib/math/base/assert/is-positive-zerof/dist'),P8=require('@stdlib/math/base/assert/is-nanf/dist'),WH=require('@stdlib/math/base/special/floor/dist');function $H(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,g,j,b,R;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),j=n,o=WH(n/2);;){if(o>0)o-=1,m=a[r+o*i],p=u[s+o*v];else{if(j-=1,j===0)return a;l=r+j*i,m=a[l],g=s+j*v,p=u[g],a[l]=a[r],u[g]=u[s]}for(b=o,t=b*2+1;tq||P8(f)||f===q&&Z8(f))&&(t+=1)),f=a[r+t*i],f>m||P8(f)||f===m&&Z8(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}}A8.exports=$H +});var G8=c(function(RN,C8){ +var hH=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),B8=S8(),YH=L8();hH(B8,"ndarray",YH);C8.exports=B8 +});var V8=c(function(kN,K8){ +var XH=require("path").join,dH=require('@stdlib/utils/try-require/dist'),xH=require('@stdlib/assert/is-error/dist'),NH=G8(),On,I8=dH(XH(__dirname,"./native.js"));xH(I8)?On=NH:On=I8;K8.exports=On +});var H8=c(function(_N,D8){ +var he=require('@stdlib/math/base/assert/is-negative-zerof/dist'),z8=require('@stdlib/math/base/assert/is-nanf/dist');function rJ(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,g,j,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]=g,r[l]=j}else{for(v=he(g),o=s-i,m=q-u;o<=t&&(b=a[o],!(b<=g&&!(v&&b===g&&he(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=g,r[m+u]=j,s+=i,q+=u}return a}for(t=0,f=(n-1)*i,s=t+i,R=1;R=t&&(b=a[o],!(b<=g&&!(v&&b===g&&he(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=g,r[m+u]=j,s+=i,q+=u}return a}D8.exports=rJ +});var U8=c(function(EN,Q8){ +var Ye=require('@stdlib/math/base/assert/is-negative-zerof/dist'),J8=require('@stdlib/math/base/assert/is-nanf/dist');function eJ(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,g,j,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,g=s,j=g+(n-1)*v,p=g+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[j]=R}else{for(o=Ye(b),f=t-i,l=p-v;f<=q&&(_=a[f],!(_<=b&&!(o&&_===b&&Ye(_)===!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&&Ye(_)===!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}Q8.exports=eJ +});var h8=c(function(ON,$8){ +var aJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),W8=H8(),uJ=U8();aJ(W8,"ndarray",uJ);$8.exports=W8 +});var d8=c(function(FN,X8){ +var iJ=require("path").join,nJ=require('@stdlib/utils/try-require/dist'),vJ=require('@stdlib/assert/is-error/dist'),sJ=h8(),Fn,Y8=nJ(iJ(__dirname,"./native.js"));vJ(Y8)?Fn=sJ:Fn=Y8;X8.exports=Fn +});var Mn=c(function(MN,tJ){tJ.exports=[701,301,132,57,23,10,4,1]});var rE=c(function(TN,N8){ +var oJ=require('@stdlib/math/base/assert/is-negative-zerof/dist'),fJ=require('@stdlib/math/base/assert/is-nanf/dist'),x8=Mn(),qJ=x8.length;function cJ(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,g;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+(g-t)*i],!(m<=f&&!(o&&m===f)));g-=t)a[v+g*i]=m,r[s+g*u]=r[s+(g-t)*u];a[v+g*i]=f,r[s+g*u]=q}return a}N8.exports=cJ +});var uE=c(function(SN,aE){ +var mJ=require('@stdlib/math/base/assert/is-negative-zerof/dist'),lJ=require('@stdlib/math/base/assert/is-nanf/dist'),eE=Mn(),pJ=eE.length;function gJ(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,g;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+(g-t)*i],!(m<=f&&!(o&&m===f)));g-=t)a[r+g*i]=m,u[s+g*v]=u[s+(g-t)*v];a[r+g*i]=f,u[s+g*v]=q}return a}aE.exports=gJ +});var vE=c(function(ZN,nE){ +var jJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),iE=rE(),bJ=uE();jJ(iE,"ndarray",bJ);nE.exports=iE +});var oE=c(function(PN,tE){ +var wJ=require("path").join,yJ=require('@stdlib/utils/try-require/dist'),RJ=require('@stdlib/assert/is-error/dist'),kJ=vE(),Tn,sE=yJ(wJ(__dirname,"./native.js"));RJ(sE)?Tn=kJ:Tn=sE;tE.exports=Tn +});var mE=c(function(AN,cE){ +var fE=require('@stdlib/math/base/assert/is-positive-zerof/dist'),qE=require('@stdlib/math/base/assert/is-nanf/dist'),_J=require('@stdlib/math/base/special/floor/dist');function EJ(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=_J(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||qE(s)||s===o&&fE(s))&&(v+=1)),s=a[r+v*i],s>f||qE(s)||s===f&&fE(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}cE.exports=EJ +});var jE=c(function(LN,gE){ +var lE=require('@stdlib/math/base/assert/is-positive-zerof/dist'),pE=require('@stdlib/math/base/assert/is-nanf/dist'),OJ=require('@stdlib/math/base/special/floor/dist');function FJ(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=OJ(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||pE(s)||s===o&&lE(s))&&(v+=1)),s=a[r+v*i],s>f||pE(s)||s===f&&lE(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}gE.exports=FJ +});var yE=c(function(BN,wE){ +var MJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),bE=mE(),TJ=jE();MJ(bE,"ndarray",TJ);wE.exports=bE +});var _E=c(function(CN,kE){ +var SJ=require("path").join,ZJ=require('@stdlib/utils/try-require/dist'),PJ=require('@stdlib/assert/is-error/dist'),AJ=yE(),Sn,RE=ZJ(SJ(__dirname,"./native.js"));PJ(RE)?Sn=AJ:Sn=RE;kE.exports=Sn +});var FE=c(function(GN,OE){ +var Xe=require('@stdlib/math/base/assert/is-negative-zerof/dist'),EE=require('@stdlib/math/base/assert/is-nanf/dist');function LJ(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=Xe(t),v=u-i;v<=s&&(f=a[v],!(f<=t&&!(r&&f===t&&Xe(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&&Xe(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}OE.exports=LJ +});var SE=c(function(IN,TE){ +var de=require('@stdlib/math/base/assert/is-negative-zerof/dist'),ME=require('@stdlib/math/base/assert/is-nanf/dist');function BJ(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=de(f),s=v-i;s<=o&&(q=a[s],!(q<=f&&!(u&&q===f&&de(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&&de(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}TE.exports=BJ +});var AE=c(function(KN,PE){ +var CJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),ZE=FE(),GJ=SE();CJ(ZE,"ndarray",GJ);PE.exports=ZE +});var CE=c(function(VN,BE){ +var IJ=require("path").join,KJ=require('@stdlib/utils/try-require/dist'),VJ=require('@stdlib/assert/is-error/dist'),zJ=AE(),Zn,LE=KJ(IJ(__dirname,"./native.js"));VJ(LE)?Zn=zJ:Zn=LE;BE.exports=Zn +});var Pn=c(function(zN,DJ){DJ.exports=[701,301,132,57,23,10,4,1]});var KE=c(function(DN,IE){ +var HJ=require('@stdlib/math/base/assert/is-negative-zerof/dist'),JJ=require('@stdlib/math/base/assert/is-nanf/dist'),GE=Pn(),QJ=GE.length;function UJ(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}IE.exports=UJ +});var DE=c(function(HN,zE){ +var WJ=require('@stdlib/math/base/assert/is-negative-zerof/dist'),$J=require('@stdlib/math/base/assert/is-nanf/dist'),VE=Pn(),hJ=VE.length;function YJ(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}zE.exports=YJ +});var QE=c(function(JN,JE){ +var XJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),HE=KE(),dJ=DE();XJ(HE,"ndarray",dJ);JE.exports=HE +});var $E=c(function(QN,WE){ +var xJ=require("path").join,NJ=require('@stdlib/utils/try-require/dist'),rQ=require('@stdlib/assert/is-error/dist'),eQ=QE(),An,UE=NJ(xJ(__dirname,"./native.js"));rQ(UE)?An=eQ:An=UE;WE.exports=An +});var XE=c(function(UN,YE){ +var nr=require('@stdlib/number/float64/base/to-float32/dist'),hE=require('@stdlib/math/base/special/abs/dist');function aQ(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=nr(s+nr(nr(i-v)+u)):s=nr(s+nr(nr(u-v)+i)),i=v,r+=a;return nr(i+s)}YE.exports=aQ +});var NE=c(function(WN,xE){ +var vr=require('@stdlib/number/float64/base/to-float32/dist'),dE=require('@stdlib/math/base/special/abs/dist');function uQ(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=dE(v)?o=vr(o+vr(vr(r-s)+v)):o=vr(o+vr(vr(v-s)+r)),r=s,u+=a;return vr(r+o)}xE.exports=uQ +});var a6=c(function($N,e6){ +var iQ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),r6=XE(),nQ=NE();iQ(r6,"ndarray",nQ);e6.exports=r6 +});var xe=c(function(hN,i6){ +var vQ=require("path").join,sQ=require('@stdlib/utils/try-require/dist'),tQ=require('@stdlib/assert/is-error/dist'),oQ=a6(),Ln,u6=sQ(vQ(__dirname,"./native.js"));tQ(u6)?Ln=oQ:Ln=u6;i6.exports=Ln +});var v6=c(function(YN,n6){ +var fQ=xe();function qQ(n,e,a){return fQ(n,e,a)}n6.exports=qQ +});var t6=c(function(XN,s6){ +var cQ=xe().ndarray;function mQ(n,e,a,i){return cQ(n,e,a,i)}s6.exports=mQ +});var q6=c(function(dN,f6){ +var lQ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),o6=v6(),pQ=t6();lQ(o6,"ndarray",pQ);f6.exports=o6 +});var l6=c(function(xN,m6){ +var gQ=require("path").join,jQ=require('@stdlib/utils/try-require/dist'),bQ=require('@stdlib/assert/is-error/dist'),wQ=q6(),Bn,c6=jQ(gQ(__dirname,"./native.js"));bQ(c6)?Bn=wQ:Bn=c6;m6.exports=Bn +});var g6=c(function(NN,p6){ +var Q=require('@stdlib/number/float64/base/to-float32/dist'),Ne=require('@stdlib/math/base/special/abs/dist');function yQ(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=Ne(o)?f=Q(Q(i-t)+o):f=Q(Q(o-t)+i),i=t,t=Q(v+f),Ne(v)>=Ne(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))}p6.exports=yQ +});var b6=c(function(rrr,j6){ +var U=require('@stdlib/number/float64/base/to-float32/dist'),ra=require('@stdlib/math/base/special/abs/dist');function RQ(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=ra(t)?q=U(U(r-f)+t):q=U(U(t-f)+r),r=f,f=U(s+q),ra(s)>=ra(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))}j6.exports=RQ +});var R6=c(function(err,y6){ +var kQ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),w6=g6(),_Q=b6();kQ(w6,"ndarray",_Q);y6.exports=w6 +});var E6=c(function(arr,_6){ +var EQ=require("path").join,OQ=require('@stdlib/utils/try-require/dist'),FQ=require('@stdlib/assert/is-error/dist'),MQ=R6(),Cn,k6=OQ(EQ(__dirname,"./native.js"));FQ(k6)?Cn=MQ:Cn=k6;_6.exports=Cn +});var F6=c(function(urr,O6){ +var TQ=require('@stdlib/number/float64/base/to-float32/dist');function SQ(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 reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' );\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 = 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\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 reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' );\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 = 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\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\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\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\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n*\n* var out = dnrm2( 3, 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\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n*\n* var out = dnrm2( 4, 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*\n* var out = dnrm2( 3, x, 1 );\n* // returns 3.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\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*\n* var out = dnrm2.ndarray( 4, 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*\n* dscal( 3, 5.0, 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\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\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 - output array\n* @param {integer} strideY - `y` stride length\n* @returns {NumericArray} output array\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 - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {NumericArray} output array\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 - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Collection} output array\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 - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Collection} output array\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\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\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/**\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 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* 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 absf = require( '@stdlib/math/base/special/absf' );\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 + absf( 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 absf = require( '@stdlib/math/base/special/absf' );\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 + absf( 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 sqrtf = require( '@stdlib/math/base/special/sqrtf' );\nvar absf = require( '@stdlib/math/base/special/absf' );\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*\n* var z = snrm2( x.length, x, 1 );\n* // returns 3.0\n*/\nfunction snrm2( N, x, stride ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar v;\n\tvar i;\n\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn absf( 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 = absf( x[ i ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tv = float64ToFloat32( scale/ax );\n\t\t\t\tssq = float64ToFloat32( 1.0 + float64ToFloat32( ssq * float64ToFloat32( v*v ) ) ); // eslint-disable-line max-len\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tv = float64ToFloat32( ax/scale );\n\t\t\t\tssq = float64ToFloat32( ssq + float64ToFloat32( v*v ) );\n\t\t\t}\n\t\t}\n\t}\n\treturn float64ToFloat32( scale * sqrtf( 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 sqrtf = require( '@stdlib/math/base/special/sqrtf' );\nvar absf = require( '@stdlib/math/base/special/absf' );\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 v;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn absf( 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 = absf( x[ ix ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tv = float64ToFloat32( scale/ax );\n\t\t\t\tssq = float64ToFloat32( 1.0 + float64ToFloat32( ssq * float64ToFloat32( v*v ) ) ); // eslint-disable-line max-len\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tv = float64ToFloat32( ax/scale );\n\t\t\t\tssq = float64ToFloat32( ssq + float64ToFloat32( v*v ) );\n\t\t\t}\n\t\t}\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( scale * sqrtf( 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*\n* var z = snrm2( x.length, x, 1 );\n* // returns 3.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\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*\n* var z = snrm2.ndarray( 4, 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": "uGAAA,IAAAA,GAAAC,EAAA,SAAAC,GAAAC,GAAA,cAsBA,IAAIC,GAAc,QAAS,4CAA6C,EAkCxE,SAASC,GAAOC,EAAGC,EAAGC,EAASC,EAAGC,EAAU,CAC3C,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEJ,GAAKX,GAAK,EACT,OAAOG,EAIR,GAFAE,EAAQP,GAAaG,EAAG,CAAE,EAC1BK,EAAQR,GAAaK,EAAG,CAAE,EACrBD,IAAY,GAAKE,IAAY,EAAI,CACrC,IAAMO,EAAI,EAAGA,EAAIX,EAAE,EAAGW,GAAK,EAC1BL,EAAOK,CAAE,EAAIN,EAAOM,CAAE,EACtBL,EAAOK,EAAE,CAAE,EAAIN,EAAOM,EAAE,CAAE,EAE3B,OAAOR,CACR,CAaA,IAZKD,EAAU,EACdO,EAAK,GAAK,EAAET,GAAKE,EAEjBO,EAAK,EAEDL,EAAU,EACdM,EAAK,GAAK,EAAEV,GAAKI,EAEjBM,EAAK,EAENH,EAAKL,EAAU,EACfM,EAAKJ,EAAU,EACTO,EAAI,EAAGA,EAAIX,EAAGW,IACnBL,EAAOI,CAAG,EAAIL,EAAOI,CAAG,EACxBH,EAAOI,EAAG,CAAE,EAAIL,EAAOI,EAAG,CAAE,EAC5BA,GAAMF,EACNG,GAAMF,EAEP,OAAOL,CACR,CAKAN,GAAO,QAAUE,KCrGjB,IAAAa,GAAAC,EAAA,SAAAC,GAAAC,GAAA,cAsBA,IAAI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"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", "reinterpret", "cswap", "N", "x", "strideX", "y", "strideY", "viewX", "viewY", "tmp", "sx", "sy", "ix", "iy", "i", "j", "require_ndarray", "__commonJSMin", "exports", "module", "reinterpret", "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_main", "__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_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "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", "absf", "float64ToFloat32", "sasum", "N", "x", "stride", "sum", "i", "require_ndarray", "__commonJSMin", "exports", "module", "absf", "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", "sqrtf", "absf", "float64ToFloat32", "snrm2", "N", "x", "stride", "scale", "ssq", "ax", "i", "require_ndarray", "__commonJSMin", "exports", "module", "sqrtf", "absf", "float64ToFloat32", "snrm2", "N", "x", "stride", "offset", "scale", "ssq", "ax", "ix", "v", "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"] + "sources": ["../base/ccopy/lib/ccopy.js", "../base/ccopy/lib/ndarray.js", "../base/ccopy/lib/main.js", "../base/ccopy/lib/index.js", "../base/cswap/lib/cswap.js", "../base/cswap/lib/ndarray.js", "../base/cswap/lib/main.js", "../base/cswap/lib/index.js", "../base/dasum/lib/dasum.js", "../base/dasum/lib/ndarray.js", "../base/dasum/lib/main.js", "../base/dasum/lib/index.js", "../base/daxpy/lib/daxpy.js", "../base/daxpy/lib/ndarray.js", "../base/daxpy/lib/main.js", "../base/daxpy/lib/index.js", "../base/dcopy/lib/dcopy.js", "../base/dcopy/lib/ndarray.js", "../base/dcopy/lib/main.js", "../base/dcopy/lib/index.js", "../base/ddot/lib/ddot.js", "../base/ddot/lib/ndarray.js", "../base/ddot/lib/main.js", "../base/ddot/lib/index.js", "../base/dnrm2/lib/dnrm2.js", "../base/dnrm2/lib/ndarray.js", "../base/dnrm2/lib/main.js", "../base/dnrm2/lib/index.js", "../base/drotg/lib/assign.js", "../base/drotg/lib/main.js", "../base/drotg/lib/index.js", "../base/dscal/lib/dscal.js", "../base/dscal/lib/ndarray.js", "../base/dscal/lib/main.js", "../base/dscal/lib/index.js", "../base/dsdot/lib/dsdot.js", "../base/dsdot/lib/ndarray.js", "../base/dsdot/lib/main.js", "../base/dsdot/lib/index.js", "../base/dswap/lib/dswap.js", "../base/dswap/lib/ndarray.js", "../base/dswap/lib/main.js", "../base/dswap/lib/index.js", "../base/gasum/lib/main.js", "../base/gasum/lib/ndarray.js", "../base/gasum/lib/index.js", "../base/gaxpy/lib/main.js", "../base/gaxpy/lib/ndarray.js", "../base/gaxpy/lib/index.js", "../base/gcopy/lib/accessors.js", "../base/gcopy/lib/main.js", "../base/gcopy/lib/ndarray.js", "../base/gcopy/lib/index.js", "../base/gdot/lib/main.js", "../base/gdot/lib/ndarray.js", "../base/gdot/lib/index.js", "../base/gnrm2/lib/main.js", "../base/gnrm2/lib/ndarray.js", "../base/gnrm2/lib/index.js", "../base/gscal/lib/main.js", "../base/gscal/lib/ndarray.js", "../base/gscal/lib/index.js", "../base/gswap/lib/accessors.js", "../base/gswap/lib/main.js", "../base/gswap/lib/ndarray.js", "../base/gswap/lib/index.js", "../base/sasum/lib/sasum.js", "../base/sasum/lib/ndarray.js", "../base/sasum/lib/main.js", "../base/sasum/lib/index.js", "../base/saxpy/lib/saxpy.js", "../base/saxpy/lib/ndarray.js", "../base/saxpy/lib/main.js", "../base/saxpy/lib/index.js", "../base/scopy/lib/scopy.js", "../base/scopy/lib/ndarray.js", "../base/scopy/lib/main.js", "../base/scopy/lib/index.js", "../base/sdot/lib/sdot.js", "../base/sdot/lib/ndarray.js", "../base/sdot/lib/main.js", "../base/sdot/lib/index.js", "../base/sdsdot/lib/sdsdot.js", "../base/sdsdot/lib/ndarray.js", "../base/sdsdot/lib/main.js", "../base/sdsdot/lib/index.js", "../base/snrm2/lib/snrm2.js", "../base/snrm2/lib/ndarray.js", "../base/snrm2/lib/main.js", "../base/snrm2/lib/index.js", "../base/srotg/lib/assign.js", "../base/srotg/lib/main.js", "../base/srotg/lib/index.js", "../base/sscal/lib/sscal.js", "../base/sscal/lib/ndarray.js", "../base/sscal/lib/main.js", "../base/sscal/lib/index.js", "../base/sswap/lib/sswap.js", "../base/sswap/lib/ndarray.js", "../base/sswap/lib/main.js", "../base/sswap/lib/index.js", "../base/lib/index.js", "../ddot/lib/main.js", "../ddot/lib/index.js", "../dswap/lib/main.js", "../dswap/lib/index.js", "../ext/base/dapx/lib/dapx.js", "../ext/base/dapx/lib/ndarray.js", "../ext/base/dapx/lib/main.js", "../ext/base/dapx/lib/index.js", "../ext/base/dapxsumkbn/lib/dapxsumkbn.js", "../ext/base/dapxsumkbn/lib/ndarray.js", "../ext/base/dapxsumkbn/lib/main.js", "../ext/base/dapxsumkbn/lib/index.js", "../ext/base/dapxsum/lib/dapxsum.js", "../ext/base/dapxsum/lib/ndarray.js", "../ext/base/dapxsum/lib/main.js", "../ext/base/dapxsum/lib/index.js", "../ext/base/dapxsumkbn2/lib/dapxsumkbn2.js", "../ext/base/dapxsumkbn2/lib/ndarray.js", "../ext/base/dapxsumkbn2/lib/main.js", "../ext/base/dapxsumkbn2/lib/index.js", "../ext/base/dapxsumors/lib/dapxsumors.js", "../ext/base/dapxsumors/lib/ndarray.js", "../ext/base/dapxsumors/lib/main.js", "../ext/base/dapxsumors/lib/index.js", "../ext/base/dapxsumpw/lib/ndarray.js", "../ext/base/dapxsumpw/lib/dapxsumpw.js", "../ext/base/dapxsumpw/lib/main.js", "../ext/base/dapxsumpw/lib/index.js", "../ext/base/dasumpw/lib/ndarray.js", "../ext/base/dasumpw/lib/dasumpw.js", "../ext/base/dasumpw/lib/main.js", "../ext/base/dasumpw/lib/index.js", "../ext/base/dcusumkbn/lib/dcusumkbn.js", "../ext/base/dcusumkbn/lib/ndarray.js", "../ext/base/dcusumkbn/lib/main.js", "../ext/base/dcusumkbn/lib/index.js", "../ext/base/dcusum/lib/dcusum.js", "../ext/base/dcusum/lib/ndarray.js", "../ext/base/dcusum/lib/main.js", "../ext/base/dcusum/lib/index.js", "../ext/base/dcusumkbn2/lib/dcusumkbn2.js", "../ext/base/dcusumkbn2/lib/ndarray.js", "../ext/base/dcusumkbn2/lib/main.js", "../ext/base/dcusumkbn2/lib/index.js", "../ext/base/dcusumors/lib/dcusumors.js", "../ext/base/dcusumors/lib/ndarray.js", "../ext/base/dcusumors/lib/main.js", "../ext/base/dcusumors/lib/index.js", "../ext/base/dcusumpw/lib/ndarray.js", "../ext/base/dcusumpw/lib/dcusumpw.js", "../ext/base/dcusumpw/lib/main.js", "../ext/base/dcusumpw/lib/index.js", "../ext/base/dfill/lib/dfill.js", "../ext/base/dfill/lib/ndarray.js", "../ext/base/dfill/lib/main.js", "../ext/base/dfill/lib/index.js", "../ext/base/dnanasumors/lib/dnanasumors.js", "../ext/base/dnanasumors/lib/ndarray.js", "../ext/base/dnanasumors/lib/main.js", "../ext/base/dnanasumors/lib/index.js", "../ext/base/dnanasum/lib/dnanasum.js", "../ext/base/dnanasum/lib/ndarray.js", "../ext/base/dnanasum/lib/main.js", "../ext/base/dnanasum/lib/index.js", "../ext/base/dnannsumkbn/lib/dnannsumkbn.js", "../ext/base/dnannsumkbn/lib/ndarray.js", "../ext/base/dnannsumkbn/lib/main.js", "../ext/base/dnannsumkbn/lib/index.js", "../ext/base/dnannsum/lib/dnannsum.js", "../ext/base/dnannsum/lib/ndarray.js", "../ext/base/dnannsum/lib/main.js", "../ext/base/dnannsum/lib/index.js", "../ext/base/dnannsumkbn2/lib/dnannsumkbn2.js", "../ext/base/dnannsumkbn2/lib/ndarray.js", "../ext/base/dnannsumkbn2/lib/main.js", "../ext/base/dnannsumkbn2/lib/index.js", "../ext/base/dnannsumors/lib/dnannsumors.js", "../ext/base/dnannsumors/lib/ndarray.js", "../ext/base/dnannsumors/lib/main.js", "../ext/base/dnannsumors/lib/index.js", "../ext/base/dnannsumpw/lib/sumpw.js", "../ext/base/dnannsumpw/lib/dnannsumpw.js", "../ext/base/dnannsumpw/lib/ndarray.js", "../ext/base/dnannsumpw/lib/main.js", "../ext/base/dnannsumpw/lib/index.js", "../ext/base/dnansumkbn/lib/dnansumkbn.js", "../ext/base/dnansumkbn/lib/ndarray.js", "../ext/base/dnansumkbn/lib/main.js", "../ext/base/dnansumkbn/lib/index.js", "../ext/base/dnansum/lib/dnansum.js", "../ext/base/dnansum/lib/ndarray.js", "../ext/base/dnansum/lib/main.js", "../ext/base/dnansum/lib/index.js", "../ext/base/dnansumkbn2/lib/dnansumkbn2.js", "../ext/base/dnansumkbn2/lib/ndarray.js", "../ext/base/dnansumkbn2/lib/main.js", "../ext/base/dnansumkbn2/lib/index.js", "../ext/base/dnansumors/lib/dnansumors.js", "../ext/base/dnansumors/lib/ndarray.js", "../ext/base/dnansumors/lib/main.js", "../ext/base/dnansumors/lib/index.js", "../ext/base/dnansumpw/lib/ndarray.js", "../ext/base/dnansumpw/lib/dnansumpw.js", "../ext/base/dnansumpw/lib/main.js", "../ext/base/dnansumpw/lib/index.js", "../ext/base/drev/lib/drev.js", "../ext/base/drev/lib/ndarray.js", "../ext/base/drev/lib/main.js", "../ext/base/drev/lib/index.js", "../ext/base/dsapxsumpw/lib/ndarray.js", "../ext/base/dsapxsumpw/lib/dsapxsumpw.js", "../ext/base/dsapxsumpw/lib/main.js", "../ext/base/dsapxsumpw/lib/index.js", "../ext/base/dsapxsum/lib/dsapxsum.js", "../ext/base/dsapxsum/lib/ndarray.js", "../ext/base/dsapxsum/lib/main.js", "../ext/base/dsapxsum/lib/index.js", "../ext/base/dsnannsumors/lib/dsnannsumors.js", "../ext/base/dsnannsumors/lib/ndarray.js", "../ext/base/dsnannsumors/lib/main.js", "../ext/base/dsnannsumors/lib/index.js", "../ext/base/dsnansumpw/lib/ndarray.js", "../ext/base/dsnansumpw/lib/dsnansumpw.js", "../ext/base/dsnansumpw/lib/main.js", "../ext/base/dsnansumpw/lib/index.js", "../ext/base/dsnansum/lib/dsnansum.js", "../ext/base/dsnansum/lib/ndarray.js", "../ext/base/dsnansum/lib/main.js", "../ext/base/dsnansum/lib/index.js", "../ext/base/dsnansumors/lib/dsnansumors.js", "../ext/base/dsnansumors/lib/ndarray.js", "../ext/base/dsnansumors/lib/main.js", "../ext/base/dsnansumors/lib/index.js", "../ext/base/dsort2hp/lib/dsort2hp.js", "../ext/base/dsort2hp/lib/ndarray.js", "../ext/base/dsort2hp/lib/main.js", "../ext/base/dsort2hp/lib/index.js", "../ext/base/dsort2ins/lib/dsort2ins.js", "../ext/base/dsort2ins/lib/ndarray.js", "../ext/base/dsort2ins/lib/main.js", "../ext/base/dsort2ins/lib/index.js", "../ext/base/dsort2sh/lib/gaps.json", "../ext/base/dsort2sh/lib/dsort2sh.js", "../ext/base/dsort2sh/lib/ndarray.js", "../ext/base/dsort2sh/lib/main.js", "../ext/base/dsort2sh/lib/index.js", "../ext/base/dsorthp/lib/dsorthp.js", "../ext/base/dsorthp/lib/ndarray.js", "../ext/base/dsorthp/lib/main.js", "../ext/base/dsorthp/lib/index.js", "../ext/base/dsortins/lib/dsortins.js", "../ext/base/dsortins/lib/ndarray.js", "../ext/base/dsortins/lib/main.js", "../ext/base/dsortins/lib/index.js", "../ext/base/dsortsh/lib/gaps.json", "../ext/base/dsortsh/lib/dsortsh.js", "../ext/base/dsortsh/lib/ndarray.js", "../ext/base/dsortsh/lib/main.js", "../ext/base/dsortsh/lib/index.js", "../ext/base/dssumpw/lib/ndarray.js", "../ext/base/dssumpw/lib/dssumpw.js", "../ext/base/dssumpw/lib/main.js", "../ext/base/dssumpw/lib/index.js", "../ext/base/dssum/lib/dssum.js", "../ext/base/dssum/lib/ndarray.js", "../ext/base/dssum/lib/main.js", "../ext/base/dssum/lib/index.js", "../ext/base/dssumors/lib/dssumors.js", "../ext/base/dssumors/lib/ndarray.js", "../ext/base/dssumors/lib/main.js", "../ext/base/dssumors/lib/index.js", "../ext/base/dsumkbn/lib/dsumkbn.js", "../ext/base/dsumkbn/lib/ndarray.js", "../ext/base/dsumkbn/lib/main.js", "../ext/base/dsumkbn/lib/index.js", "../ext/base/dsum/lib/dsum.js", "../ext/base/dsum/lib/ndarray.js", "../ext/base/dsum/lib/main.js", "../ext/base/dsum/lib/index.js", "../ext/base/dsumkbn2/lib/dsumkbn2.js", "../ext/base/dsumkbn2/lib/ndarray.js", "../ext/base/dsumkbn2/lib/main.js", "../ext/base/dsumkbn2/lib/index.js", "../ext/base/dsumors/lib/dsumors.js", "../ext/base/dsumors/lib/ndarray.js", "../ext/base/dsumors/lib/main.js", "../ext/base/dsumors/lib/index.js", "../ext/base/dsumpw/lib/ndarray.js", "../ext/base/dsumpw/lib/dsumpw.js", "../ext/base/dsumpw/lib/main.js", "../ext/base/dsumpw/lib/index.js", "../ext/base/gapx/lib/main.js", "../ext/base/gapx/lib/ndarray.js", "../ext/base/gapx/lib/index.js", "../ext/base/gapxsumkbn/lib/main.js", "../ext/base/gapxsumkbn/lib/ndarray.js", "../ext/base/gapxsumkbn/lib/index.js", "../ext/base/gapxsum/lib/main.js", "../ext/base/gapxsum/lib/ndarray.js", "../ext/base/gapxsum/lib/index.js", "../ext/base/gapxsumkbn2/lib/main.js", "../ext/base/gapxsumkbn2/lib/ndarray.js", "../ext/base/gapxsumkbn2/lib/index.js", "../ext/base/gapxsumors/lib/main.js", "../ext/base/gapxsumors/lib/ndarray.js", "../ext/base/gapxsumors/lib/index.js", "../ext/base/gapxsumpw/lib/ndarray.js", "../ext/base/gapxsumpw/lib/main.js", "../ext/base/gapxsumpw/lib/index.js", "../ext/base/gasumpw/lib/ndarray.js", "../ext/base/gasumpw/lib/main.js", "../ext/base/gasumpw/lib/index.js", "../ext/base/gcusumkbn/lib/main.js", "../ext/base/gcusumkbn/lib/ndarray.js", "../ext/base/gcusumkbn/lib/index.js", "../ext/base/gcusum/lib/main.js", "../ext/base/gcusum/lib/ndarray.js", "../ext/base/gcusum/lib/index.js", "../ext/base/gcusumkbn2/lib/main.js", "../ext/base/gcusumkbn2/lib/ndarray.js", "../ext/base/gcusumkbn2/lib/index.js", "../ext/base/gcusumors/lib/main.js", "../ext/base/gcusumors/lib/ndarray.js", "../ext/base/gcusumors/lib/index.js", "../ext/base/gcusumpw/lib/ndarray.js", "../ext/base/gcusumpw/lib/main.js", "../ext/base/gcusumpw/lib/index.js", "../ext/base/gfill/lib/accessors.js", "../ext/base/gfill/lib/main.js", "../ext/base/gfill/lib/ndarray.js", "../ext/base/gfill/lib/index.js", "../ext/base/gfill-by/lib/accessors.js", "../ext/base/gfill-by/lib/main.js", "../ext/base/gfill-by/lib/ndarray.js", "../ext/base/gfill-by/lib/index.js", "../ext/base/gnannsumkbn/lib/main.js", "../ext/base/gnannsumkbn/lib/ndarray.js", "../ext/base/gnannsumkbn/lib/index.js", "../ext/base/gnansumkbn/lib/main.js", "../ext/base/gnansumkbn/lib/ndarray.js", "../ext/base/gnansumkbn/lib/index.js", "../ext/base/gnansum/lib/main.js", "../ext/base/gnansum/lib/ndarray.js", "../ext/base/gnansum/lib/index.js", "../ext/base/gnansumkbn2/lib/main.js", "../ext/base/gnansumkbn2/lib/ndarray.js", "../ext/base/gnansumkbn2/lib/index.js", "../ext/base/gnansumors/lib/main.js", "../ext/base/gnansumors/lib/ndarray.js", "../ext/base/gnansumors/lib/index.js", "../ext/base/gnansumpw/lib/ndarray.js", "../ext/base/gnansumpw/lib/main.js", "../ext/base/gnansumpw/lib/index.js", "../ext/base/grev/lib/accessors.js", "../ext/base/grev/lib/main.js", "../ext/base/grev/lib/ndarray.js", "../ext/base/grev/lib/index.js", "../ext/base/gsort2hp/lib/main.js", "../ext/base/gsort2hp/lib/ndarray.js", "../ext/base/gsort2hp/lib/index.js", "../ext/base/gsort2ins/lib/main.js", "../ext/base/gsort2ins/lib/ndarray.js", "../ext/base/gsort2ins/lib/index.js", "../ext/base/gsort2sh/lib/gaps.json", "../ext/base/gsort2sh/lib/main.js", "../ext/base/gsort2sh/lib/ndarray.js", "../ext/base/gsort2sh/lib/index.js", "../ext/base/gsorthp/lib/main.js", "../ext/base/gsorthp/lib/ndarray.js", "../ext/base/gsorthp/lib/index.js", "../ext/base/gsortins/lib/main.js", "../ext/base/gsortins/lib/ndarray.js", "../ext/base/gsortins/lib/index.js", "../ext/base/gsortsh/lib/gaps.json", "../ext/base/gsortsh/lib/main.js", "../ext/base/gsortsh/lib/ndarray.js", "../ext/base/gsortsh/lib/index.js", "../ext/base/gsumkbn/lib/main.js", "../ext/base/gsumkbn/lib/ndarray.js", "../ext/base/gsumkbn/lib/index.js", "../ext/base/gsum/lib/main.js", "../ext/base/gsum/lib/ndarray.js", "../ext/base/gsum/lib/index.js", "../ext/base/gsumkbn2/lib/main.js", "../ext/base/gsumkbn2/lib/ndarray.js", "../ext/base/gsumkbn2/lib/index.js", "../ext/base/gsumors/lib/main.js", "../ext/base/gsumors/lib/ndarray.js", "../ext/base/gsumors/lib/index.js", "../ext/base/gsumpw/lib/ndarray.js", "../ext/base/gsumpw/lib/main.js", "../ext/base/gsumpw/lib/index.js", "../ext/base/sapx/lib/sapx.js", "../ext/base/sapx/lib/ndarray.js", "../ext/base/sapx/lib/main.js", "../ext/base/sapx/lib/index.js", "../ext/base/sapxsumkbn/lib/sapxsumkbn.js", "../ext/base/sapxsumkbn/lib/ndarray.js", "../ext/base/sapxsumkbn/lib/main.js", "../ext/base/sapxsumkbn/lib/index.js", "../ext/base/sapxsum/lib/sapxsum.js", "../ext/base/sapxsum/lib/ndarray.js", "../ext/base/sapxsum/lib/main.js", "../ext/base/sapxsum/lib/index.js", "../ext/base/sapxsumkbn2/lib/sapxsumkbn2.js", "../ext/base/sapxsumkbn2/lib/ndarray.js", "../ext/base/sapxsumkbn2/lib/main.js", "../ext/base/sapxsumkbn2/lib/index.js", "../ext/base/sapxsumors/lib/sapxsumors.js", "../ext/base/sapxsumors/lib/ndarray.js", "../ext/base/sapxsumors/lib/main.js", "../ext/base/sapxsumors/lib/index.js", "../ext/base/sapxsumpw/lib/ndarray.js", "../ext/base/sapxsumpw/lib/sapxsumpw.js", "../ext/base/sapxsumpw/lib/main.js", "../ext/base/sapxsumpw/lib/index.js", "../ext/base/sasumpw/lib/ndarray.js", "../ext/base/sasumpw/lib/sasumpw.js", "../ext/base/sasumpw/lib/main.js", "../ext/base/sasumpw/lib/index.js", "../ext/base/scusumkbn/lib/scusumkbn.js", "../ext/base/scusumkbn/lib/ndarray.js", "../ext/base/scusumkbn/lib/main.js", "../ext/base/scusumkbn/lib/index.js", "../ext/base/scusum/lib/scusum.js", "../ext/base/scusum/lib/ndarray.js", "../ext/base/scusum/lib/main.js", "../ext/base/scusum/lib/index.js", "../ext/base/scusumkbn2/lib/scusumkbn2.js", "../ext/base/scusumkbn2/lib/ndarray.js", "../ext/base/scusumkbn2/lib/main.js", "../ext/base/scusumkbn2/lib/index.js", "../ext/base/scusumors/lib/scusumors.js", "../ext/base/scusumors/lib/ndarray.js", "../ext/base/scusumors/lib/main.js", "../ext/base/scusumors/lib/index.js", "../ext/base/scusumpw/lib/ndarray.js", "../ext/base/scusumpw/lib/scusumpw.js", "../ext/base/scusumpw/lib/main.js", "../ext/base/scusumpw/lib/index.js", "../ext/base/sdsapxsumpw/lib/ndarray.js", "../ext/base/sdsapxsumpw/lib/sdsapxsumpw.js", "../ext/base/sdsapxsumpw/lib/main.js", "../ext/base/sdsapxsumpw/lib/index.js", "../ext/base/sdsapxsum/lib/sdsapxsum.js", "../ext/base/sdsapxsum/lib/ndarray.js", "../ext/base/sdsapxsum/lib/main.js", "../ext/base/sdsapxsum/lib/index.js", "../ext/base/sdsnansumpw/lib/ndarray.js", "../ext/base/sdsnansumpw/lib/sdsnansumpw.js", "../ext/base/sdsnansumpw/lib/main.js", "../ext/base/sdsnansumpw/lib/index.js", "../ext/base/sdsnansum/lib/sdsnansum.js", "../ext/base/sdsnansum/lib/ndarray.js", "../ext/base/sdsnansum/lib/main.js", "../ext/base/sdsnansum/lib/index.js", "../ext/base/sdssumpw/lib/ndarray.js", "../ext/base/sdssumpw/lib/sdssumpw.js", "../ext/base/sdssumpw/lib/main.js", "../ext/base/sdssumpw/lib/index.js", "../ext/base/sdssum/lib/sdssum.js", "../ext/base/sdssum/lib/ndarray.js", "../ext/base/sdssum/lib/main.js", "../ext/base/sdssum/lib/index.js", "../ext/base/sfill/lib/sfill.js", "../ext/base/sfill/lib/ndarray.js", "../ext/base/sfill/lib/main.js", "../ext/base/sfill/lib/index.js", "../ext/base/snansumkbn/lib/snansumkbn.js", "../ext/base/snansumkbn/lib/ndarray.js", "../ext/base/snansumkbn/lib/main.js", "../ext/base/snansumkbn/lib/index.js", "../ext/base/snansum/lib/snansum.js", "../ext/base/snansum/lib/ndarray.js", "../ext/base/snansum/lib/main.js", "../ext/base/snansum/lib/index.js", "../ext/base/snansumkbn2/lib/snansumkbn2.js", "../ext/base/snansumkbn2/lib/ndarray.js", "../ext/base/snansumkbn2/lib/main.js", "../ext/base/snansumkbn2/lib/index.js", "../ext/base/snansumors/lib/snansumors.js", "../ext/base/snansumors/lib/ndarray.js", "../ext/base/snansumors/lib/main.js", "../ext/base/snansumors/lib/index.js", "../ext/base/snansumpw/lib/ndarray.js", "../ext/base/snansumpw/lib/snansumpw.js", "../ext/base/snansumpw/lib/main.js", "../ext/base/snansumpw/lib/index.js", "../ext/base/srev/lib/srev.js", "../ext/base/srev/lib/ndarray.js", "../ext/base/srev/lib/main.js", "../ext/base/srev/lib/index.js", "../ext/base/ssort2hp/lib/ssort2hp.js", "../ext/base/ssort2hp/lib/ndarray.js", "../ext/base/ssort2hp/lib/main.js", "../ext/base/ssort2hp/lib/index.js", "../ext/base/ssort2ins/lib/ssort2ins.js", "../ext/base/ssort2ins/lib/ndarray.js", "../ext/base/ssort2ins/lib/main.js", "../ext/base/ssort2ins/lib/index.js", "../ext/base/ssort2sh/lib/gaps.json", "../ext/base/ssort2sh/lib/ssort2sh.js", "../ext/base/ssort2sh/lib/ndarray.js", "../ext/base/ssort2sh/lib/main.js", "../ext/base/ssort2sh/lib/index.js", "../ext/base/ssorthp/lib/ssorthp.js", "../ext/base/ssorthp/lib/ndarray.js", "../ext/base/ssorthp/lib/main.js", "../ext/base/ssorthp/lib/index.js", "../ext/base/ssortins/lib/ssortins.js", "../ext/base/ssortins/lib/ndarray.js", "../ext/base/ssortins/lib/main.js", "../ext/base/ssortins/lib/index.js", "../ext/base/ssortsh/lib/gaps.json", "../ext/base/ssortsh/lib/ssortsh.js", "../ext/base/ssortsh/lib/ndarray.js", "../ext/base/ssortsh/lib/main.js", "../ext/base/ssortsh/lib/index.js", "../ext/base/ssumkbn/lib/ssumkbn.js", "../ext/base/ssumkbn/lib/ndarray.js", "../ext/base/ssumkbn/lib/main.js", "../ext/base/ssumkbn/lib/index.js", "../ext/base/ssum/lib/ssum.js", "../ext/base/ssum/lib/ndarray.js", "../ext/base/ssum/lib/main.js", "../ext/base/ssum/lib/index.js", "../ext/base/ssumkbn2/lib/ssumkbn2.js", "../ext/base/ssumkbn2/lib/ndarray.js", "../ext/base/ssumkbn2/lib/main.js", "../ext/base/ssumkbn2/lib/index.js", "../ext/base/ssumors/lib/ssumors.js", "../ext/base/ssumors/lib/ndarray.js", "../ext/base/ssumors/lib/main.js", "../ext/base/ssumors/lib/index.js", "../ext/base/ssumpw/lib/ndarray.js", "../ext/base/ssumpw/lib/ssumpw.js", "../ext/base/ssumpw/lib/main.js", "../ext/base/ssumpw/lib/index.js", "../ext/base/lib/index.js", "../ext/lib/index.js", "../gdot/lib/main.js", "../gdot/lib/index.js", "../gswap/lib/main.js", "../gswap/lib/index.js", "../sdot/lib/main.js", "../sdot/lib/index.js", "../sswap/lib/main.js", "../sswap/lib/index.js", "../lib/index.js"], + "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' );\n\n\n// MAIN //\n\n/**\n* Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Complex64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Complex64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Complex64Array} output array\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* ccopy( x.length, x, 1, y, 1 );\n*\n* var z = y.get( 0 );\n* // returns \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 reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' );\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 = 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\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 reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' );\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 = 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\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\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\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\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n*\n* var out = dnrm2( 3, 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\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n*\n* var out = dnrm2( 4, 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*\n* var out = dnrm2( 3, x, 1 );\n* // returns 3.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\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*\n* var out = dnrm2.ndarray( 4, 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) 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 abs = require( '@stdlib/math/base/special/abs' );\nvar sqrt = require( '@stdlib/math/base/special/sqrt' );\nvar abs2 = require( '@stdlib/math/base/special/abs2' );\nvar copysign = require( '@stdlib/math/base/special/copysign' );\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 {Float64Array} out - output array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var out = drotg( 0.0, 2.0, new Float64Array( 4 ), 1, 0 );\n* // returns [ 2.0, 1.0, 0.0, 1.0 ]\n*/\nfunction drotg( 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 = abs( a );\n\tab = abs( b );\n\tif ( aa > ab ) {\n\t\tsign = copysign( 1.0, a );\n\t} else {\n\t\tsign = copysign( 1.0, b );\n\t}\n\tscale = 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 = scale * sqrt( abs2( a/scale ) + abs2( b/scale ) );\n\t\tr *= sign;\n\t\tc = a / r;\n\t\ts = 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 = 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 = drotg;\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 Float64Array = require( '@stdlib/array/float64' );\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 {Float64Array} output array\n*\n* @example\n* var out = drotg( 0.0, 2.0 );\n* // returns [ 2.0, 1.0, 0.0, 1.0 ]\n*/\nfunction drotg( a, b ) {\n\tvar out = new Float64Array( 4 );\n\treturn fcn( a, b, out, 1, 0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = drotg;\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/drotg\n*\n* @example\n* var drotg = require( '@stdlib/blas/base/drotg' );\n*\n* var out = drotg( 0.0, 2.0 );\n* // returns [ 2.0, 1.0, 0.0, 1.0 ]\n*\n* out = drotg( 6.0, -8.0 );\n* // returns [ 10.0, ~-1.666, -0.6, 0.8 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var drotg = require( '@stdlib/blas/base/drotg' );\n*\n* var out = new Float64Array( 4 );\n*\n* var y = drotg.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) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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*\n* dscal( 3, 5.0, 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\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\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 - output array\n* @param {integer} strideY - `y` stride length\n* @returns {NumericArray} output array\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 - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {NumericArray} output array\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 - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Collection} output array\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 - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Collection} output array\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\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\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/**\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 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* 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 absf = require( '@stdlib/math/base/special/absf' );\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 + absf( 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 absf = require( '@stdlib/math/base/special/absf' );\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 + absf( 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 sqrtf = require( '@stdlib/math/base/special/sqrtf' );\nvar absf = require( '@stdlib/math/base/special/absf' );\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*\n* var z = snrm2( x.length, x, 1 );\n* // returns 3.0\n*/\nfunction snrm2( N, x, stride ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar v;\n\tvar i;\n\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn absf( 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 = absf( x[ i ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tv = float64ToFloat32( scale/ax );\n\t\t\t\tssq = float64ToFloat32( 1.0 + float64ToFloat32( ssq * float64ToFloat32( v*v ) ) ); // eslint-disable-line max-len\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tv = float64ToFloat32( ax/scale );\n\t\t\t\tssq = float64ToFloat32( ssq + float64ToFloat32( v*v ) );\n\t\t\t}\n\t\t}\n\t}\n\treturn float64ToFloat32( scale * sqrtf( 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 sqrtf = require( '@stdlib/math/base/special/sqrtf' );\nvar absf = require( '@stdlib/math/base/special/absf' );\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 v;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn absf( 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 = absf( x[ ix ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tv = float64ToFloat32( scale/ax );\n\t\t\t\tssq = float64ToFloat32( 1.0 + float64ToFloat32( ssq * float64ToFloat32( v*v ) ) ); // eslint-disable-line max-len\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tv = float64ToFloat32( ax/scale );\n\t\t\t\tssq = float64ToFloat32( ssq + float64ToFloat32( v*v ) );\n\t\t\t}\n\t\t}\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( scale * sqrtf( 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*\n* var z = snrm2( x.length, x, 1 );\n* // returns 3.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\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*\n* var z = snrm2.ndarray( 4, 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 drotg\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/drotg}\n*/\nsetReadOnly( blas, 'drotg', require( './../../base/drotg' ) );\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": "uGAAA,IAAAA,GAAAC,EAAA,SAAAC,GAAAC,GAAA,cAsBA,IAAIC,GAAc,QAAS,4CAA6C,EAkCxE,SAASC,GAAOC,EAAGC,EAAGC,EAASC,EAAGC,EAAU,CAC3C,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEJ,GAAKX,GAAK,EACT,OAAOG,EAIR,GAFAE,EAAQP,GAAaG,EAAG,CAAE,EAC1BK,EAAQR,GAAaK,EAAG,CAAE,EACrBD,IAAY,GAAKE,IAAY,EAAI,CACrC,IAAMO,EAAI,EAAGA,EAAIX,EAAE,EAAGW,GAAK,EAC1BL,EAAOK,CAAE,EAAIN,EAAOM,CAAE,EACtBL,EAAOK,EAAE,CAAE,EAAIN,EAAOM,EAAE,CAAE,EAE3B,OAAOR,CACR,CAaA,IAZKD,EAAU,EACdO,EAAK,GAAK,EAAET,GAAKE,EAEjBO,EAAK,EAEDL,EAAU,EACdM,EAAK,GAAK,EAAEV,GAAKI,EAEjBM,EAAK,EAENH,EAAKL,EAAU,EACfM,EAAKJ,EAAU,EACTO,EAAI,EAAGA,EAAIX,EAAGW,IACnBL,EAAOI,CAAG,EAAIL,EAAOI,CAAG,EACxBH,EAAOI,EAAG,CAAE,EAAIL,EAAOI,EAAG,CAAE,EAC5BA,GAAMF,EACNG,GAAMF,EAEP,OAAOL,CACR,CAKAN,GAAO,QAAUE,KCrGjB,IAAAa,GAAAC,EAAA,SAAAC,GAAAC,GAAA,cAsBA,IAAIC,GAAc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C,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", "reinterpret", "cswap", "N", "x", "strideX", "y", "strideY", "viewX", "viewY", "tmp", "sx", "sy", "ix", "iy", "i", "j", "require_ndarray", "__commonJSMin", "exports", "module", "reinterpret", "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_assign", "__commonJSMin", "exports", "module", "abs", "sqrt", "abs2", "copysign", "drotg", "a", "b", "out", "stride", "offset", "scale", "sign", "aa", "ab", "r", "c", "s", "z", "require_main", "__commonJSMin", "exports", "module", "Float64Array", "fcn", "drotg", "a", "b", "out", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "assign", "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_main", "__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_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "ndarray", "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", "absf", "float64ToFloat32", "sasum", "N", "x", "stride", "sum", "i", "require_ndarray", "__commonJSMin", "exports", "module", "absf", "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", "sqrtf", "absf", "float64ToFloat32", "snrm2", "N", "x", "stride", "scale", "ssq", "ax", "i", "require_ndarray", "__commonJSMin", "exports", "module", "sqrtf", "absf", "float64ToFloat32", "snrm2", "N", "x", "stride", "offset", "scale", "ssq", "ax", "ix", "v", "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"] }