Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jan 3, 2025
1 parent 8bb2190 commit 688832d
Show file tree
Hide file tree
Showing 14 changed files with 131 additions and 159 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ indent_style = tab
[*.{md,md.txt}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false
trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim.
# Set properties for `usage.txt` files:
[usage.txt]
Expand Down
1 change: 0 additions & 1 deletion .github/.keepalive

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

# Run workflow job if `publish` workflow run is successful or when the workflow is manually run:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
# Run workflow job if `publish` workflow run is successful or when the workflow is manually triggered or on a schedule:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}

# Define the sequence of job steps...
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_published_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

# Run workflow job if `publish` workflow run is successful or when the workflow is manually run:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
# Run workflow job if `publish` workflow run is successful or when the workflow is manually triggered or on a schedule:
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}

# Define the job's steps:
steps:
Expand Down
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
<section class="release" id="unreleased">

## Unreleased (2024-12-01)
## Unreleased (2025-01-03)

<section class="commits">

### Commits

<details>

- [`f45a304`](https://github.com/stdlib-js/stdlib/commit/f45a30444f00092d9e2dc54d7859b218dc5fe37e) - **refactor:** update `stats/base/sstdevpn` native addon from C++ to C [(#4509)](https://github.com/stdlib-js/stdlib/pull/4509) _(by Dhruv Arvind Singh)_
- [`62364f6`](https://github.com/stdlib-js/stdlib/commit/62364f62ea823a3b52c2ad25660ecd80c71f8f36) - **style:** fix C comment alignment _(by Philipp Burckhardt)_
- [`9e689ff`](https://github.com/stdlib-js/stdlib/commit/9e689ffcb7c6223afc521f1e574b42f10921cf5e) - **chore:** fix indentation in manifest.json files _(by Philipp Burckhardt)_
- [`272ae7a`](https://github.com/stdlib-js/stdlib/commit/272ae7ac5c576c68cfab1b6e304c86407faa20cd) - **docs:** remove comment _(by Athan Reines)_
- [`2777e4b`](https://github.com/stdlib-js/stdlib/commit/2777e4be161869d09406e3b17947d24c64b47af2) - **bench:** resolve lint errors in benchmarks _(by Athan Reines)_
Expand All @@ -26,9 +28,10 @@

### Contributors

A total of 2 people contributed to this release. Thank you to the following contributors:
A total of 3 people contributed to this release. Thank you to the following contributors:

- Athan Reines
- Dhruv Arvind Singh
- Philipp Burckhardt

</section>
Expand Down
40 changes: 24 additions & 16 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
#
# Contributors listed in alphabetical order.

Aadish Jain <jain.aadishj@gmail.com>
Aayush Khanna <aayushiitbhu23@gmail.com>
Abhijit Raut <abhijitmraut8010@gmail.com>
Adarsh Palaskar <adarshpalaskar99@gmail.com>
Aditya Sapra <adityaework@gmail.com>
AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com>
Ahmed Atwa <Ahmedatwa866@yahoo.com>
Ahmed Kashkoush <ahmedkashkoush464@gmail.com>
Ahmed Khaled <kahmd1444@gmail.com>
Aleksandr <112382387+alextes90@users.noreply.github.com>
Ali Salesi <ali_sal1381@yahoo.com>
Aman Bhansali <bhansali.1@iitj.ac.in>
Expand All @@ -23,6 +26,9 @@ Dan Rose <danoftheroses@gmail.com>
Daniel Killenberger <daniel.killenberger@gmail.com>
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
Debashis Maharana <debashismaharana7854@gmail.com>
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
Dhruv/ <154677013+DhruvArvindSingh@users.noreply.github.com>
Divyansh Seth <59174836+sethdivyansh@users.noreply.github.com>
Dominic Lim <46486515+domlimm@users.noreply.github.com>
Dominik Moritz <domoritz@gmail.com>
Dorrin Sotoudeh <dorrinsotoudeh123@gmail.com>
Expand All @@ -45,12 +51,12 @@ Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
Joris Labie <joris.labie1@gmail.com>
Justin Dennison <justin1dennison@gmail.com>
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
Khaldon <kahmd1444@gmail.com>
Kohantika Nath <145763549+kohantikanath@users.noreply.github.com>
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>
Kshitij-Dale <152467202+Kshitij-Dale@users.noreply.github.com>
Lovelin <100030865+lovelindhoni@users.noreply.github.com>
Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com>
Manik Sharma <maniksharma.rke@gmail.com>
Manvith M <148960168+manvith2003@users.noreply.github.com>
Marcus Fantham <mfantham@users.noreply.github.com>
Matt Cochrane <matthew.cochrane.eng@gmail.com>
Mihir Pandit <129577900+MSP20086@users.noreply.github.com>
Expand All @@ -59,37 +65,41 @@ Mohammad Kaif <mdkaifprofession@gmail.com>
Momtchil Momtchev <momtchil@momtchev.com>
Muhammad Haris <harriskhan047@outlook.com>
Naresh Jagadeesan <naresh.naresh000@gmail.com>
Naveen Kumar <stupiddint@gmail.com>
Neeraj Pathak <neerajrpathak710@gmail.com>
NightKnight <Ahmedatwa866@yahoo.com>
Nishant Shinde <97207366+nishant-s7@users.noreply.github.com>
Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
Nourhan Hasan <109472010+TheNourhan@users.noreply.github.com>
Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
Oneday12323 <107678750+Oneday12323@users.noreply.github.com>
Ori Miles <97595296+orimiles5@users.noreply.github.com>
Philipp Burckhardt <pburckhardt@outlook.com>
Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
Pranav Goswami <goswami.4@iitj.ac.in>
Praneki <97080887+PraneGIT@users.noreply.github.com>
Pratik <97464067+Pratik772846@users.noreply.github.com>
Pranjal Jha <97080887+PraneGIT@users.noreply.github.com>
Prashant Kumar Yadav <144602492+0PrashantYadav0@users.noreply.github.com>
Pratik Singh <97464067+Pratik772846@users.noreply.github.com>
Pratyush Kumar Chouhan <pratyushkumar0308@gmail.com>
Priyansh <88396544+itsspriyansh@users.noreply.github.com>
Priyansh Prajapati <88396544+itsspriyansh@users.noreply.github.com>
Priyanshu Agarwal <113460573+AgPriyanshu18@users.noreply.github.com>
Pushpendra Chandravanshi <pushpendrachandravanshi4@gmail.com>
RISHAV <115060907+rishav2404@users.noreply.github.com>
Raunak Kumar Gupta <raunakmodanwal321@gmail.com>
Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com>
Ricky Reusser <rsreusser@gmail.com>
Ridam Garg <67867319+RidamGarg@users.noreply.github.com>
Rishav <115060907+rishav2404@users.noreply.github.com>
Robert Gislason <gztown2216@yahoo.com>
Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
Rutam <138517416+performant23@users.noreply.github.com>
Rutam Kathale <138517416+performant23@users.noreply.github.com>
Ruthwik Chikoti <145591715+ruthwikchikoti@users.noreply.github.com>
Ryan Seal <splrk@users.noreply.github.com>
Rylan Yang <137365285+rylany27@users.noreply.github.com>
Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com>
SarthakPaandey <145528240+SarthakPaandey@users.noreply.github.com>
Sarthak Paandey <145528240+SarthakPaandey@users.noreply.github.com>
Saurabh Singh <saurabhsraghuvanshi@gmail.com>
Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
Shivam <11shivam00@gmail.com>
Shivam Ahir <11shivam00@gmail.com>
Shraddheya Shendre <shendreshraddheya@gmail.com>
Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
Shubham Mishra <shubh622005@gmail.com>
Expand All @@ -98,7 +108,7 @@ Snehil Shah <snehilshah.989@gmail.com>
Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com>
Spandan Barve <contact@marsian.dev>
Stephannie Jiménez Gacha <steff456@hotmail.com>
Suraj kumar <125961509+kumarsuraj212003@users.noreply.github.com>
Suraj Kumar <125961509+kumarsuraj212003@users.noreply.github.com>
Tirtadwipa Manunggal <tirtadwipa.manunggal@gmail.com>
Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
Tufailahmed Bargir <142114244+Tufailahmed-Bargir@users.noreply.github.com>
Expand All @@ -108,12 +118,10 @@ UtkershBasnet <119008923+UtkershBasnet@users.noreply.github.com>
Vaibhav Patel <98279986+noobCoderVP@users.noreply.github.com>
Varad Gupta <varadgupta21@gmail.com>
Vinit Pandit <106718914+MeastroZI@users.noreply.github.com>
Vivek maurya <155618190+vivekmaurya001@users.noreply.github.com>
Xiaochuan Ye <tap91624@gmail.com>
Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com>
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
naveen <stupiddint@gmail.com>
nishant-s7 <97207366+nishant-s7@users.noreply.github.com>
olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com>
orimiles5 <97595296+orimiles5@users.noreply.github.com>
rainn <88160429+AmCodesLame@users.noreply.github.com>
rei2hu <reimu@reimu.ws>
yaswanth <116426380+yaswanthkosuru@users.noreply.github.com>
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Copyright (c) 2016-2024 The Stdlib Authors.
Copyright (c) 2016-2025 The Stdlib Authors.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ See [LICENSE][stdlib-license].

## Copyright

Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
Copyright &copy; 2016-2025. The Stdlib [Authors][stdlib-authors].

</section>

Expand Down
2 changes: 1 addition & 1 deletion benchmark/c/benchmark.length.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static float rand_float( void ) {
*
* @param iterations number of iterations
* @param len array length
* @return elapsed time in seconds
* @return elapsed time in seconds
*/
static double benchmark( int iterations, int len ) {
double elapsed;
Expand Down
2 changes: 1 addition & 1 deletion include.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Source files:
'src_files': [
'<(src_dir)/addon.cpp',
'<(src_dir)/addon.c',
'<!@(node -e "var arr = require(\'@stdlib/utils-library-manifest\')(\'./manifest.json\',{},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).src; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
],

Expand Down
43 changes: 42 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"options": {},
"options": {
"task": "build"
},
"fields": [
{
"field": "src",
Expand All @@ -24,6 +26,45 @@
],
"confs": [
{
"task": "build",
"src": [
"./src/sstdevpn.c"
],
"include": [
"./include"
],
"libraries": [
"-lm"
],
"libpath": [],
"dependencies": [
"@stdlib/napi-export",
"@stdlib/napi-argv",
"@stdlib/napi-argv-int64",
"@stdlib/napi-argv-float",
"@stdlib/napi-argv-strided-float32array",
"@stdlib/stats-base-svariancepn",
"@stdlib/napi-create-double"
]
},
{
"task": "benchmark",
"src": [
"./src/sstdevpn.c"
],
"include": [
"./include"
],
"libraries": [
"-lm"
],
"libpath": [],
"dependencies": [
"@stdlib/stats-base-svariancepn"
]
},
{
"task": "examples",
"src": [
"./src/sstdevpn.c"
],
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
"dependencies": {
"@stdlib/assert-is-error": "^0.2.2",
"@stdlib/math-base-special-sqrt": "^0.2.2",
"@stdlib/napi-argv": "^0.2.2",
"@stdlib/napi-argv-float": "^0.2.2",
"@stdlib/napi-argv-int64": "^0.2.2",
"@stdlib/napi-argv-strided-float32array": "^0.2.2",
"@stdlib/napi-create-double": "^0.0.2",
"@stdlib/napi-export": "^0.2.2",
"@stdlib/number-float64-base-to-float32": "^0.2.2",
"@stdlib/stats-base-svariancepn": "^0.2.2",
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2",
Expand Down
45 changes: 45 additions & 0 deletions src/addon.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2025 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.
*/

#include "stdlib/stats/base/sstdevpn.h"
#include "stdlib/napi/export.h"
#include "stdlib/napi/argv.h"
#include "stdlib/napi/argv_int64.h"
#include "stdlib/napi/argv_float.h"
#include "stdlib/napi/argv_strided_float32array.h"
#include "stdlib/napi/create_double.h"
#include <node_api.h>

/**
* Receives JavaScript callback invocation data.
*
* @param env environment under which the function is invoked
* @param info callback data
* @return Node-API value
*/
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_FLOAT( env, correction, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 2 );
STDLIB_NAPI_CREATE_DOUBLE( env, (double)stdlib_strided_sstdevpn( N, correction, X, stride ), v );
return v;
}

STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
Loading

0 comments on commit 688832d

Please sign in to comment.