diff --git a/blas/ext/base/dapxsumkbn/coverage.ndjson b/blas/ext/base/dapxsumkbn/coverage.ndjson new file mode 100644 index 000000000..92c0dc63f --- /dev/null +++ b/blas/ext/base/dapxsumkbn/coverage.ndjson @@ -0,0 +1 @@ +[420,432,97.2222,32,32,100,2,4,50,420,432,97.2222,"7b29fe431c795281b725bff2cc0911dda20c112c","2024-03-21 21:57:26 -0400"] diff --git a/blas/ext/base/dapxsumkbn/dapxsumkbn.js.html b/blas/ext/base/dapxsumkbn/dapxsumkbn.js.html new file mode 100644 index 000000000..099301e56 --- /dev/null +++ b/blas/ext/base/dapxsumkbn/dapxsumkbn.js.html @@ -0,0 +1,361 @@ + + + + + + Code coverage report for blas/ext/base/dapxsumkbn/lib/dapxsumkbn.js + + + + + + + + + +
+
+

All files / blas/ext/base/dapxsumkbn/lib dapxsumkbn.js

+
+ +
+ 100% + Statements + 92/92 +
+ + +
+ 100% + Branches + 14/14 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 92/92 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +932x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +12x +12x +12x +12x +12x +12x +12x +12x +12x +2x +2x +12x +2x +2x +12x +1x +12x +7x +7x +8x +8x +12x +35x +35x +35x +24x +35x +11x +11x +35x +35x +35x +8x +12x +2x +2x +2x +2x +2x + 
/**
+* @license Apache-2.0
+*
+* Copyright (c) 2020 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+ 
+'use strict';
+ 
+// MODULES //
+ 
+var abs = require( '@stdlib/math/base/special/abs' );
+ 
+ 
+// MAIN //
+ 
+/**
+* Adds a constant to each double-precision floating-point strided array element and computes the sum using an improved Kahan–Babuška algorithm.
+*
+* ## Method
+*
+* -   This implementation uses an "improved Kahan–Babuška algorithm", as described by Neumaier (1974).
+*
+* ## References
+*
+* -   Neumaier, Arnold. 1974. "Rounding Error Analysis of Some Methods for Summing Finite Sums." _Zeitschrift Für Angewandte Mathematik Und Mechanik_ 54 (1): 39–51. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {number} alpha - constant
+* @param {Float64Array} x - input array
+* @param {integer} stride - stride length
+* @returns {number} sum
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
+* var N = x.length;
+*
+* var v = dapxsumkbn( N, 5.0, x, 1 );
+* // returns 16.0
+*/
+function dapxsumkbn( N, alpha, x, stride ) {
+	var sum;
+	var ix;
+	var v;
+	var t;
+	var c;
+	var i;
+ 
+	if ( N <= 0 ) {
+		return 0.0;
+	}
+	if ( N === 1 || stride === 0 ) {
+		return alpha + x[ 0 ];
+	}
+	if ( stride < 0 ) {
+		ix = (1-N) * stride;
+	} else {
+		ix = 0;
+	}
+	sum = 0.0;
+	c = 0.0;
+	for ( i = 0; i < N; i++ ) {
+		v = alpha + x[ ix ];
+		t = sum + v;
+		if ( abs( sum ) >= abs( v ) ) {
+			c += (sum-t) + v;
+		} else {
+			c += (v-t) + sum;
+		}
+		sum = t;
+		ix += stride;
+	}
+	return sum + c;
+}
+ 
+ 
+// EXPORTS //
+ 
+module.exports = dapxsumkbn;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/blas/ext/base/dapxsumkbn/dapxsumkbn.native.js.html b/blas/ext/base/dapxsumkbn/dapxsumkbn.native.js.html new file mode 100644 index 000000000..6a1dfd66a --- /dev/null +++ b/blas/ext/base/dapxsumkbn/dapxsumkbn.native.js.html @@ -0,0 +1,244 @@ + + + + + + Code coverage report for blas/ext/base/dapxsumkbn/lib/dapxsumkbn.native.js + + + + + + + + + +
+
+

All files / blas/ext/base/dapxsumkbn/lib dapxsumkbn.native.js

+
+ +
+ 94.33% + Statements + 50/53 +
+ + +
+ 100% + Branches + 1/1 +
+ + +
+ 0% + Functions + 0/1 +
+ + +
+ 94.33% + Lines + 50/53 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +543x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +  +  +  +3x +3x +3x +3x +3x + 
/**
+* @license Apache-2.0
+*
+* Copyright (c) 2020 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+ 
+'use strict';
+ 
+// MODULES //
+ 
+var addon = require( './../src/addon.node' );
+ 
+ 
+// MAIN //
+ 
+/**
+* Adds a constant to each double-precision floating-point strided array element and computes the sum using an improved Kahan–Babuška algorithm.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {number} alpha - constant
+* @param {Float64Array} x - input array
+* @param {integer} stride - stride length
+* @returns {number} sum
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
+* var N = x.length;
+*
+* var v = dapxsumkbn( N, 5.0, x, 1 );
+* // returns 16.0
+*/
+function dapxsumkbn( N, alpha, x, stride ) {
+	return addon( N, alpha, x, stride );
+}
+ 
+ 
+// EXPORTS //
+ 
+module.exports = dapxsumkbn;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/blas/ext/base/dapxsumkbn/index.html b/blas/ext/base/dapxsumkbn/index.html new file mode 100644 index 000000000..756965231 --- /dev/null +++ b/blas/ext/base/dapxsumkbn/index.html @@ -0,0 +1,206 @@ + + + + + + Code coverage report for blas/ext/base/dapxsumkbn/lib + + + + + + + + + +
+
+

All files blas/ext/base/dapxsumkbn/lib

+
+ +
+ 97.22% + Statements + 420/432 +
+ + +
+ 100% + Branches + 32/32 +
+ + +
+ 50% + Functions + 2/4 +
+ + +
+ 97.22% + Lines + 420/432 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
dapxsumkbn.js +
+
100%92/92100%14/14100%1/1100%92/92
dapxsumkbn.native.js +
+
94.33%50/53100%1/10%0/194.33%50/53
index.js +
+
100%68/68100%3/3100%0/0100%68/68
main.js +
+
100%35/35100%1/1100%0/0100%35/35
native.js +
+
100%35/35100%1/1100%0/0100%35/35
ndarray.js +
+
100%88/88100%11/11100%1/1100%88/88
ndarray.native.js +
+
85.24%52/61100%1/10%0/185.24%52/61
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/blas/ext/base/dapxsumkbn/index.js.html b/blas/ext/base/dapxsumkbn/index.js.html new file mode 100644 index 000000000..77193e146 --- /dev/null +++ b/blas/ext/base/dapxsumkbn/index.js.html @@ -0,0 +1,289 @@ + + + + + + Code coverage report for blas/ext/base/dapxsumkbn/lib/index.js + + + + + + + + + +
+
+

All files / blas/ext/base/dapxsumkbn/lib index.js

+
+ +
+ 100% + Statements + 68/68 +
+ + +
+ 100% + Branches + 3/3 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 100% + Lines + 68/68 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +693x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +3x +2x +3x +1x +1x +3x +3x +3x +3x +3x +3x +3x + 
/**
+* @license Apache-2.0
+*
+* Copyright (c) 2020 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+ 
+'use strict';
+ 
+/**
+* Add a constant to each double-precision floating-point strided array element and compute the sum using an improved Kahan–Babuška algorithm.
+*
+* @module @stdlib/blas/ext/base/dapxsumkbn
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var dapxsumkbn = require( '@stdlib/blas/ext/base/dapxsumkbn' );
+*
+* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
+*
+* var v = dapxsumkbn( 3, 5.0, x, 1 );
+* // returns 16.0
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+* var dapxsumkbn = require( '@stdlib/blas/ext/base/dapxsumkbn' );
+*
+* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
+*
+* var v = dapxsumkbn.ndarray( 4, 5.0, x, 2, 1 );
+* // returns 25.0
+*/
+ 
+// MODULES //
+ 
+var join = require( 'path' ).join;
+var tryRequire = require( '@stdlib/utils/try-require' );
+var isError = require( '@stdlib/assert/is-error' );
+var main = require( './main.js' );
+ 
+ 
+// MAIN //
+ 
+var dapxsumkbn;
+var tmp = tryRequire( join( __dirname, './native.js' ) );
+if ( isError( tmp ) ) {
+	dapxsumkbn = main;
+} else {
+	dapxsumkbn = tmp;
+}
+ 
+ 
+// EXPORTS //
+ 
+module.exports = dapxsumkbn;
+ 
+// exports: { "ndarray": "dapxsumkbn.ndarray" }
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/blas/ext/base/dapxsumkbn/main.js.html b/blas/ext/base/dapxsumkbn/main.js.html new file mode 100644 index 000000000..5f4ce718c --- /dev/null +++ b/blas/ext/base/dapxsumkbn/main.js.html @@ -0,0 +1,190 @@ + + + + + + Code coverage report for blas/ext/base/dapxsumkbn/lib/main.js + + + + + + + + + +
+
+

All files / blas/ext/base/dapxsumkbn/lib main.js

+
+ +
+ 100% + Statements + 35/35 +
+ + +
+ 100% + Branches + 1/1 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 100% + Lines + 35/35 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +361x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x + 
/**
+* @license Apache-2.0
+*
+* Copyright (c) 2020 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+ 
+'use strict';
+ 
+// MODULES //
+ 
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var dapxsumkbn = require( './dapxsumkbn.js' );
+var ndarray = require( './ndarray.js' );
+ 
+ 
+// MAIN //
+ 
+setReadOnly( dapxsumkbn, 'ndarray', ndarray );
+ 
+ 
+// EXPORTS //
+ 
+module.exports = dapxsumkbn;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/blas/ext/base/dapxsumkbn/native.js.html b/blas/ext/base/dapxsumkbn/native.js.html new file mode 100644 index 000000000..148c4719f --- /dev/null +++ b/blas/ext/base/dapxsumkbn/native.js.html @@ -0,0 +1,190 @@ + + + + + + Code coverage report for blas/ext/base/dapxsumkbn/lib/native.js + + + + + + + + + +
+
+

All files / blas/ext/base/dapxsumkbn/lib native.js

+
+ +
+ 100% + Statements + 35/35 +
+ + +
+ 100% + Branches + 1/1 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 100% + Lines + 35/35 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +361x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x + 
/**
+* @license Apache-2.0
+*
+* Copyright (c) 2020 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+ 
+'use strict';
+ 
+// MODULES //
+ 
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var dapxsumkbn = require( './dapxsumkbn.native.js' );
+var ndarray = require( './ndarray.native.js' );
+ 
+ 
+// MAIN //
+ 
+setReadOnly( dapxsumkbn, 'ndarray', ndarray );
+ 
+ 
+// EXPORTS //
+ 
+module.exports = dapxsumkbn;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/blas/ext/base/dapxsumkbn/ndarray.js.html b/blas/ext/base/dapxsumkbn/ndarray.js.html new file mode 100644 index 000000000..cb6d6a67c --- /dev/null +++ b/blas/ext/base/dapxsumkbn/ndarray.js.html @@ -0,0 +1,349 @@ + + + + + + Code coverage report for blas/ext/base/dapxsumkbn/lib/ndarray.js + + + + + + + + + +
+
+

All files / blas/ext/base/dapxsumkbn/lib ndarray.js

+
+ +
+ 100% + Statements + 88/88 +
+ + +
+ 100% + Branches + 11/11 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 88/88 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +892x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +2x +12x +12x +12x +12x +12x +12x +12x +12x +12x +2x +2x +12x +2x +2x +8x +8x +8x +12x +35x +35x +35x +24x +35x +11x +11x +35x +35x +35x +8x +12x +2x +2x +2x +2x +2x + 
/**
+* @license Apache-2.0
+*
+* Copyright (c) 2020 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+ 
+'use strict';
+ 
+// MODULES //
+ 
+var abs = require( '@stdlib/math/base/special/abs' );
+ 
+ 
+// MAIN //
+ 
+/**
+* Adds a constant to each double-precision floating-point strided array element and computes the sum using an improved Kahan–Babuška algorithm.
+*
+* ## Method
+*
+* -   This implementation uses an "improved Kahan–Babuška algorithm", as described by Neumaier (1974).
+*
+* ## References
+*
+* -   Neumaier, Arnold. 1974. "Rounding Error Analysis of Some Methods for Summing Finite Sums." _Zeitschrift Für Angewandte Mathematik Und Mechanik_ 54 (1): 39–51. doi:[10.1002/zamm.19740540106](https://doi.org/10.1002/zamm.19740540106).
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {number} alpha - constant
+* @param {Float64Array} x - input array
+* @param {integer} stride - stride length
+* @param {NonNegativeInteger} offset - starting index
+* @returns {number} sum
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
+*
+* var v = dapxsumkbn( 4, 5.0, x, 2, 1 );
+* // returns 25.0
+*/
+function dapxsumkbn( N, alpha, x, stride, offset ) {
+	var sum;
+	var ix;
+	var v;
+	var t;
+	var c;
+	var i;
+ 
+	if ( N <= 0 ) {
+		return 0.0;
+	}
+	if ( N === 1 || stride === 0 ) {
+		return alpha + x[ offset ];
+	}
+	ix = offset;
+	sum = 0.0;
+	c = 0.0;
+	for ( i = 0; i < N; i++ ) {
+		v = alpha + x[ ix ];
+		t = sum + v;
+		if ( abs( sum ) >= abs( v ) ) {
+			c += (sum-t) + v;
+		} else {
+			c += (v-t) + sum;
+		}
+		sum = t;
+		ix += stride;
+	}
+	return sum + c;
+}
+ 
+ 
+// EXPORTS //
+ 
+module.exports = dapxsumkbn;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/blas/ext/base/dapxsumkbn/ndarray.native.js.html b/blas/ext/base/dapxsumkbn/ndarray.native.js.html new file mode 100644 index 000000000..522dd5e36 --- /dev/null +++ b/blas/ext/base/dapxsumkbn/ndarray.native.js.html @@ -0,0 +1,268 @@ + + + + + + Code coverage report for blas/ext/base/dapxsumkbn/lib/ndarray.native.js + + + + + + + + + +
+
+

All files / blas/ext/base/dapxsumkbn/lib ndarray.native.js

+
+ +
+ 85.24% + Statements + 52/61 +
+ + +
+ 100% + Branches + 1/1 +
+ + +
+ 0% + Functions + 0/1 +
+ + +
+ 85.24% + Lines + 52/61 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +621x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +  +  +  +  +  +  +  +  +  +1x +1x +1x +1x +1x + 
/**
+* @license Apache-2.0
+*
+* Copyright (c) 2020 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+ 
+'use strict';
+ 
+// MODULES //
+ 
+var minViewBufferIndex = require( '@stdlib/strided/base/min-view-buffer-index' );
+var offsetView = require( '@stdlib/strided/base/offset-view' );
+var addon = require( './dapxsumkbn.native.js' );
+ 
+ 
+// MAIN //
+ 
+/**
+* Adds a constant to each double-precision floating-point strided array element and computes the sum using an improved Kahan–Babuška algorithm.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {number} alpha - constant
+* @param {Float64Array} x - input array
+* @param {integer} stride - stride length
+* @param {NonNegativeInteger} offset - starting index
+* @returns {number} sum
+*
+* @example
+* var Float64Array = require( '@stdlib/array/float64' );
+*
+* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
+*
+* var v = dapxsumkbn( 4, 5.0, x, 2, 1 );
+* // returns 25.0
+*/
+function dapxsumkbn( N, alpha, x, stride, offset ) {
+	var view;
+
+	offset = minViewBufferIndex( N, stride, offset );
+
+	view = offsetView( x, offset );
+
+	return addon( N, alpha, view, stride );
+}
+ 
+ 
+// EXPORTS //
+ 
+module.exports = dapxsumkbn;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file