Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into de…
Browse files Browse the repository at this point in the history
…velop
  • Loading branch information
kgryte committed Mar 27, 2024
2 parents 7d5eb79 + 75da936 commit 8204e8b
Show file tree
Hide file tree
Showing 239 changed files with 10,219 additions and 1,959 deletions.
71 changes: 71 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!--
@license Apache-2.0
Copyright (c) 2024 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.
-->

[![Open in GitHub Codespaces][github-codespaces-image]][github-codespaces-url]

[![Open in Dev Containers][dev-container-image]][dev-container-url]

# Development Container

> Development container for `stdlib`.
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->

<section class="intro">

This folder includes configuration for developing the project in a local container or using [GitHub Codespaces][github-codespaces].

</section>

<!-- /.intro -->

<!-- Section to include usage notes. -->

<section class="usage">

</section>

<!-- /.usage -->

<!-- Section to include usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="notes">

</section>

<!-- /.notes -->

<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="links">

[dev-container-image]: https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode

[dev-container-url]: https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/stdlib-js/stdlib

[github-codespaces]: https://github.com/features/codespaces

[github-codespaces-image]: https://github.com/codespaces/badge.svg

[github-codespaces-url]: https://codespaces.new/stdlib-js/stdlib

</section>

<!-- /.links -->
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "stdlib - OSS Development",
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye",
"features": {
"ghcr.io/devcontainers/features/python:1": {},
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {},
"ghcr.io/julialang/devcontainer-features/julia:1": {},
"ghcr.io/marcozac/devcontainer-features/shellcheck:1": {},
"ghcr.io/rocker-org/devcontainer-features/pandoc:1": {}
},
"postCreateCommand": "./.devcontainer/post-create",
"customizations": {
"codespaces": {
"openFiles": [
"README.md"
]
},
"vscode": {
"settings": {
"resmon.show.battery": false,
"resmon.show.cpufreq": false
},
"extensions": [
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"formulahendry.code-runner",
"vsls-contrib.codetour"
]
}
}
}
22 changes: 22 additions & 0 deletions .devcontainer/post-create
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
#
# @license Apache-2.0
#
# Copyright (c) 2024 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.

# Script to set up a development environment.

make install
make init
7 changes: 7 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ Pratik <[email protected]> Pratik772846

Priyansh <[email protected]> itsspriyansh

Pushpendra Chandravanshi <[email protected]> <[email protected]>
Pushpendra Chandravanshi <[email protected]> Pushpendra766

# R

Raunak Kumar Gupta <[email protected]> <[email protected]>
Expand Down Expand Up @@ -137,6 +140,10 @@ Stephannie Jiménez Gacha <[email protected]> <[email protected].
Stephannie Jiménez Gacha <[email protected]> Stephannie Jimenez
Stephannie Jiménez Gacha <[email protected]> Stephannie Jimenez Gacha

# T

Tudor Pagu <[email protected]> tudor-pagu

# U

Utkarsh <http://[email protected]> <[email protected]>
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Joris Labie <[email protected]>
Justin Dennison <[email protected]>
Karthik Prakash <[email protected]>
Khaldon <[email protected]>
Krishnendu Das <[email protected]>
Lovelin <[email protected]>
Manik Sharma <[email protected]>
Marcus Fantham <[email protected]>
Expand All @@ -45,6 +46,7 @@ Milan Raj <[email protected]>
Momtchil Momtchev <[email protected]>
Muhammad Haris <[email protected]>
Naresh Jagadeesan <[email protected]>
NightKnight <[email protected]>
Nithin Katta <[email protected]>
Ognjen Jevremović <[email protected]>
Oneday12323 <[email protected]>
Expand All @@ -54,6 +56,7 @@ Pranav Goswami <[email protected]>
Praneki <[email protected]>
Pratik <[email protected]>
Priyansh <[email protected]>
Pushpendra Chandravanshi <[email protected]>
Raunak Kumar Gupta <[email protected]>
Rejoan Sardar <[email protected]>
Ricky Reusser <[email protected]>
Expand All @@ -72,6 +75,7 @@ Spandan Barve <[email protected]>
Stephannie Jiménez Gacha <[email protected]>
Suraj kumar <[email protected]>
Tirtadwipa Manunggal <[email protected]>
Tudor Pagu <[email protected]>
Utkarsh <http://[email protected]>
Utkarsh Raj <[email protected]>
Varad Gupta <[email protected]>
Expand Down
31 changes: 9 additions & 22 deletions lib/node_modules/@stdlib/blas/ext/base/dapxsum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,18 @@ var v = dapxsum( N, 5.0, x, 1 );
The function has the following parameters:

- **N**: number of indexed elements.
- **alpha**: scalar constant.
- **x**: input [`Float64Array`][@stdlib/array/float64].
- **stride**: index increment for `x`.

The `N` and `stride` parameters determine which elements in `x` are accessed at runtime. For example, to access every other element in `x`,
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to access every other element in `x`,

```javascript
var Float64Array = require( '@stdlib/array/float64' );
var floor = require( '@stdlib/math/base/special/floor' );

var x = new Float64Array( [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0 ] );
var N = floor( x.length / 2 );

var v = dapxsum( N, 5.0, x, 2 );
var v = dapxsum( 4, 5.0, x, 2 );
// returns 25.0
```

Expand All @@ -75,14 +74,11 @@ Note that indexing is relative to the first index. To introduce an offset, use [

```javascript
var Float64Array = require( '@stdlib/array/float64' );
var floor = require( '@stdlib/math/base/special/floor' );

var x0 = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element

var N = floor( x0.length / 2 );

var v = dapxsum( N, 5.0, x1, 2 );
var v = dapxsum( 4, 5.0, x1, 2 );
// returns 25.0
```

Expand All @@ -104,16 +100,14 @@ The function has the following additional parameters:

- **offset**: starting index for `x`.

While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the `offset` parameter supports indexing semantics based on a starting index. For example, to access every other value in `x` starting from the second value
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the offset parameter supports indexing semantics based on a starting index. For example, to access every other value in `x` starting from the second value

```javascript
var Float64Array = require( '@stdlib/array/float64' );
var floor = require( '@stdlib/math/base/special/floor' );

var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
var N = floor( x.length / 2 );

var v = dapxsum.ndarray( N, 5.0, x, 2, 1 );
var v = dapxsum.ndarray( 4, 5.0, x, 2, 1 );
// returns 25.0
```

Expand All @@ -138,18 +132,11 @@ var v = dapxsum.ndarray( N, 5.0, x, 2, 1 );
<!-- eslint no-undef: "error" -->

```javascript
var randu = require( '@stdlib/random/base/randu' );
var round = require( '@stdlib/math/base/special/round' );
var Float64Array = require( '@stdlib/array/float64' );
var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
var filledarrayBy = require( '@stdlib/array/filled-by' );
var dapxsum = require( '@stdlib/blas/ext/base/dapxsum' );

var x;
var i;

x = new Float64Array( 10 );
for ( i = 0; i < x.length; i++ ) {
x[ i ] = round( randu()*100.0 );
}
var x = filledarrayBy( 10, 'float64', discreteUniform( 0, 100 ) );
console.log( x );

var v = dapxsum( x.length, 5.0, x, 1 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@
// MODULES //

var bench = require( '@stdlib/bench' );
var randu = require( '@stdlib/random/base/randu' );
var uniform = require( '@stdlib/random/base/uniform' ).factory;
var filledarrayBy = require( '@stdlib/array/filled-by' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var pow = require( '@stdlib/math/base/special/pow' );
var Float64Array = require( '@stdlib/array/float64' );
var pkg = require( './../package.json' ).name;
var dapxsum = require( './../lib/dapxsum.js' );


// VARIABLES //

var rand = uniform( -100.0, 100.0 );


// FUNCTIONS //

/**
Expand All @@ -39,13 +44,7 @@ var dapxsum = require( './../lib/dapxsum.js' );
* @returns {Function} benchmark function
*/
function createBenchmark( len ) {
var x;
var i;

x = new Float64Array( len );
for ( i = 0; i < x.length; i++ ) {
x[ i ] = ( randu()*20.0 ) - 10.0;
}
var x = filledarrayBy( len, 'float64', rand );
return benchmark;

function benchmark( b ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

var resolve = require( 'path' ).resolve;
var bench = require( '@stdlib/bench' );
var randu = require( '@stdlib/random/base/randu' );
var uniform = require( '@stdlib/random/base/uniform' ).factory;
var filledarrayBy = require( '@stdlib/array/filled-by' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var pow = require( '@stdlib/math/base/special/pow' );
var Float64Array = require( '@stdlib/array/float64' );
var tryRequire = require( '@stdlib/utils/try-require' );
var pkg = require( './../package.json' ).name;

Expand All @@ -36,6 +36,7 @@ var dapxsum = tryRequire( resolve( __dirname, './../lib/dapxsum.native.js' ) );
var opts = {
'skip': ( dapxsum instanceof Error )
};
var rand = uniform( -100.0, 100.0 );


// FUNCTIONS //
Expand All @@ -48,13 +49,7 @@ var opts = {
* @returns {Function} benchmark function
*/
function createBenchmark( len ) {
var x;
var i;

x = new Float64Array( len );
for ( i = 0; i < x.length; i++ ) {
x[ i ] = ( randu()*20.0 ) - 10.0;
}
var x = filledarrayBy( len, 'float64', rand );
return benchmark;

function benchmark( b ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@
// MODULES //

var bench = require( '@stdlib/bench' );
var randu = require( '@stdlib/random/base/randu' );
var uniform = require( '@stdlib/random/base/uniform' ).factory;
var filledarrayBy = require( '@stdlib/array/filled-by' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var pow = require( '@stdlib/math/base/special/pow' );
var Float64Array = require( '@stdlib/array/float64' );
var pkg = require( './../package.json' ).name;
var dapxsum = require( './../lib/ndarray.js' );


// VARIABLES //

var rand = uniform( -100.0, 100.0 );


// FUNCTIONS //

/**
Expand All @@ -39,13 +44,7 @@ var dapxsum = require( './../lib/ndarray.js' );
* @returns {Function} benchmark function
*/
function createBenchmark( len ) {
var x;
var i;

x = new Float64Array( len );
for ( i = 0; i < x.length; i++ ) {
x[ i ] = ( randu()*20.0 ) - 10.0;
}
var x = filledarrayBy( len, 'float64', rand );
return benchmark;

function benchmark( b ) {
Expand Down
Loading

1 comment on commit 8204e8b

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage Report

Package Statements Branches Functions Lines
blas/base/ccopy $\color{green}497/497$
$\color{green}+100.00\%$
$\color{green}31/31$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}497/497$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.