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 <97464067+Pratik772846@users.noreply.github.com> Pratik772846

Priyansh <88396544+itsspriyansh@users.noreply.github.com> itsspriyansh

Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com> <56391001+Pushpendra766@users.noreply.github.com>
Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com> Pushpendra766

# R

Raunak Kumar Gupta <raunakmodanwal321@gmail.com> <95216822+raunak-dev-edu@users.noreply.github.com>
Expand Down Expand Up @@ -137,6 +140,10 @@ Stephannie Jiménez Gacha <steff456@hotmail.com> <steff456@users.noreply.github.
Stephannie Jiménez Gacha <steff456@hotmail.com> Stephannie Jimenez
Stephannie Jiménez Gacha <steff456@hotmail.com> Stephannie Jimenez Gacha

# T

Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com> tudor-pagu

# U

Utkarsh <http://utkarsh11105@gmail.com> <137638507+Ut-the-pro@users.noreply.github.com>
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 <joris.labie1@gmail.com>
Justin Dennison <justin1dennison@gmail.com>
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
Khaldon <kahmd1444@gmail.com>
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
Lovelin <100030865+lovelindhoni@users.noreply.github.com>
Manik Sharma <maniksharma.rke@gmail.com>
Marcus Fantham <mfantham@users.noreply.github.com>
Expand All @@ -45,6 +46,7 @@ Milan Raj <rajsite@users.noreply.github.com>
Momtchil Momtchev <momtchil@momtchev.com>
Muhammad Haris <harriskhan047@outlook.com>
Naresh Jagadeesan <naresh.naresh000@gmail.com>
NightKnight <Ahmedatwa866@yahoo.com>
Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
Oneday12323 <107678750+Oneday12323@users.noreply.github.com>
Expand All @@ -54,6 +56,7 @@ Pranav Goswami <goswami.4@iitj.ac.in>
Praneki <97080887+PraneGIT@users.noreply.github.com>
Pratik <97464067+Pratik772846@users.noreply.github.com>
Priyansh <88396544+itsspriyansh@users.noreply.github.com>
Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com>
Raunak Kumar Gupta <raunakmodanwal321@gmail.com>
Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Ricky Reusser <rsreusser@gmail.com>
Expand All @@ -72,6 +75,7 @@ Spandan Barve <contact@marsian.dev>
Stephannie Jiménez Gacha <steff456@hotmail.com>
Suraj kumar <125961509+kumarsuraj212003@users.noreply.github.com>
Tirtadwipa Manunggal <tirtadwipa.manunggal@gmail.com>
Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
Utkarsh <http://utkarsh11105@gmail.com>
Utkarsh Raj <rajutkarsh2505@gmail.com>
Varad Gupta <varadgupta21@gmail.com>
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.