From 710183d294566f66d0c6395cf438a137fde675b1 Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Wed, 17 Apr 2024 02:21:25 +0000 Subject: [PATCH] Update artifacts --- blas/ext/base/sfill/coverage.ndjson | 1 + blas/ext/base/sfill/index.html | 206 ++++++++++++ blas/ext/base/sfill/index.js.html | 289 ++++++++++++++++ blas/ext/base/sfill/main.js.html | 190 +++++++++++ blas/ext/base/sfill/native.js.html | 190 +++++++++++ blas/ext/base/sfill/ndarray.js.html | 364 +++++++++++++++++++++ blas/ext/base/sfill/ndarray.native.js.html | 262 +++++++++++++++ blas/ext/base/sfill/sfill.js.html | 364 +++++++++++++++++++++ blas/ext/base/sfill/sfill.native.js.html | 244 ++++++++++++++ 9 files changed, 2110 insertions(+) create mode 100644 blas/ext/base/sfill/coverage.ndjson create mode 100644 blas/ext/base/sfill/index.html create mode 100644 blas/ext/base/sfill/index.js.html create mode 100644 blas/ext/base/sfill/main.js.html create mode 100644 blas/ext/base/sfill/native.js.html create mode 100644 blas/ext/base/sfill/ndarray.js.html create mode 100644 blas/ext/base/sfill/ndarray.native.js.html create mode 100644 blas/ext/base/sfill/sfill.js.html create mode 100644 blas/ext/base/sfill/sfill.native.js.html diff --git a/blas/ext/base/sfill/coverage.ndjson b/blas/ext/base/sfill/coverage.ndjson new file mode 100644 index 000000000..c9c044a9d --- /dev/null +++ b/blas/ext/base/sfill/coverage.ndjson @@ -0,0 +1 @@ +[436,436,100,40,40,100,4,4,100,436,436,100,"a7f3e4462eacec13b65535bfe4a39aa57a6a94cc","2024-04-16 22:19:15 -0400"] diff --git a/blas/ext/base/sfill/index.html b/blas/ext/base/sfill/index.html new file mode 100644 index 000000000..9e9c69362 --- /dev/null +++ b/blas/ext/base/sfill/index.html @@ -0,0 +1,206 @@ + + + + +
++ Press n or j to go to the next uncovered block, b, p or k for the previous block. +
+ +File | ++ | Statements | ++ | Branches | ++ | Functions | ++ | Lines | ++ |
---|---|---|---|---|---|---|---|---|---|
index.js | +
+
+ |
+ 100% | +68/68 | +100% | +3/3 | +100% | +0/0 | +100% | +68/68 | +
main.js | +
+
+ |
+ 100% | +35/35 | +100% | +1/1 | +100% | +0/0 | +100% | +35/35 | +
native.js | +
+
+ |
+ 100% | +35/35 | +100% | +1/1 | +100% | +0/0 | +100% | +35/35 | +
ndarray.js | +
+
+ |
+ 100% | +93/93 | +100% | +14/14 | +100% | +1/1 | +100% | +93/93 | +
ndarray.native.js | +
+
+ |
+ 100% | +59/59 | +100% | +2/2 | +100% | +1/1 | +100% | +59/59 | +
sfill.js | +
+
+ |
+ 100% | +93/93 | +100% | +17/17 | +100% | +1/1 | +100% | +93/93 | +
sfill.native.js | +
+
+ |
+ 100% | +53/53 | +100% | +2/2 | +100% | +1/1 | +100% | +53/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 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 | 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 +3x +1x +3x +2x +2x +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'; + +/** +* Fill a single-precision floating-point strided array with a specified scalar constant. +* +* @module @stdlib/blas/ext/base/sfill +* +* @example +* var Float32Array = require( '@stdlib/array/float32' ); +* var sfill = require( '@stdlib/blas/ext/base/sfill' ); +* +* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] ); +* +* sfill( x.length, 5.0, x, 1 ); +* // x => <Float32Array>[ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 ] +* +* @example +* var Float32Array = require( '@stdlib/array/float32' ); +* var sfill = require( '@stdlib/blas/ext/base/sfill' ); +* +* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] ); +* +* sfill.ndarray( x.length, 5.0, x, 1, 0 ); +* // x => <Float32Array>[ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.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 sfill; +var tmp = tryRequire( join( __dirname, './native.js' ) ); +if ( isError( tmp ) ) { + sfill = main; +} else { + sfill = tmp; +} + + +// EXPORTS // + +module.exports = sfill; + +// exports: { "ndarray": "sfill.ndarray" } + |
+ 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 | 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 setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var sfill = require( './sfill.js' ); +var ndarray = require( './ndarray.js' ); + + +// MAIN // + +setReadOnly( sfill, 'ndarray', ndarray ); + + +// EXPORTS // + +module.exports = sfill; + |
+ 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 | 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 setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var sfill = require( './sfill.native.js' ); +var ndarray = require( './ndarray.native.js' ); + + +// MAIN // + +setReadOnly( sfill, 'ndarray', ndarray ); + + +// EXPORTS // + +module.exports = sfill; + |
+ 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 +93 +94 | 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 +10x +10x +10x +10x +10x +10x +2x +2x +8x +8x +8x +10x +5x +5x +5x +5x +3x +11x +11x +11x +3x +5x +2x +2x +5x +43x +43x +43x +43x +43x +43x +43x +43x +43x +43x +3x +3x +10x +9x +9x +9x +3x +10x +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'; + +// VARIABLES // + +var M = 8; + + +// MAIN // + +/** +* Fills a single-precision floating-point strided array with a specified scalar constant. +* +* @param {PositiveInteger} N - number of indexed elements +* @param {number} alpha - scalar +* @param {Float32Array} x - input array +* @param {integer} stride - index increment +* @param {NonNegativeInteger} offset - starting index +* @returns {Float32Array} input array +* +* @example +* var Float32Array = require( '@stdlib/array/float32' ); +* +* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] ); +* +* sfill( 3, 5.0, x, 1, x.length-3 ); +* // x => <Float32Array>[ 1.0, -2.0, 3.0, 5.0, 5.0, 5.0 ] +*/ +function sfill( N, alpha, x, stride, offset ) { + var ix; + var m; + var i; + + if ( N <= 0 ) { + return x; + } + ix = offset; + + // Use loop unrolling if the stride is equal to `1`... + if ( stride === 1 ) { + m = N % M; + + // If we have a remainder, run a clean-up loop... + if ( m > 0 ) { + for ( i = 0; i < m; i++ ) { + x[ ix ] = alpha; + ix += stride; + } + } + if ( N < M ) { + return x; + } + for ( i = m; i < N; i += M ) { + x[ ix ] = alpha; + x[ ix+1 ] = alpha; + x[ ix+2 ] = alpha; + x[ ix+3 ] = alpha; + x[ ix+4 ] = alpha; + x[ ix+5 ] = alpha; + x[ ix+6 ] = alpha; + x[ ix+7 ] = alpha; + ix += M; + } + return x; + } + for ( i = 0; i < N; i++ ) { + x[ ix ] = alpha; + ix += stride; + } + return x; +} + + +// EXPORTS // + +module.exports = sfill; + |
+ 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 | 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 +10x +10x +10x +10x +10x +10x +10x +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 minViewBufferIndex = require( '@stdlib/strided/base/min-view-buffer-index' ); +var offsetView = require( '@stdlib/strided/base/offset-view' ); +var addon = require( './sfill.native.js' ); + + +// MAIN // + +/** +* Fills a single-precision floating-point strided array with a specified scalar constant. +* +* @param {PositiveInteger} N - number of indexed elements +* @param {number} alpha - scalar +* @param {Float32Array} x - input array +* @param {integer} stride - index increment +* @param {NonNegativeInteger} offset - starting index +* @returns {Float32Array} input array +* +* @example +* var Float32Array = require( '@stdlib/array/float32' ); +* +* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] ); +* +* sfill( 3, 5.0, x, 1, x.length-3 ); +* // x => <Float32Array>[ 1.0, -2.0, 3.0, 5.0, 5.0, 5.0 ] +*/ +function sfill( N, alpha, x, stride, offset ) { + var view; + offset = minViewBufferIndex( N, stride, offset ); + view = offsetView( x, offset ); + addon( N, alpha, view, stride ); + return x; +} + + +// EXPORTS // + +module.exports = sfill; + |
+ 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 +93 +94 | 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 +10x +10x +10x +10x +10x +10x +2x +2x +8x +10x +5x +5x +5x +5x +3x +11x +11x +3x +5x +2x +2x +5x +43x +43x +43x +43x +43x +43x +43x +43x +43x +3x +3x +10x +1x +10x +2x +2x +10x +9x +9x +9x +3x +10x +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'; + +// VARIABLES // + +var M = 8; + + +// MAIN // + +/** +* Fills a single-precision floating-point strided array with a specified scalar constant. +* +* @param {PositiveInteger} N - number of indexed elements +* @param {number} alpha - scalar +* @param {Float32Array} x - input array +* @param {integer} stride - index increment +* @returns {Float32Array} input array +* +* @example +* var Float32Array = require( '@stdlib/array/float32' ); +* +* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] ); +* +* sfill( x.length, 5.0, x, 1 ); +* // x => <Float32Array>[ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 ] +*/ +function sfill( N, alpha, x, stride ) { + var ix; + var i; + var m; + + if ( N <= 0 ) { + return x; + } + // Use loop unrolling if the stride is equal to `1`... + if ( stride === 1 ) { + m = N % M; + + // If we have a remainder, run a clean-up loop... + if ( m > 0 ) { + for ( i = 0; i < m; i++ ) { + x[ i ] = alpha; + } + } + if ( N < M ) { + return x; + } + for ( i = m; i < N; i += M ) { + x[ i ] = alpha; + x[ i+1 ] = alpha; + x[ i+2 ] = alpha; + x[ i+3 ] = alpha; + x[ i+4 ] = alpha; + x[ i+5 ] = alpha; + x[ i+6 ] = alpha; + x[ i+7 ] = alpha; + } + return x; + } + if ( stride < 0 ) { + ix = (1-N) * stride; + } else { + ix = 0; + } + for ( i = 0; i < N; i++ ) { + x[ ix ] = alpha; + ix += stride; + } + return x; +} + + +// EXPORTS // + +module.exports = sfill; + |
+ 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 | 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 +20x +20x +20x +20x +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 // + +/** +* Fills a single-precision floating-point strided array with a specified scalar constant. +* +* @param {PositiveInteger} N - number of indexed elements +* @param {number} alpha - scalar +* @param {Float32Array} x - input array +* @param {integer} stride - index increment +* @returns {Float32Array} input array +* +* @example +* var Float32Array = require( '@stdlib/array/float32' ); +* +* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] ); +* +* sfill( x.length, 5.0, x, 1 ); +* // x => <Float32Array>[ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 ] +*/ +function sfill( N, alpha, x, stride ) { + addon( N, alpha, x, stride ); + return x; +} + + +// EXPORTS // + +module.exports = sfill; + |