-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec1dfba
commit 3a9fb60
Showing
21 changed files
with
1,376 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,14 @@ | |
# | ||
# Contributors listed in alphabetical order. | ||
|
||
Aadish Jain <[email protected]> | ||
Aayush Khanna <[email protected]> | ||
Abhijit Raut <[email protected]> | ||
Adarsh Palaskar <[email protected]> | ||
Aditya Sapra <[email protected]> | ||
Ahmed Atwa <[email protected]> | ||
Ahmed Kashkoush <[email protected]> | ||
Ahmed Khaled <[email protected]> | ||
Aleksandr <[email protected]> | ||
Ali Salesi <[email protected]> | ||
Aman Bhansali <[email protected]> | ||
|
@@ -24,6 +26,7 @@ Dan Rose <[email protected]> | |
Daniel Killenberger <[email protected]> | ||
Daniel Yu <[email protected]> | ||
Debashis Maharana <[email protected]> | ||
Divyansh Seth <[email protected]> | ||
Dominic Lim <[email protected]> | ||
Dominik Moritz <[email protected]> | ||
Dorrin Sotoudeh <[email protected]> | ||
|
@@ -46,11 +49,10 @@ Jordan Gallivan <[email protected]> | |
Joris Labie <[email protected]> | ||
Justin Dennison <[email protected]> | ||
Karthik Prakash <[email protected]> | ||
Khaldon <[email protected]> | ||
Kohantika Nath <[email protected]> | ||
Krishnendu Das <[email protected]> | ||
Kshitij-Dale <[email protected]> | ||
Lovelin <[email protected]> | ||
Lovelin Dhoni J B <[email protected]> | ||
Manik Sharma <[email protected]> | ||
Manvith M <[email protected]> | ||
Marcus Fantham <[email protected]> | ||
|
@@ -61,6 +63,7 @@ Mohammad Kaif <[email protected]> | |
Momtchil Momtchev <[email protected]> | ||
Muhammad Haris <[email protected]> | ||
Naresh Jagadeesan <[email protected]> | ||
Naveen Kumar <[email protected]> | ||
Neeraj Pathak <[email protected]> | ||
Nishant Shinde <[email protected]> | ||
Nithin Katta <[email protected]> | ||
|
@@ -71,10 +74,10 @@ Ori Miles <[email protected]> | |
Philipp Burckhardt <[email protected]> | ||
Prajwal Kulkarni <[email protected]> | ||
Pranav Goswami <[email protected]> | ||
Praneki <[email protected]> | ||
Pratik <[email protected]> | ||
Pranjal Jha <[email protected]> | ||
Pratik Singh <[email protected]> | ||
Pratyush Kumar Chouhan <[email protected]> | ||
Priyansh <[email protected]> | ||
Priyansh Prajapati <[email protected]> | ||
Priyanshu Agarwal <[email protected]> | ||
Pushpendra Chandravanshi <[email protected]> | ||
Raunak Kumar Gupta <[email protected]> | ||
|
@@ -93,7 +96,7 @@ Sarthak Paandey <[email protected]> | |
Saurabh Singh <[email protected]> | ||
Seyyed Parsa Neshaei <[email protected]> | ||
Shashank Shekhar Singh <[email protected]> | ||
Shivam <[email protected]> | ||
Shivam Ahir <[email protected]> | ||
Shraddheya Shendre <[email protected]> | ||
Shubh Mehta <[email protected]> | ||
Shubham Mishra <[email protected]> | ||
|
@@ -112,10 +115,10 @@ UtkershBasnet <[email protected]> | |
Vaibhav Patel <[email protected]> | ||
Varad Gupta <[email protected]> | ||
Vinit Pandit <[email protected]> | ||
Vivek maurya <[email protected]> | ||
Xiaochuan Ye <[email protected]> | ||
Yaswanth Kosuru <[email protected]> | ||
Yernar Yergaziyev <[email protected]> | ||
naveen <[email protected]> | ||
olenkabilonizhka <[email protected]> | ||
rainn <[email protected]> | ||
rei2hu <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/** | ||
* @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. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
// MODULES // | ||
|
||
var resolve = require( 'path' ).resolve; | ||
var bench = require( '@stdlib/bench-harness' ); | ||
var Float64Array = require( '@stdlib/array-float64' ); | ||
var randu = require( '@stdlib/random-base-randu' ); | ||
var isnan = require( '@stdlib/math-base-assert-is-nan' ); | ||
var tryRequire = require( '@stdlib/utils-try-require' ); | ||
var pkg = require( './../package.json' ).name; | ||
|
||
|
||
// VARIABLES // | ||
|
||
var mode = tryRequire( resolve( __dirname, './../lib/native.js' ) ); | ||
var opts = { | ||
'skip': ( mode instanceof Error ) | ||
}; | ||
|
||
|
||
// MAIN // | ||
|
||
bench( pkg+'::native', opts, function benchmark( b ) { | ||
var bnd; | ||
var len; | ||
var a; | ||
var c; | ||
var y; | ||
var i; | ||
|
||
len = 100; | ||
a = new Float64Array( len ); | ||
bnd = new Float64Array( len ); | ||
c = new Float64Array( len ); | ||
for ( i = 0; i < len; i++ ) { | ||
a[ i ] = ( randu() * 20.0 ); // Lower bound | ||
bnd[ i ] = ( randu() * 20.0 ) + a[ i ]; // Upper bound | ||
c[ i ] = ( randu() * ( bnd[i] - a[i] ) ) + a[i]; // Mode | ||
} | ||
|
||
b.tic(); | ||
for ( i = 0; i < b.iterations; i++ ) { | ||
y = mode( a[ i % len ], bnd[ i % len ], c[ i % len ] ); | ||
if ( isnan( y ) ) { | ||
b.fail( 'should not return NaN' ); | ||
} | ||
} | ||
b.toc(); | ||
if ( isnan( y ) ) { | ||
b.fail( 'should not return NaN' ); | ||
} | ||
b.pass( 'benchmark finished' ); | ||
b.end(); | ||
}); |
Oops, something went wrong.