diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml
index 3e8e2db16..91f2b939f 100644
--- a/.github/workflows/productionize.yml
+++ b/.github/workflows/productionize.yml
@@ -82,21 +82,6 @@ jobs:
id: transform-error-messages
uses: stdlib-js/transform-errors-action@main
- # Format error messages:
- - name: 'Replace double quotes with single quotes in rewritten format string error messages'
- run: |
- find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \;
-
- # Format string literal error messages:
- - name: 'Replace double quotes with single quotes in rewritten string literal error messages'
- run: |
- find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \;
-
- # Format code:
- - name: 'Replace double quotes with single quotes in inserted `require` calls'
- run: |
- find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \;
-
# Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency:
- name: 'Update dependencies in package.json'
run: |
@@ -349,7 +334,7 @@ jobs:
# Send status to Slack channel if job fails:
- name: 'Send status to Slack channel in case of failure'
- uses: act10ns/slack@v1
+ uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
@@ -520,7 +505,7 @@ jobs:
# Send status to Slack channel if job fails:
- name: 'Send status to Slack channel in case of failure'
- uses: act10ns/slack@v1
+ uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
@@ -697,7 +682,7 @@ jobs:
# Send status to Slack channel if job fails:
- name: 'Send status to Slack channel in case of failure'
- uses: act10ns/slack@v1
+ uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 26be02d3c..474004bea 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -209,7 +209,7 @@ jobs:
# Send status to Slack channel if job fails:
- name: 'Send status to Slack channel in case of failure'
- uses: act10ns/slack@v1
+ uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 51c9d27be..2b4efa529 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -89,7 +89,7 @@ jobs:
# Send status to Slack channel if job fails:
- name: 'Send status to Slack channel in case of failure'
- uses: act10ns/slack@v1
+ uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
diff --git a/.github/workflows/test_bundles.yml b/.github/workflows/test_bundles.yml
index e9df6a01f..172cb2d75 100644
--- a/.github/workflows/test_bundles.yml
+++ b/.github/workflows/test_bundles.yml
@@ -88,7 +88,7 @@ jobs:
# Send notification to Slack channel if job fails:
- name: 'Send status to Slack channel in case of failure'
- uses: act10ns/slack@v1
+ uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
@@ -130,7 +130,7 @@ jobs:
# Send notification to Slack channel if job fails:
- name: 'Send status to Slack channel in case of failure'
- uses: act10ns/slack@v1
+ uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
@@ -172,7 +172,7 @@ jobs:
# Send notification to Slack channel if job fails:
- name: 'Send status to Slack channel in case of failure'
- uses: act10ns/slack@v1
+ uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml
index 6d8aa0b61..a73c51529 100644
--- a/.github/workflows/test_coverage.yml
+++ b/.github/workflows/test_coverage.yml
@@ -106,7 +106,7 @@ jobs:
# Send Slack notification if job fails:
- name: 'Send status to Slack channel in case of failure'
- uses: act10ns/slack@v1
+ uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml
index aa74f6442..f896304af 100644
--- a/.github/workflows/test_install.yml
+++ b/.github/workflows/test_install.yml
@@ -75,7 +75,7 @@ jobs:
# Send Slack notification if job fails:
- name: 'Send notification to Slack in case of failure'
- uses: act10ns/slack@v1
+ uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
diff --git a/base/gcopy/docs/types/index.d.ts b/base/gcopy/docs/types/index.d.ts
index 3609d7a68..f5e48bce1 100644
--- a/base/gcopy/docs/types/index.d.ts
+++ b/base/gcopy/docs/types/index.d.ts
@@ -20,7 +20,7 @@
///
-import { Collection } from '@stdlib/types/object';
+import { Collection } from '@stdlib/types/array';
/**
* Interface describing `gcopy`.
@@ -43,7 +43,7 @@ interface Routine {
* gcopy( x.length, x, 1, y, 1 );
* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]
*/
- ( N: number, x: Collection, strideX: number, y: Collection, strideY: number ): Collection; // tslint:disable-line:max-line-length
+ ( N: number, x: Collection, strideX: number, y: Collection, strideY: number ): Collection;
/**
* Copies values from `x` into `y` using alternative indexing semantics.
@@ -64,7 +64,7 @@ interface Routine {
* gcopy.ndarray( x.length, x, 1, 0, y, 1, 0 );
* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]
*/
- ndarray( N: number, x: Collection, strideX: number, offsetX: number, y: Collection, strideY: number, offsetY: number ): Collection; // tslint:disable-line:max-line-length
+ ndarray( N: number, x: Collection, strideX: number, offsetX: number, y: Collection, strideY: number, offsetY: number ): Collection;
}
/**
diff --git a/base/gcopy/docs/types/test.ts b/base/gcopy/docs/types/test.ts
index 8bef49dcd..84cad59c4 100644
--- a/base/gcopy/docs/types/test.ts
+++ b/base/gcopy/docs/types/test.ts
@@ -26,7 +26,7 @@ import gcopy = require( './index' );
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
- gcopy( x.length, x, 1, y, 1 ); // $ExpectType Collection
+ gcopy( x.length, x, 1, y, 1 ); // $ExpectType Collection
}
// The compiler throws an error if the function is provided a first argument which is not a number...
@@ -117,7 +117,7 @@ import gcopy = require( './index' );
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
- gcopy.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectType Collection
+ gcopy.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectType Collection
}
// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
diff --git a/base/gswap/docs/types/index.d.ts b/base/gswap/docs/types/index.d.ts
index 5e3d34b81..fce3ca82b 100644
--- a/base/gswap/docs/types/index.d.ts
+++ b/base/gswap/docs/types/index.d.ts
@@ -20,7 +20,7 @@
///
-import { Collection } from '@stdlib/types/object';
+import { Collection } from '@stdlib/types/array';
/**
* Interface describing `gswap`.
@@ -44,7 +44,7 @@ interface Routine {
* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]
* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]
*/
- ( N: number, x: Collection, strideX: number, y: Collection, strideY: number ): Collection; // tslint:disable-line:max-line-length
+ ( N: number, x: Collection, strideX: number, y: Collection, strideY: number ): Collection;
/**
* Interchanges vectors `x` and `y` using alternative indexing semantics.
@@ -66,7 +66,7 @@ interface Routine {
* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]
* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]
*/
- ndarray( N: number, x: Collection, strideX: number, offsetX: number, y: Collection, strideY: number, offsetY: number ): Collection; // tslint:disable-line:max-line-length
+ ndarray( N: number, x: Collection, strideX: number, offsetX: number, y: Collection, strideY: number, offsetY: number ): Collection;
}
/**
diff --git a/base/gswap/docs/types/test.ts b/base/gswap/docs/types/test.ts
index a05278b51..32c748b74 100644
--- a/base/gswap/docs/types/test.ts
+++ b/base/gswap/docs/types/test.ts
@@ -26,7 +26,7 @@ import gswap = require( './index' );
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
- gswap( x.length, x, 1, y, 1 ); // $ExpectType Collection
+ gswap( x.length, x, 1, y, 1 ); // $ExpectType Collection
}
// The compiler throws an error if the function is provided a first argument which is not a number...
@@ -117,7 +117,7 @@ import gswap = require( './index' );
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
- gswap.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectType Collection
+ gswap.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectType Collection
}
// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
diff --git a/dist/index.d.ts b/dist/index.d.ts
new file mode 100644
index 000000000..15e948f06
--- /dev/null
+++ b/dist/index.d.ts
@@ -0,0 +1,3 @@
+///
+import ns from '../docs/types/index';
+export = ns;
\ No newline at end of file
diff --git a/dist/index.js b/dist/index.js
new file mode 100644
index 000000000..cf8714fd4
--- /dev/null
+++ b/dist/index.js
@@ -0,0 +1,1091 @@
+"use strict";var c=function(n,e){return function(){return e||n((e={exports:{}}).exports,e),e.exports}};var Un=c(function(NQ,Qn){
+var Jn=require('@stdlib/strided/base/reinterpret-complex64/dist');function qO(n,e,a,i,r){var u,v,s,o,t,f,q;if(n<=0)return i;if(u=Jn(e,0),v=Jn(i,0),a===1&&r===1){for(q=0;q0)for(u=0;u0)for(s=0;s0)for(t=0;t0)for(q=0;q0)for(o=0;o0)for(f=0;f0)for(t=0;t0)for(q=0;q0)for(r=0;r0)for(s=0;s0)for(t=0;t0)for(q=0;q0)for(t=0;t0)for(q=0;q0)for(u=0;u0)for(s=0;s0)for(t=0;t0)for(q=0;q0)for(f=0;f0)for(m=0;m0)for(t=0;t0)for(q=0;q0)for(u=0;u0)for(s=0;s0)for(q=0;q0)for(p=0;p0)for(t=0;t0)for(q=0;q0)for(o=0;o0)for(f=0;f0)for(f=0;f0)for(m=0;mo?v=no(1,n):v=no(1,e),u=Y(s+o),u===0?(f=1,q=0,t=0,m=0):(t=Y(u*kM(Y(io(Y(n/u))+io(Y(e/u))))),t=Y(t*v),f=Y(n/t),q=Y(e/t),m=1,s>o?m=q:f!==0&&(m=Y(1/f))),n=t,e=m,a[r]=n,a[r+i]=e,a[r+2*i]=f,a[r+3*i]=q,a}vo.exports=_M
+});var to=c(function(BW,so){
+var EM=require('@stdlib/array/float32/dist'),OM=Qa();function FM(n,e){var a=new EM(4);return OM(n,e,a,1,0)}so.exports=FM
+});var qo=c(function(CW,fo){
+var MM=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),oo=to(),TM=Qa();MM(oo,"assign",TM);fo.exports=oo
+});var mo=c(function(GW,co){
+var Ua=5;function SM(n,e,a,i){var r,u;if(n<=0||i<=0||e===1)return a;if(i===1){if(u=n%Ua,u>0)for(r=0;r0)for(v=0;v0)for(t=0;t0)for(q=0;q0)for(u=0;u0)for(s=0;s=rf(v)?o+=r-s+v:o+=v-s+r,r=s,u+=i;return r+o}ef.exports=n7
+});var vf=c(function(r9,nf){
+var uf=require('@stdlib/math/base/special/abs/dist');function v7(n,e,a,i,r){var u,v,s,o,t,f;if(n<=0)return 0;if(n===1||i===0)return e+a[r];for(v=r,u=0,t=0,f=0;f=uf(s)?t+=u-o+s:t+=s-o+u,u=o,v+=i;return u+t}nf.exports=v7
+});var of=c(function(e9,tf){
+var s7=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),sf=af(),t7=vf();s7(sf,"ndarray",t7);tf.exports=sf
+});var Ir=c(function(a9,qf){
+var o7=require("path").join,f7=require('@stdlib/utils/try-require/dist'),q7=require('@stdlib/assert/is-error/dist'),c7=of(),Na,ff=f7(o7(__dirname,"./native.js"));q7(ff)?Na=c7:Na=ff;qf.exports=Na
+});var mf=c(function(u9,cf){
+var m7=Ir();function l7(n,e,a,i){return m7(n,e,a,i)}cf.exports=l7
+});var pf=c(function(i9,lf){
+var p7=Ir().ndarray;function j7(n,e,a,i,r){return p7(n,e,a,i,r)}lf.exports=j7
+});var bf=c(function(n9,gf){
+var g7=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),jf=mf(),b7=pf();g7(jf,"ndarray",b7);gf.exports=jf
+});var Rf=c(function(v9,yf){
+var w7=require("path").join,y7=require('@stdlib/utils/try-require/dist'),R7=require('@stdlib/assert/is-error/dist'),k7=bf(),ru,wf=y7(w7(__dirname,"./native.js"));R7(wf)?ru=k7:ru=wf;yf.exports=ru
+});var _f=c(function(s9,kf){
+var Kr=require('@stdlib/math/base/special/abs/dist');function _7(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||i===0)return e+a[0];for(i<0?v=(1-n)*i:v=0,r=0,u=0,s=0,m=0;m=Kr(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,Kr(s)>=Kr(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=i;return r+s+u}kf.exports=_7
+});var Of=c(function(t9,Ef){
+var Vr=require('@stdlib/math/base/special/abs/dist');function E7(n,e,a,i,r){var u,v,s,o,t,f,q,m,p;if(n<=0)return 0;if(n===1||i===0)return e+a[0];for(s=r,u=0,v=0,o=0,p=0;p=Vr(f)?m=u-q+f:m=f-q+u,u=q,q=o+m,Vr(o)>=Vr(m)?t=o-q+m:t=m-q+o,o=q,v+=t,s+=i;return u+o+v}Ef.exports=E7
+});var Tf=c(function(o9,Mf){
+var O7=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Ff=_f(),F7=Of();O7(Ff,"ndarray",F7);Mf.exports=Ff
+});var Pf=c(function(f9,Zf){
+var M7=require("path").join,T7=require('@stdlib/utils/try-require/dist'),S7=require('@stdlib/assert/is-error/dist'),Z7=Tf(),eu,Sf=T7(M7(__dirname,"./native.js"));S7(Sf)?eu=Z7:eu=Sf;Zf.exports=eu
+});var Lf=c(function(q9,Af){
+function P7(n,e,a,i){var r,u,v;if(n<=0)return 0;if(n===1||i===0)return e+a[0];for(i<0?u=(1-n)*i:u=0,r=0,v=0;v=sq(t)?q+=o-f+t:q+=t-f+o,o=f,r[s]=o+q,v+=i,s+=u;return r}tq.exports=nT
+});var cq=c(function(E9,qq){
+var fq=require('@stdlib/math/base/special/abs/dist');function vT(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l;if(n<=0)return u;for(o=r,t=s,f=e,p=0,l=0;l=fq(q)?p+=f-m+q:p+=q-m+f,f=m,u[t]=f+p,o+=i,t+=v;return u}qq.exports=vT
+});var pq=c(function(O9,lq){
+var sT=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),mq=oq(),tT=cq();sT(mq,"ndarray",tT);lq.exports=mq
+});var zr=c(function(F9,gq){
+var oT=require("path").join,fT=require('@stdlib/utils/try-require/dist'),qT=require('@stdlib/assert/is-error/dist'),cT=pq(),ou,jq=fT(oT(__dirname,"./native.js"));qT(jq)?ou=cT:ou=jq;gq.exports=ou
+});var wq=c(function(M9,bq){
+var mT=zr();function lT(n,e,a,i,r,u){return mT(n,e,a,i,r,u)}bq.exports=lT
+});var Rq=c(function(T9,yq){
+var pT=zr().ndarray;function jT(n,e,a,i,r,u,v,s){return pT(n,e,a,i,r,u,v,s)}yq.exports=jT
+});var Eq=c(function(S9,_q){
+var gT=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),kq=wq(),bT=Rq();gT(kq,"ndarray",bT);_q.exports=kq
+});var Mq=c(function(Z9,Fq){
+var wT=require("path").join,yT=require('@stdlib/utils/try-require/dist'),RT=require('@stdlib/assert/is-error/dist'),kT=Eq(),fu,Oq=yT(wT(__dirname,"./native.js"));RT(Oq)?fu=kT:fu=Oq;Fq.exports=fu
+});var Sq=c(function(P9,Tq){
+var Dr=require('@stdlib/math/base/special/abs/dist');function _T(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l;if(n<=0)return r;for(i<0?s=(1-n)*i:s=0,u<0?o=(1-n)*u:o=0,v=0,t=0,l=0;l=Dr(q)?p=e-m+q:p=q-m+e,e=m,m=t+p,Dr(t)>=Dr(p)?f=t-m+p:f=p-m+t,t=m,v+=f,r[o]=e+t+v,s+=i,o+=u;return r}Tq.exports=_T
+});var Pq=c(function(A9,Zq){
+var Hr=require('@stdlib/math/base/special/abs/dist');function ET(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g;if(n<=0)return u;for(t=r,f=s,o=0,q=0,g=0;g=Hr(p)?j=e-l+p:j=p-l+e,e=l,l=q+j,Hr(q)>=Hr(j)?m=q-l+j:m=j-l+q,q=l,o+=m,u[f]=e+q+o,t+=i,f+=v;return u}Zq.exports=ET
+});var Bq=c(function(L9,Lq){
+var OT=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Aq=Sq(),FT=Pq();OT(Aq,"ndarray",FT);Lq.exports=Aq
+});var Iq=c(function(B9,Gq){
+var MT=require("path").join,TT=require('@stdlib/utils/try-require/dist'),ST=require('@stdlib/assert/is-error/dist'),ZT=Bq(),qu,Cq=TT(MT(__dirname,"./native.js"));ST(Cq)?qu=ZT:qu=Cq;Gq.exports=qu
+});var Vq=c(function(C9,Kq){
+function PT(n,e,a,i,r,u){var v,s,o;if(n<=0)return r;for(i<0?v=(1-n)*i:v=0,u<0?s=(1-n)*u:s=0,o=0;o0)for(u=0;u0)for(s=0;s=Ic(o)?f+=u-t+o:f+=o-t+u,u=t,q+=1),v+=a;return i[s]=u+f,i[s+r]=q,i}Kc.exports=RS
+});var Jc=c(function(a$,Hc){
+var zc=require('@stdlib/math/base/assert/is-nan/dist'),Dc=require('@stdlib/math/base/special/abs/dist');function kS(n,e,a,i,r,u,v){var s,o,t,f,q,m,p,l;if(o=i,t=v,s=0,n<=0)return r[t]=s,r[t+u]=0,r;if(n===1||a===0)return zc(e[o])?(r[t]=s,r[t+u]=0,r):(r[t]=e[o],r[t+u]=1,r);for(m=0,p=0,l=0;l=Dc(f)?m+=s-q+f:m+=f-q+s,s=q,p+=1),o+=a;return r[t]=s+m,r[t+u]=p,r}Hc.exports=kS
+});var Wc=c(function(u$,Uc){
+var _S=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Qc=Vc(),ES=Jc();_S(Qc,"ndarray",ES);Uc.exports=Qc
+});var Ur=c(function(i$,hc){
+var OS=require("path").join,FS=require('@stdlib/utils/try-require/dist'),MS=require('@stdlib/assert/is-error/dist'),TS=Wc(),yu,$c=FS(OS(__dirname,"./native.js"));MS($c)?yu=TS:yu=$c;hc.exports=yu
+});var Xc=c(function(n$,Yc){
+var SS=Ur();function ZS(n,e,a,i,r){return SS(n,e,a,i,r)}Yc.exports=ZS
+});var xc=c(function(v$,dc){
+var PS=Ur().ndarray;function AS(n,e,a,i,r,u,v){return PS(n,e,a,i,r,u,v)}dc.exports=AS
+});var em=c(function(s$,rm){
+var LS=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Nc=Xc(),BS=xc();LS(Nc,"ndarray",BS);rm.exports=Nc
+});var im=c(function(t$,um){
+var CS=require("path").join,GS=require('@stdlib/utils/try-require/dist'),IS=require('@stdlib/assert/is-error/dist'),KS=em(),Ru,am=GS(CS(__dirname,"./native.js"));IS(am)?Ru=KS:Ru=am;um.exports=Ru
+});var sm=c(function(o$,vm){
+var nm=require('@stdlib/math/base/assert/is-nan/dist'),Wr=require('@stdlib/math/base/special/abs/dist');function VS(n,e,a,i,r){var u,v,s,o,t,f,q,m,p,l,j;if(a<0?t=(1-n)*a:t=0,r<0?f=-r:f=0,u=0,n<=0)return i[f]=u,i[f+r]=0,i;if(n===1||a===0)return nm(e[t])?(i[f]=u,i[f+r]=0,i):(i[f]=e[t],i[f+r]=1,i);for(v=0,s=0,l=0,j=0;j=Wr(q)?p=u-m+q:p=q-m+u,u=m,m=s+p,Wr(s)>=Wr(p)?o=s-m+p:o=p-m+s,s=m,v+=o,l+=1),t+=a;return i[f]=u+s+v,i[f+r]=l,i}vm.exports=VS
+});var fm=c(function(f$,om){
+var tm=require('@stdlib/math/base/assert/is-nan/dist'),$r=require('@stdlib/math/base/special/abs/dist');function zS(n,e,a,i,r,u,v){var s,o,t,f,q,m,p,l,j,g,b;if(q=i,m=v,s=0,n<=0)return r[m]=s,r[m+u]=0,r;if(n===1||a===0)return tm(e[q])?(r[m]=s,r[m+u]=0,r):(r[m]=e[q],r[m+u]=1,r);for(o=0,t=0,g=0,b=0;b=$r(p)?j=s-l+p:j=p-l+s,s=l,l=t+j,$r(t)>=$r(j)?f=t-l+j:f=j-l+t,t=l,o+=f,g+=1),q+=a;return r[m]=s+t+o,r[m+u]=g,r}om.exports=zS
+});var mm=c(function(q$,cm){
+var DS=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),qm=sm(),HS=fm();DS(qm,"ndarray",HS);cm.exports=qm
+});var jm=c(function(c$,pm){
+var JS=require("path").join,QS=require('@stdlib/utils/try-require/dist'),US=require('@stdlib/assert/is-error/dist'),WS=mm(),ku,lm=QS(JS(__dirname,"./native.js"));US(lm)?ku=WS:ku=lm;pm.exports=ku
+});var wm=c(function(m$,bm){
+var gm=require('@stdlib/math/base/assert/is-nan/dist');function $S(n,e,a,i,r){var u,v,s,o,t;if(a<0?v=(1-n)*a:v=0,r<0?s=-r:s=0,u=0,n<=0)return i[s]=u,i[s+r]=0,i;if(n===1||a===0)return gm(e[v])?(i[s]=u,i[s+r]=0,i):(i[s]=e[v],i[s+r]=1,i);for(o=0,t=0;t=Dm(u)?s+=i-v+u:s+=u-v+i,i=v),r+=a;return i+s}Hm.exports=lZ
+});var $m=c(function(_$,Wm){
+var Qm=require('@stdlib/math/base/assert/is-nan/dist'),Um=require('@stdlib/math/base/special/abs/dist');function pZ(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return Qm(e[i])?0:e[i];for(u=i,r=0,o=0,t=0;t=Um(v)?o+=r-s+v:o+=v-s+r,r=s),u+=a;return r+o}Wm.exports=pZ
+});var Xm=c(function(E$,Ym){
+var jZ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),hm=Jm(),gZ=$m();jZ(hm,"ndarray",gZ);Ym.exports=hm
+});var hr=c(function(O$,xm){
+var bZ=require("path").join,wZ=require('@stdlib/utils/try-require/dist'),yZ=require('@stdlib/assert/is-error/dist'),RZ=Xm(),Mu,dm=wZ(bZ(__dirname,"./native.js"));yZ(dm)?Mu=RZ:Mu=dm;xm.exports=Mu
+});var r1=c(function(F$,Nm){
+var kZ=hr();function _Z(n,e,a){return kZ(n,e,a)}Nm.exports=_Z
+});var a1=c(function(M$,e1){
+var EZ=hr().ndarray;function OZ(n,e,a,i){return EZ(n,e,a,i)}e1.exports=OZ
+});var n1=c(function(T$,i1){
+var FZ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),u1=r1(),MZ=a1();FZ(u1,"ndarray",MZ);i1.exports=u1
+});var t1=c(function(S$,s1){
+var TZ=require("path").join,SZ=require('@stdlib/utils/try-require/dist'),ZZ=require('@stdlib/assert/is-error/dist'),PZ=n1(),Tu,v1=SZ(TZ(__dirname,"./native.js"));ZZ(v1)?Tu=PZ:Tu=v1;s1.exports=Tu
+});var q1=c(function(Z$,f1){
+var o1=require('@stdlib/math/base/assert/is-nan/dist'),Yr=require('@stdlib/math/base/special/abs/dist');function AZ(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return o1(e[0])?0:e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=Yr(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,Yr(v)>=Yr(f)?s=v-t+f:s=f-t+v,v=t,r+=s),u+=a;return i+v+r}f1.exports=AZ
+});var l1=c(function(P$,m1){
+var c1=require('@stdlib/math/base/assert/is-nan/dist'),Xr=require('@stdlib/math/base/special/abs/dist');function LZ(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||a===0)return c1(e[i])?0:e[i];for(v=i,r=0,u=0,s=0,m=0;m=Xr(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,Xr(s)>=Xr(q)?o=s-f+q:o=q-f+s,s=f,u+=o),v+=a;return r+s+u}m1.exports=LZ
+});var g1=c(function(A$,j1){
+var BZ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),p1=q1(),CZ=l1();BZ(p1,"ndarray",CZ);j1.exports=p1
+});var y1=c(function(L$,w1){
+var GZ=require("path").join,IZ=require('@stdlib/utils/try-require/dist'),KZ=require('@stdlib/assert/is-error/dist'),VZ=g1(),Su,b1=IZ(GZ(__dirname,"./native.js"));KZ(b1)?Su=VZ:Su=b1;w1.exports=Su
+});var _1=c(function(B$,k1){
+var R1=require('@stdlib/math/base/assert/is-nan/dist');function zZ(n,e,a){var i,r,u;if(i=0,n<=0)return i;if(n===1||a===0)return R1(e[0])?i:e[0];for(a<0?r=(1-n)*a:r=0,u=0;u0)for(r=0;r0)for(t=0;t0)o-=1,m=a[v+o*i],p=r[s+o*u];else{if(g-=1,g===0)return a;l=v+g*i,m=a[l],j=s+g*u,p=r[j],a[l]=a[v],r[j]=r[s]}for(b=o,t=b*2+1;tq||sp(f)||f===q&&vp(f))&&(t+=1)),f=a[v+t*i],f>m||sp(f)||f===m&&vp(f));)a[v+b*i]=f,r[s+b*u]=r[s+t*u],b=t,t=b*2+1;a[v+b*i]=m,r[s+b*u]=p}}tp.exports=gA
+});var mp=c(function(gh,cp){
+var fp=require('@stdlib/math/base/assert/is-positive-zero/dist'),qp=require('@stdlib/math/base/assert/is-nan/dist'),bA=require('@stdlib/math/base/special/floor/dist');function wA(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g,b,R;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),g=n,o=bA(n/2);;){if(o>0)o-=1,m=a[r+o*i],p=u[s+o*v];else{if(g-=1,g===0)return a;l=r+g*i,m=a[l],j=s+g*v,p=u[j],a[l]=a[r],u[j]=u[s]}for(b=o,t=b*2+1;tq||qp(f)||f===q&&fp(f))&&(t+=1)),f=a[r+t*i],f>m||qp(f)||f===m&&fp(f));)a[r+b*i]=f,u[s+b*v]=u[s+t*v],b=t,t=b*2+1;a[r+b*i]=m,u[s+b*v]=p}}cp.exports=wA
+});var jp=c(function(bh,pp){
+var yA=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),lp=op(),RA=mp();yA(lp,"ndarray",RA);pp.exports=lp
+});var wp=c(function(wh,bp){
+var kA=require("path").join,_A=require('@stdlib/utils/try-require/dist'),EA=require('@stdlib/assert/is-error/dist'),OA=jp(),Uu,gp=_A(kA(__dirname,"./native.js"));EA(gp)?Uu=OA:Uu=gp;bp.exports=Uu
+});var kp=c(function(yh,Rp){
+var re=require('@stdlib/math/base/assert/is-negative-zero/dist'),yp=require('@stdlib/math/base/assert/is-nan/dist');function FA(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,j,g,b,R;if(n<=0||e===0)return a;if(e<0&&(i*=-1,u*=-1),u<0?(p=(1-n)*u,l=0):(p=0,l=(n-1)*u),q=p+u,i<0){for(t=(1-n)*i,f=0,s=t+i,R=1;Rf;)a[o]=a[o+i],r[m]=r[m+u],o+=i,m+=u;a[f]=j,r[l]=g}else{for(v=re(j),o=s-i,m=q-u;o<=t&&(b=a[o],!(b<=j&&!(v&&b===j&&re(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=j,r[m+u]=g,s+=i,q+=u}return a}for(t=0,f=(n-1)*i,s=t+i,R=1;R=t&&(b=a[o],!(b<=j&&!(v&&b===j&&re(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=j,r[m+u]=g,s+=i,q+=u}return a}Rp.exports=FA
+});var Op=c(function(Rh,Ep){
+var ee=require('@stdlib/math/base/assert/is-negative-zero/dist'),_p=require('@stdlib/math/base/assert/is-nan/dist');function MA(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g,b,R,_,k;if(n<=0||e===0)return a;if(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),q=r,m=q+(n-1)*i,t=q+i,j=s,g=j+(n-1)*v,p=j+v,i<0){for(k=1;km;)a[f]=a[f+i],u[l]=u[l+v],f+=i,l+=v;a[m]=b,u[g]=R}else{for(o=ee(b),f=t-i,l=p-v;f<=q&&(_=a[f],!(_<=b&&!(o&&_===b&&ee(_)===!1)));)a[f+i]=_,u[l+v]=u[l],f-=i,l-=v;a[f+i]=b,u[l+v]=R,t+=i,p+=v}return a}for(k=1;k=q&&(_=a[f],!(_<=b&&!(o&&_===b&&ee(_)===!1)));)a[f+i]=_,u[l+v]=u[l],f-=i,l-=v;a[f+i]=b,u[l+v]=R,t+=i,p+=v}return a}Ep.exports=MA
+});var Tp=c(function(kh,Mp){
+var TA=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Fp=kp(),SA=Op();TA(Fp,"ndarray",SA);Mp.exports=Fp
+});var Pp=c(function(_h,Zp){
+var ZA=require("path").join,PA=require('@stdlib/utils/try-require/dist'),AA=require('@stdlib/assert/is-error/dist'),LA=Tp(),Wu,Sp=PA(ZA(__dirname,"./native.js"));AA(Sp)?Wu=LA:Wu=Sp;Zp.exports=Wu
+});var $u=c(function(Eh,BA){BA.exports=[701,301,132,57,23,10,4,1]});var Bp=c(function(Oh,Lp){
+var CA=require('@stdlib/math/base/assert/is-negative-zero/dist'),GA=require('@stdlib/math/base/assert/is-nan/dist'),Ap=$u(),IA=Ap.length;function KA(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,j;if(n<=0||e===0)return a;for(e<0&&(i*=-1,u*=-1),i<0?v=(1-n)*i:v=0,u<0?s=(1-n)*u:s=0,p=0;p=t&&(m=a[v+(j-t)*i],!(m<=f&&!(o&&m===f)));j-=t)a[v+j*i]=m,r[s+j*u]=r[s+(j-t)*u];a[v+j*i]=f,r[s+j*u]=q}return a}Lp.exports=KA
+});var Ip=c(function(Fh,Gp){
+var VA=require('@stdlib/math/base/assert/is-negative-zero/dist'),zA=require('@stdlib/math/base/assert/is-nan/dist'),Cp=$u(),DA=Cp.length;function HA(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),p=0;p=t&&(m=a[r+(j-t)*i],!(m<=f&&!(o&&m===f)));j-=t)a[r+j*i]=m,u[s+j*v]=u[s+(j-t)*v];a[r+j*i]=f,u[s+j*v]=q}return a}Gp.exports=HA
+});var zp=c(function(Mh,Vp){
+var JA=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Kp=Bp(),QA=Ip();JA(Kp,"ndarray",QA);Vp.exports=Kp
+});var Jp=c(function(Th,Hp){
+var UA=require("path").join,WA=require('@stdlib/utils/try-require/dist'),$A=require('@stdlib/assert/is-error/dist'),hA=zp(),hu,Dp=WA(UA(__dirname,"./native.js"));$A(Dp)?hu=hA:hu=Dp;Hp.exports=hu
+});var $p=c(function(Sh,Wp){
+var Qp=require('@stdlib/math/base/assert/is-positive-zero/dist'),Up=require('@stdlib/math/base/assert/is-nan/dist'),YA=require('@stdlib/math/base/special/floor/dist');function XA(n,e,a,i){var r,u,v,s,o,t,f,q,m,p;if(n<=0||e===0)return a;for(e<0&&(i*=-1),i<0?r=(1-n)*i:r=0,t=n,u=YA(n/2);;){if(u>0)u-=1,f=a[r+u*i];else{if(t-=1,t===0)return a;q=r+t*i,f=a[q],a[q]=a[r]}for(m=u,v=m*2+1;vo||Up(s)||s===o&&Qp(s))&&(v+=1)),s=a[r+v*i],s>f||Up(s)||s===f&&Qp(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}Wp.exports=XA
+});var dp=c(function(Zh,Xp){
+var hp=require('@stdlib/math/base/assert/is-positive-zero/dist'),Yp=require('@stdlib/math/base/assert/is-nan/dist'),dA=require('@stdlib/math/base/special/floor/dist');function xA(n,e,a,i,r){var u,v,s,o,t,f,q,m,p;if(n<=0||e===0)return a;for(e<0&&(i*=-1,r-=(n-1)*i),t=n,u=dA(n/2);;){if(u>0)u-=1,f=a[r+u*i];else{if(t-=1,t===0)return a;q=r+t*i,f=a[q],a[q]=a[r]}for(m=u,v=m*2+1;vo||Yp(s)||s===o&&hp(s))&&(v+=1)),s=a[r+v*i],s>f||Yp(s)||s===f&&hp(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}Xp.exports=xA
+});var r2=c(function(Ph,Np){
+var NA=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),xp=$p(),rL=dp();NA(xp,"ndarray",rL);Np.exports=xp
+});var u2=c(function(Ah,a2){
+var eL=require("path").join,aL=require('@stdlib/utils/try-require/dist'),uL=require('@stdlib/assert/is-error/dist'),iL=r2(),Yu,e2=aL(eL(__dirname,"./native.js"));uL(e2)?Yu=iL:Yu=e2;a2.exports=Yu
+});var v2=c(function(Lh,n2){
+var ae=require('@stdlib/math/base/assert/is-negative-zero/dist'),i2=require('@stdlib/math/base/assert/is-nan/dist');function nL(n,e,a,i){var r,u,v,s,o,t,f,q;if(n<=0||e===0)return a;if(e<0&&(i*=-1),i<0){for(s=(1-n)*i,o=0,u=s+i,q=1;qo;)a[v]=a[v+i],v+=i;a[o]=t}else{for(r=ae(t),v=u-i;v<=s&&(f=a[v],!(f<=t&&!(r&&f===t&&ae(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}for(s=0,o=(n-1)*i,u=s+i,q=1;q=s&&(f=a[v],!(f<=t&&!(r&&f===t&&ae(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}n2.exports=nL
+});var o2=c(function(Bh,t2){
+var ue=require('@stdlib/math/base/assert/is-negative-zero/dist'),s2=require('@stdlib/math/base/assert/is-nan/dist');function vL(n,e,a,i,r){var u,v,s,o,t,f,q,m;if(n<=0||e===0)return a;if(e<0&&(i*=-1,r-=(n-1)*i),o=r,t=o+(n-1)*i,v=o+i,i<0){for(m=1;mt;)a[s]=a[s+i],s+=i;a[t]=f}else{for(u=ue(f),s=v-i;s<=o&&(q=a[s],!(q<=f&&!(u&&q===f&&ue(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}for(m=1;m=o&&(q=a[s],!(q<=f&&!(u&&q===f&&ue(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}t2.exports=vL
+});var c2=c(function(Ch,q2){
+var sL=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),f2=v2(),tL=o2();sL(f2,"ndarray",tL);q2.exports=f2
+});var p2=c(function(Gh,l2){
+var oL=require("path").join,fL=require('@stdlib/utils/try-require/dist'),qL=require('@stdlib/assert/is-error/dist'),cL=c2(),Xu,m2=fL(oL(__dirname,"./native.js"));qL(m2)?Xu=cL:Xu=m2;l2.exports=Xu
+});var du=c(function(Ih,mL){mL.exports=[701,301,132,57,23,10,4,1]});var b2=c(function(Kh,g2){
+var lL=require('@stdlib/math/base/assert/is-negative-zero/dist'),pL=require('@stdlib/math/base/assert/is-nan/dist'),j2=du(),jL=j2.length;function gL(n,e,a,i){var r,u,v,s,o,t,f,q;if(n<=0||e===0)return a;for(e<0&&(i*=-1),i<0?r=(1-n)*i:r=0,t=0;t=v&&(o=a[r+(q-v)*i],!(o<=s&&!(u&&o===s)));q-=v)a[r+q*i]=o;a[r+q*i]=s}return a}g2.exports=gL
+});var R2=c(function(Vh,y2){
+var bL=require('@stdlib/math/base/assert/is-negative-zero/dist'),wL=require('@stdlib/math/base/assert/is-nan/dist'),w2=du(),yL=w2.length;function RL(n,e,a,i,r){var u,v,s,o,t,f,q;if(n<=0||e===0)return a;for(e<0&&(i*=-1,r-=(n-1)*i),t=0;t=v&&(o=a[r+(q-v)*i],!(o<=s&&!(u&&o===s)));q-=v)a[r+q*i]=o;a[r+q*i]=s}return a}y2.exports=RL
+});var E2=c(function(zh,_2){
+var kL=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),k2=b2(),_L=R2();kL(k2,"ndarray",_L);_2.exports=k2
+});var M2=c(function(Dh,F2){
+var EL=require("path").join,OL=require('@stdlib/utils/try-require/dist'),FL=require('@stdlib/assert/is-error/dist'),ML=E2(),xu,O2=OL(EL(__dirname,"./native.js"));FL(O2)?xu=ML:xu=O2;F2.exports=xu
+});var ri=c(function(Hh,T2){
+var TL=require('@stdlib/math/base/special/floor/dist'),SL=128;function Nu(n,e,a,i){var r,u,v,s,o,t,f,q,m,p,l,j,g;if(n<=0)return 0;if(n===1||a===0)return e[i];if(r=i,n<8){for(l=0,g=0;g0)for(v=0;v0)for(s=0;s=aj(u)?s+=i-v+u:s+=u-v+i,i=v,r+=a;return i+s}uj.exports=aB
+});var sj=c(function(eY,vj){
+var nj=require('@stdlib/math/base/special/abs/dist');function uB(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return e[i];for(u=i,r=0,o=0,t=0;t=nj(v)?o+=r-s+v:o+=v-s+r,r=s,u+=a;return r+o}vj.exports=uB
+});var fj=c(function(aY,oj){
+var iB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),tj=ij(),nB=sj();iB(tj,"ndarray",nB);oj.exports=tj
+});var ve=c(function(uY,cj){
+var vB=require("path").join,sB=require('@stdlib/utils/try-require/dist'),tB=require('@stdlib/assert/is-error/dist'),oB=fj(),ni,qj=sB(vB(__dirname,"./native.js"));tB(qj)?ni=oB:ni=qj;cj.exports=ni
+});var lj=c(function(iY,mj){
+var fB=ve();function qB(n,e,a){return fB(n,e,a)}mj.exports=qB
+});var jj=c(function(nY,pj){
+var cB=ve().ndarray;function mB(n,e,a,i){return cB(n,e,a,i)}pj.exports=mB
+});var wj=c(function(vY,bj){
+var lB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),gj=lj(),pB=jj();lB(gj,"ndarray",pB);bj.exports=gj
+});var kj=c(function(sY,Rj){
+var jB=require("path").join,gB=require('@stdlib/utils/try-require/dist'),bB=require('@stdlib/assert/is-error/dist'),wB=wj(),vi,yj=gB(jB(__dirname,"./native.js"));bB(yj)?vi=wB:vi=yj;Rj.exports=vi
+});var Ej=c(function(tY,_j){
+var se=require('@stdlib/math/base/special/abs/dist');function yB(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=se(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,se(v)>=se(f)?s=v-t+f:s=f-t+v,v=t,r+=s,u+=a;return i+v+r}_j.exports=yB
+});var Fj=c(function(oY,Oj){
+var te=require('@stdlib/math/base/special/abs/dist');function RB(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||a===0)return e[i];for(v=i,r=0,u=0,s=0,m=0;m=te(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,te(s)>=te(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=a;return r+s+u}Oj.exports=RB
+});var Sj=c(function(fY,Tj){
+var kB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Mj=Ej(),_B=Fj();kB(Mj,"ndarray",_B);Tj.exports=Mj
+});var Aj=c(function(qY,Pj){
+var EB=require("path").join,OB=require('@stdlib/utils/try-require/dist'),FB=require('@stdlib/assert/is-error/dist'),MB=Sj(),si,Zj=OB(EB(__dirname,"./native.js"));FB(Zj)?si=MB:si=Zj;Pj.exports=si
+});var Bj=c(function(cY,Lj){
+var ti=6;function TB(n,e,a){var i,r,u,v;if(i=0,n<=0)return i;if(n===1||a===0)return e[0];if(a===1){if(u=n%ti,u>0)for(v=0;v0)for(s=0;s0)for(u=0;u0)for(s=0;s=ng(v)?o+=r-s+v:o+=v-s+r,r=s,u+=i;return r+o}vg.exports=XB
+});var fg=c(function(EY,og){
+var tg=require('@stdlib/math/base/special/abs/dist');function dB(n,e,a,i,r){var u,v,s,o,t,f;if(n<=0)return 0;if(n===1||i===0)return e+a[r];for(v=r,u=0,t=0,f=0;f=tg(s)?t+=u-o+s:t+=s-o+u,u=o,v+=i;return u+t}og.exports=dB
+});var qe=c(function(OY,cg){
+var xB=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),qg=sg(),NB=fg();xB(qg,"ndarray",NB);cg.exports=qg
+});var lg=c(function(FY,mg){
+var rC=qe();function eC(n,e,a,i){return rC(n,e,a,i)}mg.exports=eC
+});var jg=c(function(MY,pg){
+var aC=qe().ndarray;function uC(n,e,a,i,r){return aC(n,e,a,i,r)}pg.exports=uC
+});var wg=c(function(TY,bg){
+var iC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),gg=lg(),nC=jg();iC(gg,"ndarray",nC);bg.exports=gg
+});var Rg=c(function(SY,yg){
+var ce=require('@stdlib/math/base/special/abs/dist');function vC(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||i===0)return e+a[0];for(i<0?v=(1-n)*i:v=0,r=0,u=0,s=0,m=0;m=ce(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,ce(s)>=ce(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=i;return r+s+u}yg.exports=vC
+});var _g=c(function(ZY,kg){
+var me=require('@stdlib/math/base/special/abs/dist');function sC(n,e,a,i,r){var u,v,s,o,t,f,q,m,p;if(n<=0)return 0;if(n===1||i===0)return e+a[0];for(s=r,u=0,v=0,o=0,p=0;p=me(f)?m=u-q+f:m=f-q+u,u=q,q=o+m,me(o)>=me(m)?t=o-q+m:t=m-q+o,o=q,v+=t,s+=i;return u+o+v}kg.exports=sC
+});var Fg=c(function(PY,Og){
+var tC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Eg=Rg(),oC=_g();tC(Eg,"ndarray",oC);Og.exports=Eg
+});var Tg=c(function(AY,Mg){
+function fC(n,e,a,i){var r,u,v;if(n<=0)return 0;if(n===1||i===0)return e+a[0];for(i<0?u=(1-n)*i:u=0,r=0,v=0;v=$g(t)?q+=o-f+t:q+=t-f+o,o=f,r[s]=o+q,v+=i,s+=u;return r}hg.exports=FC
+});var xg=c(function(HY,dg){
+var Xg=require('@stdlib/math/base/special/abs/dist');function MC(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l;if(n<=0)return u;for(o=r,t=s,f=e,p=0,l=0;l=Xg(q)?p+=f-m+q:p+=q-m+f,f=m,u[t]=f+p,o+=i,t+=v;return u}dg.exports=MC
+});var le=c(function(JY,rb){
+var TC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Ng=Yg(),SC=xg();TC(Ng,"ndarray",SC);rb.exports=Ng
+});var ab=c(function(QY,eb){
+var ZC=le();function PC(n,e,a,i,r,u){return ZC(n,e,a,i,r,u)}eb.exports=PC
+});var ib=c(function(UY,ub){
+var AC=le().ndarray;function LC(n,e,a,i,r,u,v,s){return AC(n,e,a,i,r,u,v,s)}ub.exports=LC
+});var sb=c(function(WY,vb){
+var BC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),nb=ab(),CC=ib();BC(nb,"ndarray",CC);vb.exports=nb
+});var ob=c(function($Y,tb){
+var pe=require('@stdlib/math/base/special/abs/dist');function GC(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l;if(n<=0)return r;for(i<0?s=(1-n)*i:s=0,u<0?o=(1-n)*u:o=0,v=0,t=0,l=0;l=pe(q)?p=e-m+q:p=q-m+e,e=m,m=t+p,pe(t)>=pe(p)?f=t-m+p:f=p-m+t,t=m,v+=f,r[o]=e+t+v,s+=i,o+=u;return r}tb.exports=GC
+});var qb=c(function(hY,fb){
+var je=require('@stdlib/math/base/special/abs/dist');function IC(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g;if(n<=0)return u;for(t=r,f=s,o=0,q=0,g=0;g=je(p)?j=e-l+p:j=p-l+e,e=l,l=q+j,je(q)>=je(j)?m=q-l+j:m=j-l+q,q=l,o+=m,u[f]=e+q+o,t+=i,f+=v;return u}fb.exports=IC
+});var lb=c(function(YY,mb){
+var KC=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),cb=ob(),VC=qb();KC(cb,"ndarray",VC);mb.exports=cb
+});var jb=c(function(XY,pb){
+function zC(n,e,a,i,r,u){var v,s,o;if(n<=0)return r;for(i<0?v=(1-n)*i:v=0,u<0?s=(1-n)*u:s=0,o=0;o0)for(u=0;u0)for(o=0;o=Ub(o)?f+=u-t+o:f+=o-t+u,u=t,q+=1),v+=a;return i[s]=u+f,i[s+r]=q,i}Wb.exports=lG
+});var db=c(function(qX,Xb){
+var hb=require('@stdlib/math/base/assert/is-nan/dist'),Yb=require('@stdlib/math/base/special/abs/dist');function pG(n,e,a,i,r,u,v){var s,o,t,f,q,m,p,l;if(o=i,t=v,s=0,n<=0)return r[t]=s,r[t+u]=0,r;if(n===1||a===0)return hb(e[o])?(r[t]=s,r[t+u]=0,r):(r[t]=e[o],r[t+u]=1,r);for(m=0,p=0,l=0;l=Yb(f)?m+=s-q+f:m+=f-q+s,s=q,p+=1),o+=a;return r[t]=s+m,r[t+u]=p,r}Xb.exports=pG
+});var rw=c(function(cX,Nb){
+var jG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),xb=$b(),gG=db();jG(xb,"ndarray",gG);Nb.exports=xb
+});var iw=c(function(mX,uw){
+var ew=require('@stdlib/math/base/assert/is-nan/dist'),aw=require('@stdlib/math/base/special/abs/dist');function bG(n,e,a){var i,r,u,v,s,o;if(n<=0)return 0;if(n===1||a===0)return ew(e[0])?0:e[0];for(a<0?r=(1-n)*a:r=0,i=0,s=0,o=0;o=aw(u)?s+=i-v+u:s+=u-v+i,i=v),r+=a;return i+s}uw.exports=bG
+});var tw=c(function(lX,sw){
+var nw=require('@stdlib/math/base/assert/is-nan/dist'),vw=require('@stdlib/math/base/special/abs/dist');function wG(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return nw(e[i])?0:e[i];for(u=i,r=0,o=0,t=0;t=vw(v)?o+=r-s+v:o+=v-s+r,r=s),u+=a;return r+o}sw.exports=wG
+});var be=c(function(pX,fw){
+var yG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),ow=iw(),RG=tw();yG(ow,"ndarray",RG);fw.exports=ow
+});var cw=c(function(jX,qw){
+var kG=be();function _G(n,e,a){return kG(n,e,a)}qw.exports=_G
+});var lw=c(function(gX,mw){
+var EG=be().ndarray;function OG(n,e,a,i){return EG(n,e,a,i)}mw.exports=OG
+});var gw=c(function(bX,jw){
+var FG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),pw=cw(),MG=lw();FG(pw,"ndarray",MG);jw.exports=pw
+});var yw=c(function(wX,ww){
+var bw=require('@stdlib/math/base/assert/is-nan/dist'),we=require('@stdlib/math/base/special/abs/dist');function TG(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return bw(e[0])?0:e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=we(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,we(v)>=we(f)?s=v-t+f:s=f-t+v,v=t,r+=s),u+=a;return i+v+r}ww.exports=TG
+});var _w=c(function(yX,kw){
+var Rw=require('@stdlib/math/base/assert/is-nan/dist'),ye=require('@stdlib/math/base/special/abs/dist');function SG(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||a===0)return Rw(e[i])?0:e[i];for(v=i,r=0,u=0,s=0,m=0;m=ye(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,ye(s)>=ye(q)?o=s-f+q:o=q-f+s,s=f,u+=o),v+=a;return r+s+u}kw.exports=SG
+});var Fw=c(function(RX,Ow){
+var ZG=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Ew=yw(),PG=_w();ZG(Ew,"ndarray",PG);Ow.exports=Ew
+});var Sw=c(function(kX,Tw){
+var Mw=require('@stdlib/math/base/assert/is-nan/dist');function AG(n,e,a){var i,r,u;if(r=0,n<=0)return r;if(n===1||a===0)return Mw(e[0])?r:e[0];for(a<0?i=(1-n)*a:i=0,u=0;u0)for(r=0;r0)for(f=0;f0)o-=1,m=a[v+o*i],p=r[s+o*u];else{if(g-=1,g===0)return a;l=v+g*i,m=a[l],j=s+g*u,p=r[j],a[l]=a[v],r[j]=r[s]}for(b=o,t=b*2+1;tq||xw(f)||f===q&&dw(f))&&(t+=1)),f=a[v+t*i],f>m||xw(f)||f===m&&dw(f));)a[v+b*i]=f,r[s+b*u]=r[s+t*u],b=t,t=b*2+1;a[v+b*i]=m,r[s+b*u]=p}}Nw.exports=eI
+});var iy=c(function(LX,uy){
+var ey=require('@stdlib/math/base/assert/is-positive-zero/dist'),ay=require('@stdlib/math/base/assert/is-nan/dist'),aI=require('@stdlib/math/base/special/floor/dist');function uI(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g,b,R;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),g=n,o=aI(n/2);;){if(o>0)o-=1,m=a[r+o*i],p=u[s+o*v];else{if(g-=1,g===0)return a;l=r+g*i,m=a[l],j=s+g*v,p=u[j],a[l]=a[r],u[j]=u[s]}for(b=o,t=b*2+1;tq||ay(f)||f===q&&ey(f))&&(t+=1)),f=a[r+t*i],f>m||ay(f)||f===m&&ey(f));)a[r+b*i]=f,u[s+b*v]=u[s+t*v],b=t,t=b*2+1;a[r+b*i]=m,u[s+b*v]=p}}uy.exports=uI
+});var sy=c(function(BX,vy){
+var iI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),ny=ry(),nI=iy();iI(ny,"ndarray",nI);vy.exports=ny
+});var fy=c(function(CX,oy){
+var ke=require('@stdlib/math/base/assert/is-negative-zero/dist'),ty=require('@stdlib/math/base/assert/is-nan/dist');function vI(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,j,g,b,R;if(n<=0||e===0)return a;if(e<0&&(i*=-1,u*=-1),u<0?(p=(1-n)*u,l=0):(p=0,l=(n-1)*u),q=p+u,i<0){for(t=(1-n)*i,f=0,s=t+i,R=1;Rf;)a[o]=a[o+i],r[m]=r[m+u],o+=i,m+=u;a[f]=j,r[l]=g}else{for(v=ke(j),o=s-i,m=q-u;o<=t&&(b=a[o],!(b<=j&&!(v&&b===j&&ke(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=j,r[m+u]=g,s+=i,q+=u}return a}for(t=0,f=(n-1)*i,s=t+i,R=1;R=t&&(b=a[o],!(b<=j&&!(v&&b===j&&ke(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=j,r[m+u]=g,s+=i,q+=u}return a}oy.exports=vI
+});var my=c(function(GX,cy){
+var _e=require('@stdlib/math/base/assert/is-negative-zero/dist'),qy=require('@stdlib/math/base/assert/is-nan/dist');function sI(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g,b,R,_,k;if(n<=0||e===0)return a;if(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),q=r,m=q+(n-1)*i,t=q+i,j=s,g=j+(n-1)*v,p=j+v,i<0){for(k=1;km;)a[f]=a[f+i],u[l]=u[l+v],f+=i,l+=v;a[m]=b,u[g]=R}else{for(o=_e(b),f=t-i,l=p-v;f<=q&&(_=a[f],!(_<=b&&!(o&&_===b&&_e(_)===!1)));)a[f+i]=_,u[l+v]=u[l],f-=i,l-=v;a[f+i]=b,u[l+v]=R,t+=i,p+=v}return a}for(k=1;k=q&&(_=a[f],!(_<=b&&!(o&&_===b&&_e(_)===!1)));)a[f+i]=_,u[l+v]=u[l],f-=i,l-=v;a[f+i]=b,u[l+v]=R,t+=i,p+=v}return a}cy.exports=sI
+});var jy=c(function(IX,py){
+var tI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),ly=fy(),oI=my();tI(ly,"ndarray",oI);py.exports=ly
+});var Fi=c(function(KX,fI){fI.exports=[701,301,132,57,23,10,4,1]});var wy=c(function(VX,by){
+var qI=require('@stdlib/math/base/assert/is-negative-zero/dist'),cI=require('@stdlib/math/base/assert/is-nan/dist'),gy=Fi(),mI=gy.length;function lI(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,j;if(n<=0||e===0)return a;for(e<0&&(i*=-1,u*=-1),i<0?v=(1-n)*i:v=0,u<0?s=(1-n)*u:s=0,p=0;p=t&&(m=a[v+(j-t)*i],!(m<=f&&!(o&&m===f)));j-=t)a[v+j*i]=m,r[s+j*u]=r[s+(j-t)*u];a[v+j*i]=f,r[s+j*u]=q}return a}by.exports=lI
+});var ky=c(function(zX,Ry){
+var pI=require('@stdlib/math/base/assert/is-negative-zero/dist'),jI=require('@stdlib/math/base/assert/is-nan/dist'),yy=Fi(),gI=yy.length;function bI(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),p=0;p=t&&(m=a[r+(j-t)*i],!(m<=f&&!(o&&m===f)));j-=t)a[r+j*i]=m,u[s+j*v]=u[s+(j-t)*v];a[r+j*i]=f,u[s+j*v]=q}return a}Ry.exports=bI
+});var Oy=c(function(DX,Ey){
+var wI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),_y=wy(),yI=ky();wI(_y,"ndarray",yI);Ey.exports=_y
+});var Sy=c(function(HX,Ty){
+var Fy=require('@stdlib/math/base/assert/is-positive-zero/dist'),My=require('@stdlib/math/base/assert/is-nan/dist'),RI=require('@stdlib/math/base/special/floor/dist');function kI(n,e,a,i){var r,u,v,s,o,t,f,q,m,p;if(n<=0||e===0)return a;for(e<0&&(i*=-1),i<0?r=(1-n)*i:r=0,t=n,u=RI(n/2);;){if(u>0)u-=1,f=a[r+u*i];else{if(t-=1,t===0)return a;q=r+t*i,f=a[q],a[q]=a[r]}for(m=u,v=m*2+1;vo||My(s)||s===o&&Fy(s))&&(v+=1)),s=a[r+v*i],s>f||My(s)||s===f&&Fy(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}Ty.exports=kI
+});var Ly=c(function(JX,Ay){
+var Zy=require('@stdlib/math/base/assert/is-positive-zero/dist'),Py=require('@stdlib/math/base/assert/is-nan/dist'),_I=require('@stdlib/math/base/special/floor/dist');function EI(n,e,a,i,r){var u,v,s,o,t,f,q,m,p;if(n<=0||e===0)return a;for(e<0&&(i*=-1,r-=(n-1)*i),t=n,u=_I(n/2);;){if(u>0)u-=1,f=a[r+u*i];else{if(t-=1,t===0)return a;q=r+t*i,f=a[q],a[q]=a[r]}for(m=u,v=m*2+1;vo||Py(s)||s===o&&Zy(s))&&(v+=1)),s=a[r+v*i],s>f||Py(s)||s===f&&Zy(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}Ay.exports=EI
+});var Gy=c(function(QX,Cy){
+var OI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),By=Sy(),FI=Ly();OI(By,"ndarray",FI);Cy.exports=By
+});var Vy=c(function(UX,Ky){
+var Ee=require('@stdlib/math/base/assert/is-negative-zero/dist'),Iy=require('@stdlib/math/base/assert/is-nan/dist');function MI(n,e,a,i){var r,u,v,s,o,t,f,q;if(n<=0||e===0)return a;if(e<0&&(i*=-1),i<0){for(s=(1-n)*i,o=0,u=s+i,q=1;qo;)a[v]=a[v+i],v+=i;a[o]=t}else{for(r=Ee(t),v=u-i;v<=s&&(f=a[v],!(f<=t&&!(r&&f===t&&Ee(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}for(s=0,o=(n-1)*i,u=s+i,q=1;q=s&&(f=a[v],!(f<=t&&!(r&&f===t&&Ee(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}Ky.exports=MI
+});var Hy=c(function(WX,Dy){
+var Oe=require('@stdlib/math/base/assert/is-negative-zero/dist'),zy=require('@stdlib/math/base/assert/is-nan/dist');function TI(n,e,a,i,r){var u,v,s,o,t,f,q,m;if(n<=0||e===0)return a;if(e<0&&(i*=-1,r-=(n-1)*i),o=r,t=o+(n-1)*i,v=o+i,i<0){for(m=1;mt;)a[s]=a[s+i],s+=i;a[t]=f}else{for(u=Oe(f),s=v-i;s<=o&&(q=a[s],!(q<=f&&!(u&&q===f&&Oe(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}for(m=1;m=o&&(q=a[s],!(q<=f&&!(u&&q===f&&Oe(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}Dy.exports=TI
+});var Uy=c(function($X,Qy){
+var SI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),Jy=Vy(),ZI=Hy();SI(Jy,"ndarray",ZI);Qy.exports=Jy
+});var Mi=c(function(hX,PI){PI.exports=[701,301,132,57,23,10,4,1]});var hy=c(function(YX,$y){
+var AI=require('@stdlib/math/base/assert/is-negative-zero/dist'),LI=require('@stdlib/math/base/assert/is-nan/dist'),Wy=Mi(),BI=Wy.length;function CI(n,e,a,i){var r,u,v,s,o,t,f,q;if(n<=0||e===0)return a;for(e<0&&(i*=-1),i<0?r=(1-n)*i:r=0,t=0;t=v&&(o=a[r+(q-v)*i],!(o<=s&&!(u&&o===s)));q-=v)a[r+q*i]=o;a[r+q*i]=s}return a}$y.exports=CI
+});var dy=c(function(XX,Xy){
+var GI=require('@stdlib/math/base/assert/is-negative-zero/dist'),II=require('@stdlib/math/base/assert/is-nan/dist'),Yy=Mi(),KI=Yy.length;function VI(n,e,a,i,r){var u,v,s,o,t,f,q;if(n<=0||e===0)return a;for(e<0&&(i*=-1,r-=(n-1)*i),t=0;t=v&&(o=a[r+(q-v)*i],!(o<=s&&!(u&&o===s)));q-=v)a[r+q*i]=o;a[r+q*i]=s}return a}Xy.exports=VI
+});var rR=c(function(dX,Ny){
+var zI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),xy=hy(),DI=dy();zI(xy,"ndarray",DI);Ny.exports=xy
+});var uR=c(function(xX,aR){
+var eR=require('@stdlib/math/base/special/abs/dist');function HI(n,e,a){var i,r,u,v,s,o;if(n<=0)return 0;if(n===1||a===0)return e[0];for(a<0?r=(1-n)*a:r=0,i=0,s=0,o=0;o=eR(u)?s+=i-v+u:s+=u-v+i,i=v,r+=a;return i+s}aR.exports=HI
+});var vR=c(function(NX,nR){
+var iR=require('@stdlib/math/base/special/abs/dist');function JI(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return e[i];for(u=i,r=0,o=0,t=0;t=iR(v)?o+=r-s+v:o+=v-s+r,r=s,u+=a;return r+o}nR.exports=JI
+});var Fe=c(function(rd,tR){
+var QI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),sR=uR(),UI=vR();QI(sR,"ndarray",UI);tR.exports=sR
+});var fR=c(function(ed,oR){
+var WI=Fe();function $I(n,e,a){return WI(n,e,a)}oR.exports=$I
+});var cR=c(function(ad,qR){
+var hI=Fe().ndarray;function YI(n,e,a,i){return hI(n,e,a,i)}qR.exports=YI
+});var pR=c(function(ud,lR){
+var XI=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),mR=fR(),dI=cR();XI(mR,"ndarray",dI);lR.exports=mR
+});var gR=c(function(id,jR){
+var Me=require('@stdlib/math/base/special/abs/dist');function xI(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=Me(o)?f=i-t+o:f=o-t+i,i=t,t=v+f,Me(v)>=Me(f)?s=v-t+f:s=f-t+v,v=t,r+=s,u+=a;return i+v+r}jR.exports=xI
+});var wR=c(function(nd,bR){
+var Te=require('@stdlib/math/base/special/abs/dist');function NI(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||a===0)return e[i];for(v=i,r=0,u=0,s=0,m=0;m=Te(t)?q=r-f+t:q=t-f+r,r=f,f=s+q,Te(s)>=Te(q)?o=s-f+q:o=q-f+s,s=f,u+=o,v+=a;return r+s+u}bR.exports=NI
+});var kR=c(function(vd,RR){
+var rK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),yR=gR(),eK=wR();rK(yR,"ndarray",eK);RR.exports=yR
+});var ER=c(function(sd,_R){
+var Ti=6;function aK(n,e,a){var i,r,u,v;if(u=0,n<=0)return u;if(n===1||a===0)return e[0];if(a===1){if(r=n%Ti,r>0)for(v=0;v0)for(s=0;s0)for(u=0;u0)for(s=0;s=WR(v)?o=W(o+W(W(r-s)+v)):o=W(o+W(W(v-s)+r)),r=s,u+=i;return W(r+o)}$R.exports=yK
+});var dR=c(function(bd,XR){
+var $=require('@stdlib/number/float64/base/to-float32/dist'),YR=require('@stdlib/math/base/special/abs/dist');function RK(n,e,a,i,r){var u,v,s,o,t,f;if(n<=0)return 0;if(n===1||i===0)return $(e+a[r]);for(v=r,u=0,t=0,f=0;f=YR(s)?t=$(t+$($(u-o)+s)):t=$(t+$($(s-o)+u)),u=o,v+=i;return $(u+t)}XR.exports=RK
+});var rk=c(function(wd,NR){
+var kK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),xR=hR(),_K=dR();kK(xR,"ndarray",_K);NR.exports=xR
+});var Pe=c(function(yd,ak){
+var EK=require("path").join,OK=require('@stdlib/utils/try-require/dist'),FK=require('@stdlib/assert/is-error/dist'),MK=rk(),Li,ek=OK(EK(__dirname,"./native.js"));FK(ek)?Li=MK:Li=ek;ak.exports=Li
+});var ik=c(function(Rd,uk){
+var TK=Pe();function SK(n,e,a,i){return TK(n,e,a,i)}uk.exports=SK
+});var vk=c(function(kd,nk){
+var ZK=Pe().ndarray;function PK(n,e,a,i,r){return ZK(n,e,a,i,r)}nk.exports=PK
+});var ok=c(function(_d,tk){
+var AK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),sk=ik(),LK=vk();AK(sk,"ndarray",LK);tk.exports=sk
+});var ck=c(function(Ed,qk){
+var BK=require("path").join,CK=require('@stdlib/utils/try-require/dist'),GK=require('@stdlib/assert/is-error/dist'),IK=ok(),Bi,fk=CK(BK(__dirname,"./native.js"));GK(fk)?Bi=IK:Bi=fk;qk.exports=Bi
+});var lk=c(function(Od,mk){
+var K=require('@stdlib/number/float64/base/to-float32/dist'),Ae=require('@stdlib/math/base/special/abs/dist');function KK(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||i===0)return K(e+a[0]);for(i<0?v=(1-n)*i:v=0,r=0,u=0,s=0,m=0;m=Ae(t)?q=K(K(r-f)+t):q=K(K(t-f)+r),r=f,f=K(s+q),Ae(s)>=Ae(q)?o=K(K(s-f)+q):o=K(K(q-f)+s),s=f,u=K(u+o),v+=i;return K(r+K(s+u))}mk.exports=KK
+});var jk=c(function(Fd,pk){
+var V=require('@stdlib/number/float64/base/to-float32/dist'),Le=require('@stdlib/math/base/special/abs/dist');function VK(n,e,a,i,r){var u,v,s,o,t,f,q,m,p;if(n<=0)return 0;if(n===1||i===0)return V(e+a[r]);for(s=r,u=0,v=0,o=0,p=0;p=Le(f)?m=V(V(u-q)+f):m=V(V(f-q)+u),u=q,q=V(o+m),Le(o)>=Le(m)?t=V(V(o-q)+m):t=V(V(m-q)+o),o=q,v=V(v+t),s+=i;return V(u+V(o+v))}pk.exports=VK
+});var wk=c(function(Md,bk){
+var zK=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),gk=lk(),DK=jk();zK(gk,"ndarray",DK);bk.exports=gk
+});var kk=c(function(Td,Rk){
+var HK=require("path").join,JK=require('@stdlib/utils/try-require/dist'),QK=require('@stdlib/assert/is-error/dist'),UK=wk(),Ci,yk=JK(HK(__dirname,"./native.js"));QK(yk)?Ci=UK:Ci=yk;Rk.exports=Ci
+});var Ek=c(function(Sd,_k){
+var Gi=require('@stdlib/number/float64/base/to-float32/dist');function WK(n,e,a,i){var r,u,v;if(n<=0)return 0;if(n===1||i===0)return Gi(e+a[0]);for(i<0?u=(1-n)*i:u=0,r=0,v=0;v=xk(t)?q=er(q+er(er(o-f)+t)):q=er(q+er(er(t-f)+o)),o=f,r[s]=er(o+q),v+=i,s+=u;return r}Nk.exports=RV
+});var u3=c(function(Hd,a3){
+var ar=require('@stdlib/number/float64/base/to-float32/dist'),e3=require('@stdlib/math/base/special/abs/dist');function kV(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l;if(n<=0)return u;for(o=r,t=s,f=e,p=0,l=0;l=e3(q)?p=ar(p+ar(ar(f-m)+q)):p=ar(p+ar(ar(q-m)+f)),f=m,u[t]=ar(f+p),o+=i,t+=v;return u}a3.exports=kV
+});var v3=c(function(Jd,n3){
+var _V=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),i3=r3(),EV=u3();_V(i3,"ndarray",EV);n3.exports=i3
+});var Be=c(function(Qd,t3){
+var OV=require("path").join,FV=require('@stdlib/utils/try-require/dist'),MV=require('@stdlib/assert/is-error/dist'),TV=v3(),Wi,s3=FV(OV(__dirname,"./native.js"));MV(s3)?Wi=TV:Wi=s3;t3.exports=Wi
+});var f3=c(function(Ud,o3){
+var SV=Be();function ZV(n,e,a,i,r,u){return SV(n,e,a,i,r,u)}o3.exports=ZV
+});var c3=c(function(Wd,q3){
+var PV=Be().ndarray;function AV(n,e,a,i,r,u,v,s){return PV(n,e,a,i,r,u,v,s)}q3.exports=AV
+});var p3=c(function($d,l3){
+var LV=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),m3=f3(),BV=c3();LV(m3,"ndarray",BV);l3.exports=m3
+});var b3=c(function(hd,g3){
+var CV=require("path").join,GV=require('@stdlib/utils/try-require/dist'),IV=require('@stdlib/assert/is-error/dist'),KV=p3(),$i,j3=GV(CV(__dirname,"./native.js"));IV(j3)?$i=KV:$i=j3;g3.exports=$i
+});var y3=c(function(Yd,w3){
+var z=require('@stdlib/number/float64/base/to-float32/dist'),Ce=require('@stdlib/math/base/special/abs/dist');function VV(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l;if(n<=0)return r;for(i<0?s=(1-n)*i:s=0,u<0?o=(1-n)*u:o=0,v=0,t=0,l=0;l=Ce(q)?p=z(z(e-m)+q):p=z(z(q-m)+e),e=m,m=z(t+p),Ce(t)>=Ce(p)?f=z(z(t-m)+p):f=z(z(p-m)+t),t=m,v=z(v+f),r[o]=z(e+z(t+v)),s+=i,o+=u;return r}w3.exports=VV
+});var k3=c(function(Xd,R3){
+var D=require('@stdlib/number/float64/base/to-float32/dist'),Ge=require('@stdlib/math/base/special/abs/dist');function zV(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g;if(n<=0)return u;for(t=r,f=s,o=0,q=0,g=0;g=Ge(p)?j=D(D(e-l)+p):j=D(D(p-l)+e),e=l,l=D(q+j),Ge(q)>=Ge(j)?m=D(D(q-l)+j):m=D(D(j-l)+q),q=l,o=D(o+m),u[f]=D(e+D(q+o)),t+=i,f+=v;return u}R3.exports=zV
+});var O3=c(function(dd,E3){
+var DV=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),_3=y3(),HV=k3();DV(_3,"ndarray",HV);E3.exports=_3
+});var T3=c(function(xd,M3){
+var JV=require("path").join,QV=require('@stdlib/utils/try-require/dist'),UV=require('@stdlib/assert/is-error/dist'),WV=O3(),hi,F3=QV(JV(__dirname,"./native.js"));UV(F3)?hi=WV:hi=F3;M3.exports=hi
+});var Z3=c(function(Nd,S3){
+var $V=require('@stdlib/number/float64/base/to-float32/dist');function hV(n,e,a,i,r,u){var v,s,o;if(n<=0)return r;for(i<0?v=(1-n)*i:v=0,u<0?s=(1-n)*u:s=0,o=0;o0)for(u=0;u0)for(s=0;s=t4(u)?s=vr(s+vr(vr(i-v)+u)):s=vr(s+vr(vr(u-v)+i)),i=v),r+=a;return vr(i+s)}o4.exports=SD
+});var l4=c(function(Gx,m4){
+var sr=require('@stdlib/number/float64/base/to-float32/dist'),q4=require('@stdlib/math/base/assert/is-nanf/dist'),c4=require('@stdlib/math/base/special/abs/dist');function ZD(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return q4(e[i])?0:e[i];for(u=i,r=0,o=0,t=0;t=c4(v)?o=sr(o+sr(sr(r-s)+v)):o=sr(o+sr(sr(v-s)+r)),r=s),u+=a;return sr(r+o)}m4.exports=ZD
+});var g4=c(function(Ix,j4){
+var PD=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),p4=f4(),AD=l4();PD(p4,"ndarray",AD);j4.exports=p4
+});var He=c(function(Kx,w4){
+var LD=require("path").join,BD=require('@stdlib/utils/try-require/dist'),CD=require('@stdlib/assert/is-error/dist'),GD=g4(),jn,b4=BD(LD(__dirname,"./native.js"));CD(b4)?jn=GD:jn=b4;w4.exports=jn
+});var R4=c(function(Vx,y4){
+var ID=He();function KD(n,e,a){return ID(n,e,a)}y4.exports=KD
+});var _4=c(function(zx,k4){
+var VD=He().ndarray;function zD(n,e,a,i){return VD(n,e,a,i)}k4.exports=zD
+});var F4=c(function(Dx,O4){
+var DD=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),E4=R4(),HD=_4();DD(E4,"ndarray",HD);O4.exports=E4
+});var S4=c(function(Hx,T4){
+var JD=require("path").join,QD=require('@stdlib/utils/try-require/dist'),UD=require('@stdlib/assert/is-error/dist'),WD=F4(),gn,M4=QD(JD(__dirname,"./native.js"));UD(M4)?gn=WD:gn=M4;T4.exports=gn
+});var A4=c(function(Jx,P4){
+var H=require('@stdlib/number/float64/base/to-float32/dist'),Z4=require('@stdlib/math/base/assert/is-nanf/dist'),Je=require('@stdlib/math/base/special/abs/dist');function $D(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return Z4(e[0])?0:e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=Je(o)?f=H(H(i-t)+o):f=H(H(o-t)+i),i=t,t=H(v+f),Je(v)>=Je(f)?s=H(H(v-t)+f):s=H(H(f-t)+v),v=t,r=H(r+s)),u+=a;return H(i+H(v+r))}P4.exports=$D
+});var C4=c(function(Qx,B4){
+var J=require('@stdlib/number/float64/base/to-float32/dist'),L4=require('@stdlib/math/base/assert/is-nanf/dist'),Qe=require('@stdlib/math/base/special/abs/dist');function hD(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||a===0)return L4(e[i])?0:e[i];for(v=i,r=0,u=0,s=0,m=0;m=Qe(t)?q=J(J(r-f)+t):q=J(J(t-f)+r),r=f,f=J(s+q),Qe(s)>=Qe(q)?o=J(J(s-f)+q):o=J(J(q-f)+s),s=f,u=J(u+o)),v+=a;return J(r+J(s+u))}B4.exports=hD
+});var K4=c(function(Ux,I4){
+var YD=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),G4=A4(),XD=C4();YD(G4,"ndarray",XD);I4.exports=G4
+});var D4=c(function(Wx,z4){
+var dD=require("path").join,xD=require('@stdlib/utils/try-require/dist'),ND=require('@stdlib/assert/is-error/dist'),rH=K4(),bn,V4=xD(dD(__dirname,"./native.js"));ND(V4)?bn=rH:bn=V4;z4.exports=bn
+});var Q4=c(function($x,J4){
+var eH=require('@stdlib/number/float64/base/to-float32/dist'),H4=require('@stdlib/math/base/assert/is-nanf/dist');function aH(n,e,a){var i,r,u;if(i=0,n<=0)return i;if(n===1||a===0)return H4(e[0])?i:e[0];for(a<0?r=(1-n)*a:r=0,u=0;u0)for(r=0;r0)for(t=0;t0)o-=1,m=a[v+o*i],p=r[s+o*u];else{if(g-=1,g===0)return a;l=v+g*i,m=a[l],j=s+g*u,p=r[j],a[l]=a[v],r[j]=r[s]}for(b=o,t=b*2+1;tq||R8(f)||f===q&&y8(f))&&(t+=1)),f=a[v+t*i],f>m||R8(f)||f===m&&y8(f));)a[v+b*i]=f,r[s+b*u]=r[s+t*u],b=t,t=b*2+1;a[v+b*i]=m,r[s+b*u]=p}}k8.exports=LH
+});var M8=c(function(vN,F8){
+var E8=require('@stdlib/math/base/assert/is-positive-zerof/dist'),O8=require('@stdlib/math/base/assert/is-nanf/dist'),BH=require('@stdlib/math/base/special/floor/dist');function CH(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g,b,R;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),g=n,o=BH(n/2);;){if(o>0)o-=1,m=a[r+o*i],p=u[s+o*v];else{if(g-=1,g===0)return a;l=r+g*i,m=a[l],j=s+g*v,p=u[j],a[l]=a[r],u[j]=u[s]}for(b=o,t=b*2+1;tq||O8(f)||f===q&&E8(f))&&(t+=1)),f=a[r+t*i],f>m||O8(f)||f===m&&E8(f));)a[r+b*i]=f,u[s+b*v]=u[s+t*v],b=t,t=b*2+1;a[r+b*i]=m,u[s+b*v]=p}}F8.exports=CH
+});var Z8=c(function(sN,S8){
+var GH=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),T8=_8(),IH=M8();GH(T8,"ndarray",IH);S8.exports=T8
+});var L8=c(function(tN,A8){
+var KH=require("path").join,VH=require('@stdlib/utils/try-require/dist'),zH=require('@stdlib/assert/is-error/dist'),DH=Z8(),En,P8=VH(KH(__dirname,"./native.js"));zH(P8)?En=DH:En=P8;A8.exports=En
+});var G8=c(function(oN,C8){
+var We=require('@stdlib/math/base/assert/is-negative-zerof/dist'),B8=require('@stdlib/math/base/assert/is-nanf/dist');function HH(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,j,g,b,R;if(n<=0||e===0)return a;if(e<0&&(i*=-1,u*=-1),u<0?(p=(1-n)*u,l=0):(p=0,l=(n-1)*u),q=p+u,i<0){for(t=(1-n)*i,f=0,s=t+i,R=1;Rf;)a[o]=a[o+i],r[m]=r[m+u],o+=i,m+=u;a[f]=j,r[l]=g}else{for(v=We(j),o=s-i,m=q-u;o<=t&&(b=a[o],!(b<=j&&!(v&&b===j&&We(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=j,r[m+u]=g,s+=i,q+=u}return a}for(t=0,f=(n-1)*i,s=t+i,R=1;R=t&&(b=a[o],!(b<=j&&!(v&&b===j&&We(b)===!1)));)a[o+i]=b,r[m+u]=r[m],o-=i,m-=u;a[o+i]=j,r[m+u]=g,s+=i,q+=u}return a}C8.exports=HH
+});var V8=c(function(fN,K8){
+var $e=require('@stdlib/math/base/assert/is-negative-zerof/dist'),I8=require('@stdlib/math/base/assert/is-nanf/dist');function JH(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j,g,b,R,_,k;if(n<=0||e===0)return a;if(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),q=r,m=q+(n-1)*i,t=q+i,j=s,g=j+(n-1)*v,p=j+v,i<0){for(k=1;km;)a[f]=a[f+i],u[l]=u[l+v],f+=i,l+=v;a[m]=b,u[g]=R}else{for(o=$e(b),f=t-i,l=p-v;f<=q&&(_=a[f],!(_<=b&&!(o&&_===b&&$e(_)===!1)));)a[f+i]=_,u[l+v]=u[l],f-=i,l-=v;a[f+i]=b,u[l+v]=R,t+=i,p+=v}return a}for(k=1;k=q&&(_=a[f],!(_<=b&&!(o&&_===b&&$e(_)===!1)));)a[f+i]=_,u[l+v]=u[l],f-=i,l-=v;a[f+i]=b,u[l+v]=R,t+=i,p+=v}return a}K8.exports=JH
+});var H8=c(function(qN,D8){
+var QH=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),z8=G8(),UH=V8();QH(z8,"ndarray",UH);D8.exports=z8
+});var U8=c(function(cN,Q8){
+var WH=require("path").join,$H=require('@stdlib/utils/try-require/dist'),hH=require('@stdlib/assert/is-error/dist'),YH=H8(),On,J8=$H(WH(__dirname,"./native.js"));hH(J8)?On=YH:On=J8;Q8.exports=On
+});var Fn=c(function(mN,XH){XH.exports=[701,301,132,57,23,10,4,1]});var h8=c(function(lN,$8){
+var dH=require('@stdlib/math/base/assert/is-negative-zerof/dist'),xH=require('@stdlib/math/base/assert/is-nanf/dist'),W8=Fn(),NH=W8.length;function rJ(n,e,a,i,r,u){var v,s,o,t,f,q,m,p,l,j;if(n<=0||e===0)return a;for(e<0&&(i*=-1,u*=-1),i<0?v=(1-n)*i:v=0,u<0?s=(1-n)*u:s=0,p=0;p=t&&(m=a[v+(j-t)*i],!(m<=f&&!(o&&m===f)));j-=t)a[v+j*i]=m,r[s+j*u]=r[s+(j-t)*u];a[v+j*i]=f,r[s+j*u]=q}return a}$8.exports=rJ
+});var d8=c(function(pN,X8){
+var eJ=require('@stdlib/math/base/assert/is-negative-zerof/dist'),aJ=require('@stdlib/math/base/assert/is-nanf/dist'),Y8=Fn(),uJ=Y8.length;function iJ(n,e,a,i,r,u,v,s){var o,t,f,q,m,p,l,j;if(n<=0||e===0)return a;for(e<0&&(i*=-1,v*=-1,r-=(n-1)*i,s-=(n-1)*v),p=0;p=t&&(m=a[r+(j-t)*i],!(m<=f&&!(o&&m===f)));j-=t)a[r+j*i]=m,u[s+j*v]=u[s+(j-t)*v];a[r+j*i]=f,u[s+j*v]=q}return a}X8.exports=iJ
+});var rE=c(function(jN,N8){
+var nJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),x8=h8(),vJ=d8();nJ(x8,"ndarray",vJ);N8.exports=x8
+});var uE=c(function(gN,aE){
+var sJ=require("path").join,tJ=require('@stdlib/utils/try-require/dist'),oJ=require('@stdlib/assert/is-error/dist'),fJ=rE(),Mn,eE=tJ(sJ(__dirname,"./native.js"));oJ(eE)?Mn=fJ:Mn=eE;aE.exports=Mn
+});var sE=c(function(bN,vE){
+var iE=require('@stdlib/math/base/assert/is-positive-zerof/dist'),nE=require('@stdlib/math/base/assert/is-nanf/dist'),qJ=require('@stdlib/math/base/special/floor/dist');function cJ(n,e,a,i){var r,u,v,s,o,t,f,q,m,p;if(n<=0||e===0)return a;for(e<0&&(i*=-1),i<0?r=(1-n)*i:r=0,t=n,u=qJ(n/2);;){if(u>0)u-=1,f=a[r+u*i];else{if(t-=1,t===0)return a;q=r+t*i,f=a[q],a[q]=a[r]}for(m=u,v=m*2+1;vo||nE(s)||s===o&&iE(s))&&(v+=1)),s=a[r+v*i],s>f||nE(s)||s===f&&iE(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}vE.exports=cJ
+});var qE=c(function(wN,fE){
+var tE=require('@stdlib/math/base/assert/is-positive-zerof/dist'),oE=require('@stdlib/math/base/assert/is-nanf/dist'),mJ=require('@stdlib/math/base/special/floor/dist');function lJ(n,e,a,i,r){var u,v,s,o,t,f,q,m,p;if(n<=0||e===0)return a;for(e<0&&(i*=-1,r-=(n-1)*i),t=n,u=mJ(n/2);;){if(u>0)u-=1,f=a[r+u*i];else{if(t-=1,t===0)return a;q=r+t*i,f=a[q],a[q]=a[r]}for(m=u,v=m*2+1;vo||oE(s)||s===o&&tE(s))&&(v+=1)),s=a[r+v*i],s>f||oE(s)||s===f&&tE(s));)a[r+m*i]=s,m=v,v=m*2+1;a[r+m*i]=f}}fE.exports=lJ
+});var lE=c(function(yN,mE){
+var pJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),cE=sE(),jJ=qE();pJ(cE,"ndarray",jJ);mE.exports=cE
+});var gE=c(function(RN,jE){
+var gJ=require("path").join,bJ=require('@stdlib/utils/try-require/dist'),wJ=require('@stdlib/assert/is-error/dist'),yJ=lE(),Tn,pE=bJ(gJ(__dirname,"./native.js"));wJ(pE)?Tn=yJ:Tn=pE;jE.exports=Tn
+});var yE=c(function(kN,wE){
+var he=require('@stdlib/math/base/assert/is-negative-zerof/dist'),bE=require('@stdlib/math/base/assert/is-nanf/dist');function RJ(n,e,a,i){var r,u,v,s,o,t,f,q;if(n<=0||e===0)return a;if(e<0&&(i*=-1),i<0){for(s=(1-n)*i,o=0,u=s+i,q=1;qo;)a[v]=a[v+i],v+=i;a[o]=t}else{for(r=he(t),v=u-i;v<=s&&(f=a[v],!(f<=t&&!(r&&f===t&&he(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}for(s=0,o=(n-1)*i,u=s+i,q=1;q=s&&(f=a[v],!(f<=t&&!(r&&f===t&&he(f)===!1)));)a[v+i]=f,v-=i;a[v+i]=t,u+=i}return a}wE.exports=RJ
+});var _E=c(function(_N,kE){
+var Ye=require('@stdlib/math/base/assert/is-negative-zerof/dist'),RE=require('@stdlib/math/base/assert/is-nanf/dist');function kJ(n,e,a,i,r){var u,v,s,o,t,f,q,m;if(n<=0||e===0)return a;if(e<0&&(i*=-1,r-=(n-1)*i),o=r,t=o+(n-1)*i,v=o+i,i<0){for(m=1;mt;)a[s]=a[s+i],s+=i;a[t]=f}else{for(u=Ye(f),s=v-i;s<=o&&(q=a[s],!(q<=f&&!(u&&q===f&&Ye(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}for(m=1;m=o&&(q=a[s],!(q<=f&&!(u&&q===f&&Ye(q)===!1)));)a[s+i]=q,s-=i;a[s+i]=f,v+=i}return a}kE.exports=kJ
+});var FE=c(function(EN,OE){
+var _J=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),EE=yE(),EJ=_E();_J(EE,"ndarray",EJ);OE.exports=EE
+});var SE=c(function(ON,TE){
+var OJ=require("path").join,FJ=require('@stdlib/utils/try-require/dist'),MJ=require('@stdlib/assert/is-error/dist'),TJ=FE(),Sn,ME=FJ(OJ(__dirname,"./native.js"));MJ(ME)?Sn=TJ:Sn=ME;TE.exports=Sn
+});var Zn=c(function(FN,SJ){SJ.exports=[701,301,132,57,23,10,4,1]});var AE=c(function(MN,PE){
+var ZJ=require('@stdlib/math/base/assert/is-negative-zerof/dist'),PJ=require('@stdlib/math/base/assert/is-nanf/dist'),ZE=Zn(),AJ=ZE.length;function LJ(n,e,a,i){var r,u,v,s,o,t,f,q;if(n<=0||e===0)return a;for(e<0&&(i*=-1),i<0?r=(1-n)*i:r=0,t=0;t=v&&(o=a[r+(q-v)*i],!(o<=s&&!(u&&o===s)));q-=v)a[r+q*i]=o;a[r+q*i]=s}return a}PE.exports=LJ
+});var CE=c(function(TN,BE){
+var BJ=require('@stdlib/math/base/assert/is-negative-zerof/dist'),CJ=require('@stdlib/math/base/assert/is-nanf/dist'),LE=Zn(),GJ=LE.length;function IJ(n,e,a,i,r){var u,v,s,o,t,f,q;if(n<=0||e===0)return a;for(e<0&&(i*=-1,r-=(n-1)*i),t=0;t=v&&(o=a[r+(q-v)*i],!(o<=s&&!(u&&o===s)));q-=v)a[r+q*i]=o;a[r+q*i]=s}return a}BE.exports=IJ
+});var KE=c(function(SN,IE){
+var KJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),GE=AE(),VJ=CE();KJ(GE,"ndarray",VJ);IE.exports=GE
+});var DE=c(function(ZN,zE){
+var zJ=require("path").join,DJ=require('@stdlib/utils/try-require/dist'),HJ=require('@stdlib/assert/is-error/dist'),JJ=KE(),Pn,VE=DJ(zJ(__dirname,"./native.js"));HJ(VE)?Pn=JJ:Pn=VE;zE.exports=Pn
+});var QE=c(function(PN,JE){
+var ur=require('@stdlib/number/float64/base/to-float32/dist'),HE=require('@stdlib/math/base/special/abs/dist');function QJ(n,e,a){var i,r,u,v,s,o;if(n<=0)return 0;if(n===1||a===0)return e[0];for(a<0?r=(1-n)*a:r=0,i=0,s=0,o=0;o=HE(u)?s=ur(s+ur(ur(i-v)+u)):s=ur(s+ur(ur(u-v)+i)),i=v,r+=a;return ur(i+s)}JE.exports=QJ
+});var $E=c(function(AN,WE){
+var ir=require('@stdlib/number/float64/base/to-float32/dist'),UE=require('@stdlib/math/base/special/abs/dist');function UJ(n,e,a,i){var r,u,v,s,o,t;if(n<=0)return 0;if(n===1||a===0)return e[i];for(u=i,r=0,o=0,t=0;t=UE(v)?o=ir(o+ir(ir(r-s)+v)):o=ir(o+ir(ir(v-s)+r)),r=s,u+=a;return ir(r+o)}WE.exports=UJ
+});var XE=c(function(LN,YE){
+var WJ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),hE=QE(),$J=$E();WJ(hE,"ndarray",$J);YE.exports=hE
+});var Xe=c(function(BN,xE){
+var hJ=require("path").join,YJ=require('@stdlib/utils/try-require/dist'),XJ=require('@stdlib/assert/is-error/dist'),dJ=XE(),An,dE=YJ(hJ(__dirname,"./native.js"));XJ(dE)?An=dJ:An=dE;xE.exports=An
+});var r6=c(function(CN,NE){
+var xJ=Xe();function NJ(n,e,a){return xJ(n,e,a)}NE.exports=NJ
+});var a6=c(function(GN,e6){
+var rQ=Xe().ndarray;function eQ(n,e,a,i){return rQ(n,e,a,i)}e6.exports=eQ
+});var n6=c(function(IN,i6){
+var aQ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),u6=r6(),uQ=a6();aQ(u6,"ndarray",uQ);i6.exports=u6
+});var t6=c(function(KN,s6){
+var iQ=require("path").join,nQ=require('@stdlib/utils/try-require/dist'),vQ=require('@stdlib/assert/is-error/dist'),sQ=n6(),Ln,v6=nQ(iQ(__dirname,"./native.js"));vQ(v6)?Ln=sQ:Ln=v6;s6.exports=Ln
+});var f6=c(function(VN,o6){
+var Q=require('@stdlib/number/float64/base/to-float32/dist'),de=require('@stdlib/math/base/special/abs/dist');function tQ(n,e,a){var i,r,u,v,s,o,t,f,q;if(n<=0)return 0;if(n===1||a===0)return e[0];for(a<0?u=(1-n)*a:u=0,i=0,r=0,v=0,q=0;q=de(o)?f=Q(Q(i-t)+o):f=Q(Q(o-t)+i),i=t,t=Q(v+f),de(v)>=de(f)?s=Q(Q(v-t)+f):s=Q(Q(f-t)+v),v=t,r=Q(r+s),u+=a;return Q(i+Q(v+r))}o6.exports=tQ
+});var c6=c(function(zN,q6){
+var U=require('@stdlib/number/float64/base/to-float32/dist'),xe=require('@stdlib/math/base/special/abs/dist');function oQ(n,e,a,i){var r,u,v,s,o,t,f,q,m;if(n<=0)return 0;if(n===1||a===0)return e[i];for(v=i,r=0,u=0,s=0,m=0;m=xe(t)?q=U(U(r-f)+t):q=U(U(t-f)+r),r=f,f=U(s+q),xe(s)>=xe(q)?o=U(U(s-f)+q):o=U(U(q-f)+s),s=f,u=U(u+o),v+=a;return U(r+U(s+u))}q6.exports=oQ
+});var p6=c(function(DN,l6){
+var fQ=require('@stdlib/utils/define-nonenumerable-read-only-property/dist'),m6=f6(),qQ=c6();fQ(m6,"ndarray",qQ);l6.exports=m6
+});var b6=c(function(HN,g6){
+var cQ=require("path").join,mQ=require('@stdlib/utils/try-require/dist'),lQ=require('@stdlib/assert/is-error/dist'),pQ=p6(),Bn,j6=mQ(cQ(__dirname,"./native.js"));lQ(j6)?Bn=pQ:Bn=j6;g6.exports=Bn
+});var y6=c(function(JN,w6){
+var jQ=require('@stdlib/number/float64/base/to-float32/dist');function gQ(n,e,a){var i,r,u;if(i=0,n<=0)return i;if(n===1||a===0)return e[0];for(a<0?r=(1-n)*a:r=0,u=0;u\n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nfunction ccopy( N, x, strideX, y, strideY ) {\n\tvar viewX;\n\tvar viewY;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tviewX = reinterpret( x, 0 );\n\tviewY = reinterpret( y, 0 );\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tfor ( i = 0; i < N*2; i += 2 ) {\n\t\t\tviewY[ i ] = viewX[ i ];\n\t\t\tviewY[ i+1 ] = viewX[ i+1 ];\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = 2 * (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = 2 * (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tsx = strideX * 2;\n\tsy = strideY * 2;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tviewY[ iy ] = viewX[ ix ];\n\t\tviewY[ iy+1 ] = viewX[ ix+1 ];\n\t\tix += sx;\n\t\tiy += sy;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ccopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' );\n\n\n// MAIN //\n\n/**\n* Copies values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Complex64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Complex64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Complex64Array} output array\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* ccopy( x.length, x, 1, 0, y, 1, 0 );\n*\n* var z = y.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nfunction ccopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar viewX;\n\tvar viewY;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tviewX = reinterpret( x, 0 );\n\tviewY = reinterpret( y, 0 );\n\tsx = strideX * 2;\n\tsy = strideY * 2;\n\tix = offsetX * 2;\n\tiy = offsetY * 2;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tviewY[ iy ] = viewX[ ix ];\n\t\tviewY[ iy+1 ] = viewX[ ix+1 ];\n\t\tix += sx;\n\t\tiy += sy;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ccopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar ccopy = require( './ccopy.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ccopy, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ccopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to copy values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.\n*\n* @module @stdlib/blas/base/ccopy\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n* var ccopy = require( '@stdlib/blas/base/ccopy' );\n*\n* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* ccopy( x.length, x, 1, y, 1 );\n*\n* var z = y.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n* var ccopy = require( '@stdlib/blas/base/ccopy' );\n*\n* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* ccopy.ndarray( x.length, x, 1, 0, y, 1, 0 );\n*\n* var z = y.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar ccopy;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tccopy = main;\n} else {\n\tccopy = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ccopy;\n\n// exports: { \"ndarray\": \"ccopy.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Float32Array = require( '@stdlib/array/float32' );\n\n\n// MAIN //\n\n/**\n* Interchanges two complex single-precision floating-point vectors.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Complex64Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Complex64Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {Complex64Array} `y`\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* cswap( x.length, x, 1, y, 1 );\n*\n* var z = y.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*\n* z = x.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 7.0\n*\n* im = imagf( z );\n* // returns 8.0\n*/\nfunction cswap( N, x, strideX, y, strideY ) {\n\tvar viewX;\n\tvar viewY;\n\tvar tmp;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\tvar j;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tviewX = new Float32Array( x.buffer, x.byteOffset, x.length*2 );\n\tviewY = new Float32Array( y.buffer, y.byteOffset, y.length*2 );\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tfor ( i = 0; i < N*2; i += 2 ) {\n\t\t\ttmp = viewX[ i ];\n\t\t\tviewX[ i ] = viewY[ i ];\n\t\t\tviewY[ i ] = tmp;\n\n\t\t\tj = i + 1;\n\t\t\ttmp = viewX[ j ];\n\t\t\tviewX[ j ] = viewY[ j ];\n\t\t\tviewY[ j ] = tmp;\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = 2 * (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = 2 * (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tsx = strideX * 2;\n\tsy = strideY * 2;\n\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = viewX[ ix ];\n\t\tviewX[ ix ] = viewY[ iy ];\n\t\tviewY[ iy ] = tmp;\n\n\t\ttmp = viewX[ ix+1 ];\n\t\tviewX[ ix+1 ] = viewY[ iy+1 ];\n\t\tviewY[ iy+1 ] = tmp;\n\n\t\tix += sx;\n\t\tiy += sy;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = cswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Float32Array = require( '@stdlib/array/float32' );\n\n\n// MAIN //\n\n/**\n* Interchanges two complex single-precision floating-point vectors.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Complex64Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Complex64Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Complex64Array} `y`\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* cswap( x.length, x, 1, 0, y, 1, 0 );\n*\n* var z = y.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*\n* z = x.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 7.0\n*\n* im = imagf( z );\n* // returns 8.0\n*/\nfunction cswap( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar viewX;\n\tvar viewY;\n\tvar tmp;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tviewX = new Float32Array( x.buffer, x.byteOffset, x.length*2 );\n\tviewY = new Float32Array( y.buffer, y.byteOffset, y.length*2 );\n\tsx = strideX * 2;\n\tsy = strideY * 2;\n\tix = offsetX * 2;\n\tiy = offsetY * 2;\n\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = viewX[ ix ];\n\t\tviewX[ ix ] = viewY[ iy ];\n\t\tviewY[ iy ] = tmp;\n\n\t\ttmp = viewX[ ix+1 ];\n\t\tviewX[ ix+1 ] = viewY[ iy+1 ];\n\t\tviewY[ iy+1 ] = tmp;\n\n\t\tix += sx;\n\t\tiy += sy;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = cswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar cswap = require( './cswap.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( cswap, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = cswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to interchange two complex single-precision floating-point vectors.\n*\n* @module @stdlib/blas/base/cswap\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n* var cswap = require( '@stdlib/blas/base/cswap' );\n*\n* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* cswap( x.length, x, 1, y, 1 );\n*\n* var z = y.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*\n* z = x.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 7.0\n*\n* im = imagf( z );\n* // returns 8.0\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n* var cswap = require( '@stdlib/blas/base/cswap' );\n*\n* var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );\n* var y = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n*\n* cswap.ndarray( x.length, x, 1, 0, y, 1, 0 );\n*\n* var z = y.get( 0 );\n* // returns \n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*\n* z = x.get( 0 );\n* // returns \n*\n* re = realf( z );\n* // returns 7.0\n*\n* im = imagf( z );\n* // returns 8.0\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar cswap;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tcswap = main;\n} else {\n\tcswap = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = cswap;\n\n// exports: { \"ndarray\": \"cswap.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {PositiveInteger} stride - `x` stride length\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = dasum( x.length, x, 1 );\n* // returns 15.0\n*/\nfunction dasum( N, x, stride ) {\n\tvar sum;\n\tvar m;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn sum;\n\t}\n\t// Use unrolled loops if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tsum += abs( x[i] );\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn sum;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tsum += abs(x[i]) + abs(x[i+1]) + abs(x[i+2]) + abs(x[i+3]) + abs(x[i+4]) + abs(x[i+5]); // eslint-disable-line max-len\n\t\t}\n\t\treturn sum;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tsum += abs( x[i] );\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - `x` stride length\n* @param {NonNegativeInteger} offset - starting `x` index\n* @returns {number} sum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = dasum( x.length, x, 1, 0 );\n* // returns 15.0\n*/\nfunction dasum( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tix = offset;\n\n\t// Use unrolled loops if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tsum += abs( x[ix] );\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn sum;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tsum += abs( x[ix] ) + abs( x[ix+1] ) + abs( x[ix+2] ) + abs( x[ix+3] ) + abs( x[ix+4] ) + abs( x[ix+5] ); // eslint-disable-line max-len\n\t\t\tix += M;\n\t\t}\n\t\treturn sum;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += abs( x[ix] );\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar dasum = require( './dasum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dasum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to compute the sum of absolute values.\n*\n* @module @stdlib/blas/base/dasum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dasum = require( '@stdlib/blas/base/dasum' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = dasum( x.length, x, 1 );\n* // returns 15.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dasum = require( '@stdlib/blas/base/dasum' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = dasum.ndarray( x.length, x, 1, 0 );\n* // returns 15.0\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar dasum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdasum = main;\n} else {\n\tdasum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dasum;\n\n// exports: { \"ndarray\": \"dasum.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 4;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a constant and adds the result to `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* daxpy( x.length, alpha, x, 1, y, 1 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\nfunction daxpy( N, alpha, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] += alpha * x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] += alpha * x[ i ];\n\t\t\ty[ i+1 ] += alpha * x[ i+1 ];\n\t\t\ty[ i+2 ] += alpha * x[ i+2 ];\n\t\t\ty[ i+3 ] += alpha * x[ i+3 ];\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] += alpha * x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = daxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 4;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a constant and adds the result to `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* daxpy( x.length, alpha, x, 1, 0, y, 1, 0 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\nfunction daxpy( N, alpha, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] += alpha * x[ ix ];\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] += alpha * x[ ix ];\n\t\t\ty[ iy+1 ] += alpha * x[ ix+1 ];\n\t\t\ty[ iy+2 ] += alpha * x[ ix+2 ];\n\t\t\ty[ iy+3 ] += alpha * x[ ix+3 ];\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] += alpha * x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = daxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar daxpy = require( './daxpy.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( daxpy, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = daxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to multiply a vector `x` and a constant and add the result to `y`.\n*\n* @module @stdlib/blas/base/daxpy\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var daxpy = require( '@stdlib/blas/base/daxpy' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* daxpy( x.length, alpha, x, 1, y, 1 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var daxpy = require( '@stdlib/blas/base/daxpy' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* daxpy.ndarray( x.length, alpha, x, 1, 0, y, 1, 0 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar daxpy;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdaxpy = main;\n} else {\n\tdaxpy = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = daxpy;\n\n// exports: { \"ndarray\": \"daxpy.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dcopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction dcopy( N, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] = x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] = x[ i ];\n\t\t\ty[ i+1 ] = x[ i+1 ];\n\t\t\ty[ i+2 ] = x[ i+2 ];\n\t\t\ty[ i+3 ] = x[ i+3 ];\n\t\t\ty[ i+4 ] = x[ i+4 ];\n\t\t\ty[ i+5 ] = x[ i+5 ];\n\t\t\ty[ i+6 ] = x[ i+6 ];\n\t\t\ty[ i+7 ] = x[ i+7 ];\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Float64Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dcopy( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction dcopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] = x[ ix ];\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] = x[ ix ];\n\t\t\ty[ iy+1 ] = x[ ix+1 ];\n\t\t\ty[ iy+2 ] = x[ ix+2 ];\n\t\t\ty[ iy+3 ] = x[ ix+3 ];\n\t\t\ty[ iy+4 ] = x[ ix+4 ];\n\t\t\ty[ iy+5 ] = x[ ix+5 ];\n\t\t\ty[ iy+6 ] = x[ ix+6 ];\n\t\t\ty[ iy+7 ] = x[ ix+7 ];\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar dcopy = require( './dcopy.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dcopy, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dcopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to copy values from `x` into `y`.\n*\n* @module @stdlib/blas/base/dcopy\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dcopy = require( '@stdlib/blas/base/dcopy' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dcopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dcopy = require( '@stdlib/blas/base/dcopy' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dcopy.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar dcopy;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdcopy = main;\n} else {\n\tdcopy = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dcopy;\n\n// exports: { \"ndarray\": \"dcopy.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {number} dot product of `x` and `y`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = ddot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*/\nfunction ddot( N, x, strideX, y, strideY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += x[ i ] * y[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn dot;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[ i ] * y[ i ] ) + ( x[ i+1 ] * y[ i+1 ] ) + ( x[ i+2 ] * y[ i+2 ] ) + ( x[ i+3 ] * y[ i+3 ] ) + ( x[ i+4 ] * y[ i+4 ] ); // eslint-disable-line max-len\n\t\t}\n\t\treturn dot;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = ( 1-N ) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = ( 1-N ) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += ( x[ ix ] * y[ iy ] );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ddot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y`.\n*\n* @param {integer} N - number of indexed elements\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {number} dot product of `x` and `y`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = ddot( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.0\n*/\nfunction ddot( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += ( x[ ix ] * y[ iy ] );\n\t\t\t\tix += 1;\n\t\t\t\tiy += 1;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn dot;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[ ix ] * y[ iy ] ) + ( x[ ix+1 ] * y[ iy+1 ] ) + ( x[ ix+2 ] * y[ iy+2 ] ) + ( x[ ix+3 ] * y[ iy+3 ] ) + ( x[ ix+4 ] * y[ iy+4 ] ); // eslint-disable-line max-len\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn dot;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += x[ ix ] * y[ iy ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ddot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar ddot = require( './ddot.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( ddot, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = ddot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to compute the dot product of two double-precision floating-point vectors.\n*\n* @module @stdlib/blas/base/ddot\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var ddot = require( '@stdlib/blas/base/ddot' );\n*\n* var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = ddot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var ddot = require( '@stdlib/blas/base/ddot' );\n*\n* var x = new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = ddot.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.0\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar ddot;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tddot = main;\n} else {\n\tddot = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ddot;\n\n// exports: { \"ndarray\": \"ddot.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar sqrt = require( '@stdlib/math/base/special/sqrt' );\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar pow = require( '@stdlib/math/base/special/pow' );\n\n\n// MAIN //\n\n/**\n* Computes the L2-norm of a double-precision floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {PositiveInteger} stride - stride length\n* @returns {number} L2-norm of `x`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = 3;\n*\n* var z = dnrm2( N, x, 1 );\n* // returns 3.0\n*/\nfunction dnrm2( N, x, stride ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar i;\n\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn abs( x[ 0 ] );\n\t}\n\tscale = 0.0;\n\tssq = 1.0;\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tif ( x[ i ] !== 0.0 ) {\n\t\t\tax = abs( x[ i ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tssq = 1.0 + ( ssq * pow( scale/ax, 2 ) );\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tssq += pow( ax/scale, 2 );\n\t\t\t}\n\t\t}\n\t}\n\treturn scale * sqrt( ssq );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnrm2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar sqrt = require( '@stdlib/math/base/special/sqrt' );\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar pow = require( '@stdlib/math/base/special/pow' );\n\n\n// MAIN //\n\n/**\n* Computes the L2-norm of a double-precision floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} L2-norm of `x`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var z = dnrm2( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction dnrm2( N, x, stride, offset ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar ix;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn abs( x[ offset ] );\n\t}\n\tix = offset;\n\tscale = 0.0;\n\tssq = 1.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( x[ ix ] !== 0.0 ) {\n\t\t\tax = abs( x[ ix ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tssq = 1.0 + ( ssq * pow( scale/ax, 2 ) );\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tssq += pow( ax/scale, 2 );\n\t\t\t}\n\t\t}\n\t\tix += stride;\n\t}\n\treturn scale * sqrt( ssq );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnrm2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar dnrm2 = require( './dnrm2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnrm2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnrm2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute the L2-norm of a double-precision floating-point vector.\n*\n* @module @stdlib/blas/base/dnrm2\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dnrm2 = require( '@stdlib/blas/base/dnrm2' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );\n* var N = 3;\n*\n* var z = dnrm2( N, x, 1 );\n* // returns 3.0\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var dnrm2 = require( '@stdlib/blas/base/dnrm2' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var z = dnrm2.ndarray( N, x, 2, 1 );\n* // returns 5.0\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar dnrm2;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnrm2 = main;\n} else {\n\tdnrm2 = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnrm2;\n\n// exports: { \"ndarray\": \"dnrm2.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {PositiveInteger} stride - index increment\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*/\nfunction dscal( N, alpha, x, stride ) {\n\tvar i;\n\tvar m;\n\n\tif ( N <= 0 || stride <= 0 || alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ i ] *= alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tx[ i ] *= alpha;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dscal;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );\n* var alpha = 5.0;\n*\n* dscal( 3, alpha, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, -20.0, 25.0, -30.0 ]\n*/\nfunction dscal( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] *= alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ ix ] *= alpha;\n\t\t\tx[ ix+1 ] *= alpha;\n\t\t\tx[ ix+2 ] *= alpha;\n\t\t\tx[ ix+3 ] *= alpha;\n\t\t\tx[ ix+4 ] *= alpha;\n\t\t\tix += M;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] *= alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dscal;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar dscal = require( './dscal.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dscal, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dscal;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to multiply a double-precision floating-point vector by a constant.\n*\n* @module @stdlib/blas/base/dscal\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dscal = require( '@stdlib/blas/base/dscal' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dscal = require( '@stdlib/blas/base/dscal' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dscal.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar dscal;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdscal = main;\n} else {\n\tdscal = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dscal;\n\n// exports: { \"ndarray\": \"dscal.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y` with extended accumulation and result.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {number} dot product of `x` and `y`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = dsdot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*/\nfunction dsdot( N, x, strideX, y, strideY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += x[ i ] * y[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn dot;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[i]*y[i] ) + ( x[i+1]*y[i+1] ) + ( x[i+2]*y[i+2] ) + ( x[i+3]*y[i+3] ) + ( x[i+4]*y[i+4] ); // eslint-disable-line max-len\n\t\t}\n\t\treturn dot;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = ( 1-N ) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = ( 1-N ) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += x[ ix ] * y[ iy ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y` with extended accumulation and result.\n*\n* @param {integer} N - number of indexed elements\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {number} dot product of `x` and `y`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = dsdot( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.0\n*/\nfunction dsdot( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += x[ ix ] * y[ iy ];\n\t\t\t\tix += 1;\n\t\t\t\tiy += 1;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn dot;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[ix]*y[iy] ) + ( x[ix+1]*y[iy+1] ) + ( x[ix+2]*y[iy+2] ) + ( x[ix+3]*y[iy+3] ) + ( x[ix+4]*y[iy+4] ); // eslint-disable-line max-len\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn dot;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += x[ ix ] * y[ iy ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar dsdot = require( './dsdot.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dsdot, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dsdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to compute the dot product of vectors `x` and `y` with extended accumulation and result.\n*\n* @module @stdlib/blas/base/dsdot\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var dsdot = require( '@stdlib/blas/base/dsdot' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = dsdot( x.length, x, 1, y, 1 );\n* // returns -12.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var dsdot = require( '@stdlib/blas/base/dsdot' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = dsdot.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // returns -12.0\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar dsdot;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdsdot = main;\n} else {\n\tdsdot = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dsdot;\n\n// exports: { \"ndarray\": \"dsdot.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Interchanges two double-precision floating-point vectors.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {Float64Array} `y`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dswap( x.length, x, 1, y, 1 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction dswap( N, x, strideX, y, strideY ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tvar j;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ i ];\n\t\t\t\tx[ i ] = y[ i ];\n\t\t\t\ty[ i ] = tmp;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ttmp = x[ i ];\n\t\t\tx[ i ] = y[ i ];\n\t\t\ty[ i ] = tmp;\n\n\t\t\tj = i + 1;\n\t\t\ttmp = x[ j ];\n\t\t\tx[ j ] = y[ j ];\n\t\t\ty[ j ] = tmp;\n\n\t\t\tj += 1;\n\t\t\ttmp = x[ j ];\n\t\t\tx[ j ] = y[ j ];\n\t\t\ty[ j ] = tmp;\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = y[ iy ];\n\t\ty[ iy ] = tmp;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Interchanges two double-precision floating-point vectors.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Float64Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Float64Array} `y`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dswap( x.length, x, 1, 0, y, 1, 0 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction dswap( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = y[ iy ];\n\t\t\t\ty[ iy ] = tmp;\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = y[ iy ];\n\t\t\ty[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = y[ iy+1 ];\n\t\t\ty[ iy+1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = y[ iy+2 ];\n\t\t\ty[ iy+2 ] = tmp;\n\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = y[ iy ];\n\t\ty[ iy ] = tmp;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar dswap = require( './dswap.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dswap, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to interchange two double-precision floating-point vectors.\n*\n* @module @stdlib/blas/base/dswap\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dswap = require( '@stdlib/blas/base/dswap' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dswap( x.length, x, 1, y, 1 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dswap = require( '@stdlib/blas/base/dswap' );\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* dswap.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar dswap;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdswap = main;\n} else {\n\tdswap = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dswap;\n\n// exports: { \"ndarray\": \"dswap.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {PositiveInteger} stride - `x` stride length\n* @returns {number} sum\n*\n* @example\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = gasum( x.length, x, 1 );\n* // 15.0\n*/\nfunction gasum( N, x, stride ) {\n\tvar sum;\n\tvar m;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn sum;\n\t}\n\t// Use unrolled loops if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tsum += abs( x[i] );\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn sum;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tsum += abs(x[i]) + abs(x[i+1]) + abs(x[i+2]) + abs(x[i+3]) + abs(x[i+4]) + abs(x[i+5]); // eslint-disable-line max-len\n\t\t}\n\t\treturn sum;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tsum += abs( x[i] );\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// VARIABLES //\n\nvar M = 6;\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - `x` stride length\n* @param {NonNegativeInteger} offset - starting `x` index\n* @returns {number} sum\n*\n* @example\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = gasum( x.length, x, 1, 0 );\n* // 15.0\n*/\nfunction gasum( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tix = offset;\n\n\t// Use unrolled loops if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tsum += abs( x[ix] );\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn sum;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tsum += abs( x[ix] ) + abs( x[ix+1] ) + abs( x[ix+2] ) + abs( x[ix+3] ) + abs( x[ix+4] ) + abs( x[ix+5] ); // eslint-disable-line max-len\n\t\t\tix += M;\n\t\t}\n\t\treturn sum;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum += abs( x[ix] );\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to compute the sum of absolute values.\n*\n* @module @stdlib/blas/base/gasum\n*\n* @example\n* var gasum = require( '@stdlib/blas/base/gasum' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = gasum( x.length, x, 1 );\n* // 15.0\n*\n* @example\n* // Use the `ndarray` interface...\n* var gasum = require( '@stdlib/blas/base/gasum' ).ndarray;\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = gasum( x.length, x, 1, 0 );\n* // 15.0\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 4;\n\n\n// MAIN //\n\n/**\n* Multiplies `x` by a constant and adds the result to `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NumericArray} y - destination array\n* @param {integer} strideY - `y` stride length\n* @returns {NumericArray} `y`\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 1.0, 1.0, 1.0, 1.0, 1.0 ];\n* var alpha = 5.0;\n*\n* gaxpy( x.length, alpha, x, 1, y, 1 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\nfunction gaxpy( N, alpha, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] += alpha * x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] += alpha * x[ i ];\n\t\t\ty[ i+1 ] += alpha * x[ i+1 ];\n\t\t\ty[ i+2 ] += alpha * x[ i+2 ];\n\t\t\ty[ i+3 ] += alpha * x[ i+3 ];\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] += alpha * x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gaxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 4;\n\n\n// MAIN //\n\n/**\n* Multiplies `x` by a constant and adds the result to `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {NumericArray} y - destination array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {NumericArray} `y`\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 1.0, 1.0, 1.0, 1.0, 1.0 ];\n* var alpha = 5.0;\n*\n* gaxpy( x.length, alpha, x, 1, 0, y, 1, 0 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\nfunction gaxpy( N, alpha, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] += alpha * x[ ix ];\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] += alpha * x[ ix ];\n\t\t\ty[ iy+1 ] += alpha * x[ ix+1 ];\n\t\t\ty[ iy+2 ] += alpha * x[ ix+2 ];\n\t\t\ty[ iy+3 ] += alpha * x[ ix+3 ];\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] += alpha * x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gaxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to multiply `x` and a constant and add the result to `y`.\n*\n* @module @stdlib/blas/base/gaxpy\n*\n* @example\n* var gaxpy = require( '@stdlib/blas/base/gaxpy' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 1.0, 1.0, 1.0, 1.0, 1.0 ];\n* var alpha = 5.0;\n*\n* gaxpy( x.length, alpha, x, 1, y, 1 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*\n* @example\n* var gaxpy = require( '@stdlib/blas/base/gaxpy' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 1.0, 1.0, 1.0, 1.0, 1.0 ];\n* var alpha = 5.0;\n*\n* gaxpy.ndarray( x.length, alpha, x, 1, 0, y, 1, 0 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @private\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Object} x - input array object\n* @param {Collection} x.data - input array data\n* @param {Array} x.accessors - array element accessors\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Object} y - output array object\n* @param {Collection} y.data - output array data\n* @param {Array} y.accessors - array element accessors\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Object} output array object\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var reinterpret64 = require( '@stdlib/strided/base/reinterpret-complex64' );\n*\n* function setter( data, idx, value ) {\n* data.set( value, idx );\n* }\n*\n* function getter( data, idx ) {\n* return data.get( idx );\n* }\n*\n* var x = {\n* 'data': new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] ),\n* 'accessors': [ getter, setter ]\n* };\n*\n* var y = {\n* 'data': new Complex64Array( [ 5.0, 6.0, 7.0, 8.0 ] ),\n* 'accessors': [ getter, setter ]\n* };\n*\n* gcopy( x.data.length, x, 1, 0, y, 1, 0 );\n*\n* var view = reinterpret64( y.data, 0 );\n* // view => [ 1.0, 2.0, 3.0, 4.0 ]\n*/\nfunction gcopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar set;\n\tvar get;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\t// Cache references to array data:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache a reference to the element accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\tix = offsetX;\n\tiy = offsetY;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tset( ybuf, iy, get( xbuf, ix ) );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Collection} y - destination array\n* @param {integer} strideY - `y` stride length\n* @returns {Collection} `y`\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction gcopy( N, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar ox;\n\tvar oy;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tox = arraylike2object( x );\n\toy = arraylike2object( y );\n\tif ( ox.accessorProtocol || oy.accessorProtocol ) {\n\t\tif ( strideX < 0 ) {\n\t\t\tix = (1-N) * strideX;\n\t\t} else {\n\t\t\tix = 0;\n\t\t}\n\t\tif ( strideY < 0 ) {\n\t\t\tiy = (1-N) * strideY;\n\t\t} else {\n\t\t\tiy = 0;\n\t\t}\n\t\taccessors( N, ox, strideX, ix, oy, strideY, iy );\n\t\treturn oy.data;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] = x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] = x[ i ];\n\t\t\ty[ i+1 ] = x[ i+1 ];\n\t\t\ty[ i+2 ] = x[ i+2 ];\n\t\t\ty[ i+3 ] = x[ i+3 ];\n\t\t\ty[ i+4 ] = x[ i+4 ];\n\t\t\ty[ i+5 ] = x[ i+5 ];\n\t\t\ty[ i+6 ] = x[ i+6 ];\n\t\t\ty[ i+7 ] = x[ i+7 ];\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Collection} y - destination array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Collection} `y`\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction gcopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar ox;\n\tvar oy;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tox = arraylike2object( x );\n\toy = arraylike2object( y );\n\tif ( ox.accessorProtocol || oy.accessorProtocol ) {\n\t\taccessors( N, ox, strideX, offsetX, oy, strideY, offsetY );\n\t\treturn oy.data;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] = x[ ix ];\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] = x[ ix ];\n\t\t\ty[ iy+1 ] = x[ ix+1 ];\n\t\t\ty[ iy+2 ] = x[ ix+2 ];\n\t\t\ty[ iy+3 ] = x[ ix+3 ];\n\t\t\ty[ iy+4 ] = x[ ix+4 ];\n\t\t\ty[ iy+5 ] = x[ ix+5 ];\n\t\t\ty[ iy+6 ] = x[ ix+6 ];\n\t\t\ty[ iy+7 ] = x[ ix+7 ];\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gcopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to copy values from `x` into `y`.\n*\n* @module @stdlib/blas/base/gcopy\n*\n* @example\n* var gcopy = require( '@stdlib/blas/base/gcopy' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* var gcopy = require( '@stdlib/blas/base/gcopy' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NumericArray} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {number} dot product of `x` and `y`\n*\n* @example\n* var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];\n* var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];\n\n* var z = gdot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*/\nfunction gdot( N, x, strideX, y, strideY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += x[ i ] * y[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn dot;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[i]*y[i] ) + ( x[i+1]*y[i+1] ) + ( x[i+2]*y[i+2] ) + ( x[i+3]*y[i+3] ) + ( x[i+4]*y[i+4] ); // eslint-disable-line max-len\n\t\t}\n\t\treturn dot;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = ( 1-N ) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = ( 1-N ) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += ( x[ ix ] * y[ iy ] );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y`.\n*\n* @param {integer} N - number of indexed elements\n* @param {NumericArray} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {NumericArray} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {number} dot product of `x` and `y`\n*\n* @example\n* var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];\n* var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];\n\n* var z = gdot( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.0\n*/\nfunction gdot( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += ( x[ ix ] * y[ iy ] );\n\t\t\t\tix += 1;\n\t\t\t\tiy += 1;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn dot;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[ix]*y[iy] ) + ( x[ix+1]*y[iy+1] ) + ( x[ix+2]*y[iy+2] ) + ( x[ix+3]*y[iy+3] ) + ( x[ix+4]*y[iy+4] ); // eslint-disable-line max-len\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn dot;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += x[ ix ] * y[ iy ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to compute the dot product of vectors `x` and `y`.\n*\n* @module @stdlib/blas/base/gdot\n*\n* @example\n* var gdot = require( '@stdlib/blas/base/gdot' );\n*\n* var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];\n* var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];\n*\n* var z = gdot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*\n* @example\n* var gdot = require( '@stdlib/blas/base/gdot' );\n*\n* var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];\n* var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];\n*\n* var z = gdot.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.0\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar sqrt = require( '@stdlib/math/base/special/sqrt' );\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar pow = require( '@stdlib/math/base/special/pow' );\n\n\n// MAIN //\n\n/**\n* Computes the L2-norm of a vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {PositiveInteger} stride - stride length\n* @returns {number} L2-norm\n*\n* @example\n* var x = [ 1.0, -2.0, 2.0 ];\n*\n* var z = gnrm2( x.length, x, 1 );\n* // returns 3.0\n*/\nfunction gnrm2( N, x, stride ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar i;\n\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn abs( x[ 0 ] );\n\t}\n\tscale = 0.0;\n\tssq = 1.0;\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tif ( x[ i ] !== 0.0 ) {\n\t\t\tax = abs( x[ i ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tssq = 1.0 + ( ssq * pow( scale/ax, 2 ) );\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tssq += pow( ax/scale, 2 );\n\t\t\t}\n\t\t}\n\t}\n\treturn scale * sqrt( ssq );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnrm2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar sqrt = require( '@stdlib/math/base/special/sqrt' );\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar pow = require( '@stdlib/math/base/special/pow' );\n\n\n// MAIN //\n\n/**\n* Computes the L2-norm of a vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {NumericArray} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} L2-norm\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var z = gnrm2( N, x, 2, 1 );\n* // returns 5.0\n*/\nfunction gnrm2( N, x, stride, offset ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar ix;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn abs( x[ offset ] );\n\t}\n\tix = offset;\n\tscale = 0.0;\n\tssq = 1.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( x[ ix ] !== 0.0 ) {\n\t\t\tax = abs( x[ ix ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tssq = 1.0 + ( ssq * pow( scale/ax, 2 ) );\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tssq += pow( ax/scale, 2 );\n\t\t\t}\n\t\t}\n\t\tix += stride;\n\t}\n\treturn scale * sqrt( ssq );\n}\n\n\n// EXPORTS //\n\nmodule.exports = gnrm2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar gnrm2 = require( './gnrm2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( gnrm2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = gnrm2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute the L2-norm of a vector.\n*\n* @module @stdlib/blas/base/gnrm2\n*\n* @example\n* var gnrm2 = require( '@stdlib/blas/base/gnrm2' );\n*\n* var x = [ 1.0, -2.0, 2.0 ];\n*\n* var z = gnrm2( x.length, x, 1 );\n* // returns 3.0\n*\n* @example\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var gnrm2 = require( '@stdlib/blas/base/gnrm2' );\n*\n* var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];\n* var N = floor( x.length / 2 );\n*\n* var z = gnrm2.ndarray( N, x, 2, 1 );\n* // returns 5.0\n*/\n\n// MODULES //\n\nvar gnrm2 = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = gnrm2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {PositiveInteger} stride - index increment\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*/\nfunction gscal( N, alpha, x, stride ) {\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || stride <= 0|| alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i += 1 ) {\n\t\t\t\tx[ i ] *= alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tx[ i ] *= alpha;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gscal;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {NumericArray} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {NumericArray} input array\n*\n* @example\n* var x = [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ];\n*\n* gscal( 3, 5.0, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, -20.0, 25.0, -30.0 ]\n*/\nfunction gscal( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] *= alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] *= alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gscal;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to multiply `x` by a constant.\n*\n* @module @stdlib/blas/base/gscal\n*\n* @example\n* var gscal = require( '@stdlib/blas/base/gscal' );\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*\n* @example\n* var gscal = require( '@stdlib/blas/base/gscal' );\n*\n* var x = [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ];\n*\n* gscal.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Interchanges vectors `x` and `y`.\n*\n* @private\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Object} x - first input array object\n* @param {Collection} x.data - first input array data\n* @param {Array} x.accessors - array element accessors\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Object} y - second input array object\n* @param {Collection} y.data - second input array array\n* @param {Array} y.accessors - array element accessors\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Object} `y`\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var reinterpret64 = require( '@stdlib/strided/base/reinterpret-complex64' );\n*\n* function setter( data, idx, value ) {\n* data.set( value, idx );\n* }\n*\n* function getter( data, idx ) {\n* return data.get( idx );\n* }\n*\n* var x = {\n* 'data': new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] ),\n* 'accessors': [ getter, setter ]\n* };\n*\n* var y = {\n* 'data': new Complex64Array( [ 5.0, 6.0, 7.0, 8.0 ] ),\n* 'accessors': [ getter, setter ]\n* };\n*\n* gswap( x.data.length, x, 1, 0, y, 1, 0 );\n*\n* var viewX = reinterpret64( x.data, 0 );\n* // viewX => [ 5.0, 6.0, 7.0, 8.0 ]\n*\n* var viewY = reinterpret64( y.data, 0 );\n* // viewY => [ 1.0, 2.0, 3.0, 4.0 ]\n*/\nfunction gswap( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar set;\n\tvar get;\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\t// Cache references to array data:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache a reference to the element accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\tix = offsetX;\n\tiy = offsetY;\n\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = get( xbuf, ix );\n\t\tset( xbuf, ix, get( ybuf, iy ) );\n\t\tset( ybuf, iy, tmp );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Interchanges vectors `x` and `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Collection} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {Collection} `y`\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gswap( x.length, x, 1, y, 1 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction gswap( N, x, strideX, y, strideY ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar ox;\n\tvar oy;\n\tvar m;\n\tvar i;\n\tvar j;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tox = arraylike2object( x );\n\toy = arraylike2object( y );\n\tif ( ox.accessorProtocol || oy.accessorProtocol ) {\n\t\tif ( strideX < 0 ) {\n\t\t\tix = (1-N) * strideX;\n\t\t} else {\n\t\t\tix = 0;\n\t\t}\n\t\tif ( strideY < 0 ) {\n\t\t\tiy = (1-N) * strideY;\n\t\t} else {\n\t\t\tiy = 0;\n\t\t}\n\t\taccessors( N, ox, strideX, ix, oy, strideY, iy );\n\t\treturn oy.data;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ i ];\n\t\t\t\tx[ i ] = y[ i ];\n\t\t\t\ty[ i ] = tmp;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ttmp = x[ i ];\n\t\t\tx[ i ] = y[ i ];\n\t\t\ty[ i ] = tmp;\n\n\t\t\tj = i + 1;\n\t\t\ttmp = x[ j ];\n\t\t\tx[ j ] = y[ j ];\n\t\t\ty[ j ] = tmp;\n\n\t\t\tj += 1;\n\t\t\ttmp = x[ j ];\n\t\t\tx[ j ] = y[ j ];\n\t\t\ty[ j ] = tmp;\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = y[ iy ];\n\t\ty[ iy ] = tmp;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar accessors = require( './accessors.js' );\n\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Interchanges vectors `x` and `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Collection} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Collection} `y`\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gswap( x.length, x, 1, 0, y, 1, 0 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction gswap( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar ox;\n\tvar oy;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tox = arraylike2object( x );\n\toy = arraylike2object( y );\n\tif ( ox.accessorProtocol || oy.accessorProtocol ) {\n\t\taccessors( N, ox, strideX, offsetX, oy, strideY, offsetY );\n\t\treturn oy.data;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = y[ iy ];\n\t\t\t\ty[ iy ] = tmp;\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = y[ iy ];\n\t\t\ty[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = y[ iy+1 ];\n\t\t\ty[ iy+1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = y[ iy+2 ];\n\t\t\ty[ iy+2 ] = tmp;\n\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = y[ iy ];\n\t\ty[ iy ] = tmp;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = gswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to interchange vectors `x` and `y`.\n*\n* @module @stdlib/blas/base/gswap\n*\n* @example\n* var gswap = require( '@stdlib/blas/base/gswap' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gswap( x.length, x, 1, y, 1 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* var gswap = require( '@stdlib/blas/base/gswap' );\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gswap.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {PositiveInteger} stride - `x` stride length\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = sasum( x.length, x, 1 );\n* // returns 15.0\n*/\nfunction sasum( N, x, stride ) {\n\tvar sum;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn sum;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tsum = float64ToFloat32( sum + abs( x[i] ) );\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of absolute values.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - `x` stride length\n* @param {NonNegativeInteger} offset - starting `x` index\n* @returns {number} sum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = sasum( x.length, x, 1, 0 );\n* // returns 15.0\n*/\nfunction sasum( N, x, stride, offset ) {\n\tvar sum;\n\tvar ix;\n\tvar i;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn sum;\n\t}\n\tix = offset;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tsum = float64ToFloat32( sum + abs( x[ix] ) );\n\t\tix += stride;\n\t}\n\treturn sum;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar sasum = require( './sasum.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sasum, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sasum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to compute the sum of absolute values.\n*\n* @module @stdlib/blas/base/sasum\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sasum = require( '@stdlib/blas/base/sasum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = sasum( x.length, x, 1 );\n* // returns 15.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sasum = require( '@stdlib/blas/base/sasum' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0 ] );\n*\n* var s = sasum.ndarray( x.length, x, 1, 0 );\n* // returns 15.0\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar sasum;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsasum = main;\n} else {\n\tsasum = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sasum;\n\n// exports: { \"ndarray\": \"sasum.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// VARIABLES //\n\nvar M = 4;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a constant and adds the result to `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* saxpy( x.length, alpha, x, 1, y, 1 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\nfunction saxpy( N, alpha, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] += float64ToFloat32( alpha * x[ i ] );\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] += float64ToFloat32( alpha * x[ i ] );\n\t\t\ty[ i+1 ] += float64ToFloat32( alpha * x[ i+1 ] );\n\t\t\ty[ i+2 ] += float64ToFloat32( alpha * x[ i+2 ] );\n\t\t\ty[ i+3 ] += float64ToFloat32( alpha * x[ i+3 ] );\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] += float64ToFloat32( alpha * x[ ix ] );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = saxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// VARIABLES //\n\nvar M = 4;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a constant and adds the result to `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* saxpy( x.length, alpha, x, 1, 0, y, 1, 0 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\nfunction saxpy( N, alpha, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] += float64ToFloat32( alpha * x[ ix ] );\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] += float64ToFloat32( alpha * x[ ix ] );\n\t\t\ty[ iy+1 ] += float64ToFloat32( alpha * x[ ix+1 ] );\n\t\t\ty[ iy+2 ] += float64ToFloat32( alpha * x[ ix+2 ] );\n\t\t\ty[ iy+3 ] += float64ToFloat32( alpha * x[ ix+3 ] );\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] += float64ToFloat32( alpha * x[ ix ] );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = saxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar saxpy = require( './saxpy.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( saxpy, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = saxpy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to multiply a vector `x` and a constant and add the result to `y`.\n*\n* @module @stdlib/blas/base/saxpy\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var saxpy = require( '@stdlib/blas/base/saxpy' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* saxpy( x.length, alpha, x, 1, y, 1 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var saxpy = require( '@stdlib/blas/base/saxpy' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 1.0, 1.0, 1.0, 1.0, 1.0 ] );\n* var alpha = 5.0;\n*\n* saxpy.ndarray( x.length, alpha, x, 1, 0, y, 1, 0 );\n* // y => [ 6.0, 11.0, 16.0, 21.0, 26.0 ]\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar saxpy;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsaxpy = main;\n} else {\n\tsaxpy = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = saxpy;\n\n// exports: { \"ndarray\": \"saxpy.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* scopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction scopy( N, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] = x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] = x[ i ];\n\t\t\ty[ i+1 ] = x[ i+1 ];\n\t\t\ty[ i+2 ] = x[ i+2 ];\n\t\t\ty[ i+3 ] = x[ i+3 ];\n\t\t\ty[ i+4 ] = x[ i+4 ];\n\t\t\ty[ i+5 ] = x[ i+5 ];\n\t\t\ty[ i+6 ] = x[ i+6 ];\n\t\t\ty[ i+7 ] = x[ i+7 ];\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Float32Array} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* scopy( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction scopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] = x[ ix ];\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] = x[ ix ];\n\t\t\ty[ iy+1 ] = x[ ix+1 ];\n\t\t\ty[ iy+2 ] = x[ ix+2 ];\n\t\t\ty[ iy+3 ] = x[ ix+3 ];\n\t\t\ty[ iy+4 ] = x[ ix+4 ];\n\t\t\ty[ iy+5 ] = x[ ix+5 ];\n\t\t\ty[ iy+6 ] = x[ ix+6 ];\n\t\t\ty[ iy+7 ] = x[ ix+7 ];\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar scopy = require( './scopy.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( scopy, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = scopy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to copy values from `x` into `y`.\n*\n* @module @stdlib/blas/base/scopy\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var scopy = require( '@stdlib/blas/base/scopy' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* scopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var scopy = require( '@stdlib/blas/base/scopy' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* scopy.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar scopy;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tscopy = main;\n} else {\n\tscopy = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = scopy;\n\n// exports: { \"ndarray\": \"scopy.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {number} dot product\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*/\nfunction sdot( N, x, strideX, y, strideY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = ( 1-N ) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = ( 1-N ) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot = float64ToFloat32( dot + float64ToFloat32( x[ ix ] * y[ iy ] ) );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the dot product of `x` and `y`.\n*\n* @param {integer} N - number of indexed elements\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {number} dot product\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdot( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.0\n*/\nfunction sdot( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tdot = 0.0;\n\tif ( N <= 0 ) {\n\t\treturn dot;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot = float64ToFloat32( dot + float64ToFloat32( x[ ix ] * y[ iy ] ) );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn dot;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar sdot = require( './sdot.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sdot, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to compute the dot product of two single-precision floating-point vectors.\n*\n* @module @stdlib/blas/base/sdot\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdot = require( '@stdlib/blas/base/sdot' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdot( x.length, x, 1, y, 1 );\n* // returns -5.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdot = require( '@stdlib/blas/base/sdot' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdot.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // returns -5.0\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar sdot;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsdot = main;\n} else {\n\tsdot = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdot;\n\n// exports: { \"ndarray\": \"sdot.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of two single-precision floating-point vectors with extended accumulation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} scalar - scalar constant to add to dot product\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {number} dot product\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdsdot( x.length, 0.0, x, 1, y, 1 );\n* // returns -5.0\n*/\nfunction sdsdot( N, scalar, x, strideX, y, strideY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = scalar;\n\tif ( N <= 0 ) {\n\t\treturn float64ToFloat32( dot );\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += x[ i ] * y[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn float64ToFloat32( dot );\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[i]*y[i] ) + ( x[i+1]*y[i+1] ) + ( x[i+2]*y[i+2] ) + ( x[i+3]*y[i+3] ) + ( x[i+4]*y[i+4] ); // eslint-disable-line max-len\n\t\t}\n\t\treturn float64ToFloat32( dot );\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = ( 1-N ) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = ( 1-N ) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += x[ ix ] * y[ iy ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn float64ToFloat32( dot );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of two single-precision floating-point vectors with extended accumulation.\n*\n* @param {integer} N - number of indexed elements\n* @param {number} scalar - scalar constant to add to dot product\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting index for `x`\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting index for `y`\n* @returns {number} dot product\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdsdot( x.length, 0.0, x, 1, 0, y, 1, 0 );\n* // returns -5.0\n*/\nfunction sdsdot( N, scalar, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar dot;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\n\tdot = scalar;\n\tif ( N <= 0 ) {\n\t\treturn float64ToFloat32( dot );\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tdot += x[ ix ] * y[ iy ];\n\t\t\t\tix += 1;\n\t\t\t\tiy += 1;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn float64ToFloat32( dot );\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tdot += ( x[ix]*y[iy] ) + ( x[ix+1]*y[iy+1] ) + ( x[ix+2]*y[iy+2] ) + ( x[ix+3]*y[iy+3] ) + ( x[ix+4]*y[iy+4] ); // eslint-disable-line max-len\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn float64ToFloat32( dot );\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tdot += x[ ix ] * y[ iy ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn float64ToFloat32( dot );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar sdsdot = require( './sdsdot.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sdsdot, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sdsdot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to compute the dot product of two single-precision floating-point vectors with extended accumulation.\n*\n* @module @stdlib/blas/base/sdsdot\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdsdot = require( '@stdlib/blas/base/sdsdot' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdsdot( x.length, 0.0, x, 1, y, 1 );\n* // returns -12.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sdsdot = require( '@stdlib/blas/base/sdsdot' );\n*\n* var x = new Float32Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] );\n* var y = new Float32Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] );\n*\n* var z = sdsdot.ndarray( x.length, 0.0, x, 1, 0, y, 1, 0 );\n* // returns -12.0\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar sdsdot;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsdsdot = main;\n} else {\n\tsdsdot = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sdsdot;\n\n// exports: { \"ndarray\": \"sdsdot.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar sqrt = require( '@stdlib/math/base/special/sqrt' );\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar pow = require( '@stdlib/math/base/special/pow' );\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the L2-norm of a single-precision floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {PositiveInteger} stride - stride length\n* @returns {number} L2-norm\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = 3;\n*\n* var z = snrm2( N, x, 1 );\n* // returns 3.0\n*/\nfunction snrm2( N, x, stride ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar i;\n\n\tif ( N <= 0 || stride <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn abs( x[ 0 ] );\n\t}\n\tscale = 0.0;\n\tssq = 1.0;\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tif ( x[ i ] !== 0.0 ) {\n\t\t\tax = abs( x[ i ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tssq = float64ToFloat32( 1.0 + ( ssq * pow( scale/ax, 2 ) ) );\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tssq = float64ToFloat32( ssq + pow( ax/scale, 2 ) );\n\t\t\t}\n\t\t}\n\t}\n\treturn float64ToFloat32( scale * sqrt( ssq ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = snrm2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar sqrt = require( '@stdlib/math/base/special/sqrt' );\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar pow = require( '@stdlib/math/base/special/pow' );\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\n\n\n// MAIN //\n\n/**\n* Computes the L2-norm of a single-precision floating-point vector.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - stride length\n* @param {NonNegativeInteger} offset - starting index\n* @returns {number} L2-norm\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n*\n* var z = snrm2( 4, x, 2, 1 );\n* // returns 5.0\n*/\nfunction snrm2( N, x, stride, offset ) {\n\tvar scale;\n\tvar ssq;\n\tvar ax;\n\tvar ix;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn 0.0;\n\t}\n\tif ( N === 1 ) {\n\t\treturn abs( x[ offset ] );\n\t}\n\tix = offset;\n\tscale = 0.0;\n\tssq = 1.0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( x[ ix ] !== 0.0 ) {\n\t\t\tax = abs( x[ ix ] );\n\t\t\tif ( scale < ax ) {\n\t\t\t\tssq = float64ToFloat32( 1.0 + ( ssq * pow( scale/ax, 2 ) ) );\n\t\t\t\tscale = ax;\n\t\t\t} else {\n\t\t\t\tssq = float64ToFloat32( ssq + pow( ax/scale, 2 ) );\n\t\t\t}\n\t\t}\n\t\tix += stride;\n\t}\n\treturn float64ToFloat32( scale * sqrt( ssq ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = snrm2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar snrm2 = require( './snrm2.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( snrm2, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = snrm2;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute the L2-norm of a single-precision floating-point vector.\n*\n* @module @stdlib/blas/base/snrm2\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var snrm2 = require( '@stdlib/blas/base/snrm2' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );\n* var N = 3;\n*\n* var z = snrm2( N, x, 1 );\n* // returns 3.0\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var floor = require( '@stdlib/math/base/special/floor' );\n* var snrm2 = require( '@stdlib/blas/base/snrm2' );\n*\n* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );\n* var N = floor( x.length / 2 );\n*\n* var z = snrm2.ndarray( N, x, 2, 1 );\n* // returns 5.0\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar snrm2;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsnrm2 = main;\n} else {\n\tsnrm2 = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = snrm2;\n\n// exports: { \"ndarray\": \"snrm2.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );\nvar absf = require( '@stdlib/math/base/special/absf' );\nvar sqrtf = require( '@stdlib/math/base/special/sqrtf' );\nvar abs2f = require( '@stdlib/math/base/special/abs2f' );\nvar copysignf = require( '@stdlib/math/base/special/copysignf' );\n\n\n// MAIN //\n\n/**\n* Constructs a Givens plane rotation.\n*\n* @param {number} a - rotational elimination parameter\n* @param {number} b - rotational elimination parameter\n* @param {Float32Array} out - output array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} output array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var out = srotg( 0.0, 2.0, new Float32Array( 4 ), 1, 0 );\n* // returns [ 2.0, 1.0, 0.0, 1.0 ]\n*/\nfunction srotg( a, b, out, stride, offset ) {\n\tvar scale;\n\tvar sign;\n\tvar aa;\n\tvar ab;\n\tvar r;\n\tvar c;\n\tvar s;\n\tvar z;\n\n\taa = absf( a );\n\tab = absf( b );\n\tif ( aa > ab ) {\n\t\tsign = copysignf( 1.0, a );\n\t} else {\n\t\tsign = copysignf( 1.0, b );\n\t}\n\tscale = float64ToFloat32( aa + ab );\n\tif ( scale === 0.0 ) {\n\t\tc = 1.0;\n\t\ts = 0.0;\n\t\tr = 0.0;\n\t\tz = 0.0;\n\t} else {\n\t\tr = float64ToFloat32( scale * sqrtf( float64ToFloat32( abs2f( float64ToFloat32( a/scale ) ) + abs2f( float64ToFloat32( b/scale ) ) ) ) ); // eslint-disable-line max-len\n\t\tr = float64ToFloat32( r * sign );\n\t\tc = float64ToFloat32( a / r );\n\t\ts = float64ToFloat32( b / r );\n\t\tz = 1.0;\n\t\tif ( aa > ab ) {\n\t\t\tz = s;\n\t\t} else if ( c !== 0.0 ) {\n\t\t\tz = float64ToFloat32( 1.0 / c );\n\t\t}\n\t}\n\ta = r;\n\tb = z;\n\tout[ offset ] = a;\n\tout[ offset + stride ] = b;\n\tout[ offset + ( 2 * stride ) ] = c;\n\tout[ offset + ( 3 * stride ) ] = s;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = srotg;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Float32Array = require( '@stdlib/array/float32' );\nvar fcn = require( './assign.js' );\n\n\n// MAIN //\n\n/**\n* Constructs a Givens plane rotation.\n*\n* @param {number} a - rotational elimination parameter\n* @param {number} b - rotational elimination parameter\n* @returns {Float32Array} output array\n*\n* @example\n* var out = srotg( 0.0, 2.0 );\n* // returns [ 2.0, 1.0, 0.0, 1.0 ]\n*/\nfunction srotg( a, b ) {\n\tvar out = new Float32Array( 4 );\n\treturn fcn( a, b, out, 1, 0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = srotg;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Construct a Givens plane rotation.\n*\n* @module @stdlib/blas/base/srotg\n*\n* @example\n* var srotg = require( '@stdlib/blas/base/srotg' );\n*\n* var out = srotg( 0.0, 2.0 );\n* // returns [ 2.0, 1.0, 0.0, 1.0 ]\n*\n* out = srotg( 6.0, -8.0 );\n* // returns [ 10.0, ~-1.666, -0.6, 0.8 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var srotg = require( '@stdlib/blas/base/srotg' );\n*\n* var out = new Float32Array( 4 );\n*\n* var y = srotg.assign( 0.0, 2.0, out, 1, 0 );\n* // returns [ 2.0, 1.0, 0.0, 1.0 ]\n*\n* var bool = ( y === out );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n\n// exports: { \"assign\": \"main.assign\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float32Array} x - input array\n* @param {PositiveInteger} stride - index increment\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* sscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*/\nfunction sscal( N, alpha, x, stride ) {\n\tvar i;\n\tvar m;\n\n\tif ( N <= 0 || stride <= 0|| alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ i ] *= alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tN *= stride;\n\tfor ( i = 0; i < N; i += stride ) {\n\t\tx[ i ] *= alpha;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sscal;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Multiplies a vector `x` by a scalar `alpha`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );\n* var alpha = 5.0;\n*\n* sscal( 3, alpha, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, -20.0, 25.0, -30.0 ]\n*/\nfunction sscal( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar i;\n\tvar m;\n\n\tif ( N <= 0 || alpha === 1.0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] *= alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] *= alpha;\n\t\t\tx[ i+1 ] *= alpha;\n\t\t\tx[ i+2 ] *= alpha;\n\t\t\tx[ i+3 ] *= alpha;\n\t\t\tx[ i+4 ] *= alpha;\n\t\t\tix += M;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] *= alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sscal;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar sscal = require( './sscal.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sscal, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sscal;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to multiply a single-precision floating-point vector by a constant.\n*\n* @module @stdlib/blas/base/sscal\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sscal = require( '@stdlib/blas/base/sscal' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* sscal( x.length, 5.0, x, 1 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sscal = require( '@stdlib/blas/base/sscal' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* sscal.ndarray( x.length, 5.0, x, 1, 0 );\n* // x => [ -10.0, 5.0, 15.0, -25.0, 20.0, 0.0, -5.0, -15.0 ]\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar sscal;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsscal = main;\n} else {\n\tsscal = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sscal;\n\n// exports: { \"ndarray\": \"sscal.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Interchanges two single-precision floating-point vectors.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @returns {Float32Array} `y`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* sswap( x.length, x, 1, y, 1 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction sswap( N, x, strideX, y, strideY ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tvar j;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ i ];\n\t\t\t\tx[ i ] = y[ i ];\n\t\t\t\ty[ i ] = tmp;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ttmp = x[ i ];\n\t\t\tx[ i ] = y[ i ];\n\t\t\ty[ i ] = tmp;\n\n\t\t\tj = i + 1;\n\t\t\ttmp = x[ j ];\n\t\t\tx[ j ] = y[ j ];\n\t\t\ty[ j ] = tmp;\n\n\t\t\tj += 1;\n\t\t\ttmp = x[ j ];\n\t\t\tx[ j ] = y[ j ];\n\t\t\ty[ j ] = tmp;\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = y[ iy ];\n\t\ty[ iy ] = tmp;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Interchanges two single-precision floating-point vectors.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - first input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Float32Array} y - second input array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Float32Array} `y`\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* sswap( x.length, x, 1, 0, y, 1, 0 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction sswap( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar i;\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = y[ iy ];\n\t\t\t\ty[ iy ] = tmp;\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = y[ iy ];\n\t\t\ty[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = y[ iy+1 ];\n\t\t\ty[ iy+1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = y[ iy+2 ];\n\t\t\ty[ iy+2 ] = tmp;\n\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = y[ iy ];\n\t\ty[ iy ] = tmp;\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar sswap = require( './sswap.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( sswap, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = sswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to interchange two single-precision floating-point vectors.\n*\n* @module @stdlib/blas/base/sswap\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sswap = require( '@stdlib/blas/base/sswap' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* sswap( x.length, x, 1, y, 1 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array/float32' );\n* var sswap = require( '@stdlib/blas/base/sswap' );\n*\n* var x = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n* var y = new Float32Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );\n*\n* sswap.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // x => [ 6.0, 7.0, 8.0, 9.0, 10.0 ]\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils/try-require' );\nvar isError = require( '@stdlib/assert/is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar sswap;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsswap = main;\n} else {\n\tsswap = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sswap;\n\n// exports: { \"ndarray\": \"sswap.ndarray\" }\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace blas\n*/\nvar blas = {};\n\n/**\n* @name ccopy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/ccopy}\n*/\nsetReadOnly( blas, 'ccopy', require( './../../base/ccopy' ) );\n\n/**\n* @name cswap\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/cswap}\n*/\nsetReadOnly( blas, 'cswap', require( './../../base/cswap' ) );\n\n/**\n* @name dasum\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/dasum}\n*/\nsetReadOnly( blas, 'dasum', require( './../../base/dasum' ) );\n\n/**\n* @name daxpy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/daxpy}\n*/\nsetReadOnly( blas, 'daxpy', require( './../../base/daxpy' ) );\n\n/**\n* @name dcopy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/dcopy}\n*/\nsetReadOnly( blas, 'dcopy', require( './../../base/dcopy' ) );\n\n/**\n* @name ddot\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/ddot}\n*/\nsetReadOnly( blas, 'ddot', require( './../../base/ddot' ) );\n\n/**\n* @name dnrm2\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/dnrm2}\n*/\nsetReadOnly( blas, 'dnrm2', require( './../../base/dnrm2' ) );\n\n/**\n* @name dscal\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/dscal}\n*/\nsetReadOnly( blas, 'dscal', require( './../../base/dscal' ) );\n\n/**\n* @name dsdot\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/dsdot}\n*/\nsetReadOnly( blas, 'dsdot', require( './../../base/dsdot' ) );\n\n/**\n* @name dswap\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/dswap}\n*/\nsetReadOnly( blas, 'dswap', require( './../../base/dswap' ) );\n\n/**\n* @name gasum\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gasum}\n*/\nsetReadOnly( blas, 'gasum', require( './../../base/gasum' ) );\n\n/**\n* @name gaxpy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gaxpy}\n*/\nsetReadOnly( blas, 'gaxpy', require( './../../base/gaxpy' ) );\n\n/**\n* @name gcopy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gcopy}\n*/\nsetReadOnly( blas, 'gcopy', require( './../../base/gcopy' ) );\n\n/**\n* @name gdot\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gdot}\n*/\nsetReadOnly( blas, 'gdot', require( './../../base/gdot' ) );\n\n/**\n* @name gnrm2\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gnrm2}\n*/\nsetReadOnly( blas, 'gnrm2', require( './../../base/gnrm2' ) );\n\n/**\n* @name gscal\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gscal}\n*/\nsetReadOnly( blas, 'gscal', require( './../../base/gscal' ) );\n\n/**\n* @name gswap\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/gswap}\n*/\nsetReadOnly( blas, 'gswap', require( './../../base/gswap' ) );\n\n/**\n* @name sasum\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/sasum}\n*/\nsetReadOnly( blas, 'sasum', require( './../../base/sasum' ) );\n\n/**\n* @name saxpy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/saxpy}\n*/\nsetReadOnly( blas, 'saxpy', require( './../../base/saxpy' ) );\n\n/**\n* @name scopy\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/scopy}\n*/\nsetReadOnly( blas, 'scopy', require( './../../base/scopy' ) );\n\n/**\n* @name sdot\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/sdot}\n*/\nsetReadOnly( blas, 'sdot', require( './../../base/sdot' ) );\n\n/**\n* @name sdsdot\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/sdsdot}\n*/\nsetReadOnly( blas, 'sdsdot', require( './../../base/sdsdot' ) );\n\n/**\n* @name snrm2\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/snrm2}\n*/\nsetReadOnly( blas, 'snrm2', require( './../../base/snrm2' ) );\n\n/**\n* @name srotg\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/srotg}\n*/\nsetReadOnly( blas, 'srotg', require( './../../base/srotg' ) );\n\n/**\n* @name sscal\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/sscal}\n*/\nsetReadOnly( blas, 'sscal', require( './../../base/sscal' ) );\n\n/**\n* @name sswap\n* @memberof blas\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/blas/base/sswap}\n*/\nsetReadOnly( blas, 'sswap', require( './../../base/sswap' ) );\n\n\n// EXPORTS //\n\nmodule.exports = blas;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFloat64VectorLike = require( '@stdlib/assert/is-float64vector-like' );\nvar format = require( '@stdlib/string/format' );\nvar dot = require( './../../base/ddot' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Computes the dot product of two double-precision floating-point vectors.\n*\n* @param {VectorLike} x - first input array\n* @param {VectorLike} y - second input array\n* @throws {TypeError} first argument must be a 1-dimensional ndarray containing double-precision floating-point numbers\n* @throws {TypeError} second argument must be a 1-dimensional ndarray containing double-precision floating-point numbers\n* @throws {RangeError} input arrays must be the same length\n* @returns {number} dot product\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );\n* var y = array( new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );\n*\n* var z = ddot( x, y );\n* // returns -5.0\n*/\nfunction ddot( x, y ) {\n\tif ( !isFloat64VectorLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a one-dimensional ndarray containing double-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float64Array). Value: `%s`.', x ) );\n\t}\n\tif ( !isFloat64VectorLike( y ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a one-dimensional ndarray containing double-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float64Array). Value: `%s`.', y ) );\n\t}\n\tif ( x.length !== y.length ) {\n\t\tthrow new RangeError( format( 'invalid argument. Arrays must be the same length. First argument length: `%u`. Second argument length: `%u`.', x.length, y.length ) );\n\t}\n\treturn dot( x.length, x.data, x.strides[ 0 ], x.offset, y.data, y.strides[ 0 ], y.offset ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = ddot;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to compute the dot product of two double-precision floating-point vectors.\n*\n* @module @stdlib/blas/ddot\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var array = require( '@stdlib/ndarray/array' );\n* var ddot = require( '@stdlib/blas/ddot' );\n*\n* var x = array( new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );\n* var y = array( new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );\n*\n* var z = ddot( x, y );\n* // returns -5.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFloat64VectorLike = require( '@stdlib/assert/is-float64vector-like' );\nvar format = require( '@stdlib/string/format' );\nvar swap = require( './../../base/dswap' ).ndarray;\n\n\n// MAIN //\n\n/**\n* Interchanges two double-precision floating-point vectors.\n*\n* @param {VectorLike} x - first input array\n* @param {VectorLike} y - second input array\n* @throws {TypeError} first argument must be a 1-dimensional ndarray containing double-precision floating-point numbers\n* @throws {TypeError} second argument must be a 1-dimensional ndarray containing double-precision floating-point numbers\n* @throws {RangeError} input arrays must be the same length\n* @returns {VectorLike} `y`\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );\n* var y = array( new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );\n*\n* dswap( x, y );\n*\n* var xbuf = x.data;\n* // returns [ 2.0, 6.0, -1.0, -4.0, 8.0 ]\n*\n* var ybuf = y.data;\n* // returns [ 4.0, 2.0, -3.0, 5.0, -1.0 ]\n*/\nfunction dswap( x, y ) {\n\tif ( !isFloat64VectorLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a one-dimensional ndarray containing double-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float64Array). Value: `%s`.', x ) );\n\t}\n\tif ( !isFloat64VectorLike( y ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a one-dimensional ndarray containing double-precision floating-point numbers (i.e., an ndarray whose underlying data buffer is a Float64Array). Value: `%s`.', y ) );\n\t}\n\tif ( x.length !== y.length ) {\n\t\tthrow new RangeError( format( 'invalid argument. Arrays must be the same length. First argument length: `%u`. Second argument length: `%u`.', x.length, y.length ) );\n\t}\n\tswap( x.length, x.data, x.strides[ 0 ], x.offset, y.data, y.strides[ 0 ], y.offset ); // eslint-disable-line max-len\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dswap;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* BLAS level 1 routine to interchange two double-precision floating-point vectors.\n*\n* @module @stdlib/blas/dswap\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var array = require( '@stdlib/ndarray/array' );\n* var dswap = require( '@stdlib/blas/dswap' );\n*\n* var x = array( new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );\n* var y = array( new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );\n*\n* dswap( x, y );\n*\n* var xbuf = x.data;\n* // returns [ 2.0, 6.0, -1.0, -4.0, 8.0 ]\n*\n* var ybuf = y.data;\n* // returns [ 4.0, 2.0, -3.0, 5.0, -1.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each element in a double-precision floating-point strided array.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dapx( x.length, 5.0, x, 1 );\n* // x => [ 3.0, 6.0, 8.0, 0.0, 9.0, 5.0, 4.0, 2.0 ]\n*/\nfunction dapx( N, alpha, x, stride ) {\n\tvar ix;\n\tvar i;\n\tvar m;\n\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn x;\n\t}\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ i ] += alpha;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ i ] += alpha;\n\t\t\tx[ i+1 ] += alpha;\n\t\t\tx[ i+2 ] += alpha;\n\t\t\tx[ i+3 ] += alpha;\n\t\t\tx[ i+4 ] += alpha;\n\t\t}\n\t\treturn x;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] += alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapx;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar M = 5;\n\n\n// MAIN //\n\n/**\n* Adds a constant to each element in a double-precision floating-point strided array.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {number} alpha - scalar\n* @param {Float64Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} input array\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );\n* var alpha = 5.0;\n*\n* dapx( 3, alpha, x, 1, x.length-3 );\n* // x => [ 1.0, -2.0, 3.0, 1.0, 10.0, -1.0 ]\n*/\nfunction dapx( N, alpha, x, stride, offset ) {\n\tvar ix;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 || alpha === 0.0 ) {\n\t\treturn x;\n\t}\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\tx[ ix ] += alpha;\n\t\t\t\tix += stride;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\tx[ ix ] += alpha;\n\t\t\tx[ ix+1 ] += alpha;\n\t\t\tx[ ix+2 ] += alpha;\n\t\t\tx[ ix+3 ] += alpha;\n\t\t\tx[ ix+4 ] += alpha;\n\t\t\tix += M;\n\t\t}\n\t\treturn x;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] += alpha;\n\t\tix += stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dapx;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar dapx = require( './dapx.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dapx, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dapx;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Add a constant to each element in a double-precision floating-point strided array.\n*\n* @module @stdlib/blas/ext/base/dapx\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dapx = require( '@stdlib/blas/ext/base/dapx' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dapx( x.length, 5.0, x, 1 );\n* // x => [ 3.0, 6.0, 8.0, 0.0, 9.0, 5.0, 4.0, 2.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dapx = require( '@stdlib/blas/ext/base/dapx' );\n*\n* var x = new Float64Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* dapx.ndarray( x.length, 5.0, x, 1, 0 );\n* // x =>