Skip to content

Commit cef835c

Browse files
committed
Auto-generated commit
1 parent f9f2f9d commit cef835c

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2026-02-25)
7+
## Unreleased (2026-02-28)
88

99
<section class="commits">
1010

1111
### Commits
1212

1313
<details>
1414

15+
- [`c333671`](https://github.com/stdlib-js/stdlib/commit/c3336710c7caf084fc146ddaed7bb9e02a1bb891) - **bench:** refactor to use dynamic memory allocation in `blas/base/sswap` [(#10573)](https://github.com/stdlib-js/stdlib/pull/10573) _(by Prajjwal Bajpai)_
1516
- [`3dd5b4f`](https://github.com/stdlib-js/stdlib/commit/3dd5b4fd6aea4394b8a39b587961d2f94c4cdd9c) - **bench:** refactor to use string interpolation in `blas/base/sswap` [(#10491)](https://github.com/stdlib-js/stdlib/pull/10491) _(by Shubham)_
1617

1718
</details>
@@ -24,8 +25,9 @@
2425

2526
### Contributors
2627

27-
A total of 1 person contributed to this release. Thank you to this contributor:
28+
A total of 2 people contributed to this release. Thank you to the following contributors:
2829

30+
- Prajjwal Bajpai
2931
- Shubham
3032

3133
</section>

benchmark/c/benchmark.length.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,13 @@ static float rand_float( void ) {
9696
*/
9797
static double benchmark1( int iterations, int len ) {
9898
double elapsed;
99-
float x[ len ];
100-
float y[ len ];
99+
float *x;
100+
float *y;
101101
double t;
102102
int i;
103103

104+
x = (float *) malloc( len * sizeof( float ) );
105+
y = (float *) malloc( len * sizeof( float ) );
104106
for ( i = 0; i < len; i++ ) {
105107
x[ i ] = ( rand_float()*20000.0f ) - 10000.0f;
106108
y[ i ] = 0.0f;
@@ -117,6 +119,8 @@ static double benchmark1( int iterations, int len ) {
117119
if ( y[ 0 ] != y[ 0 ] ) {
118120
printf( "should not return NaN\n" );
119121
}
122+
free( x );
123+
free( y );
120124
return elapsed;
121125
}
122126

@@ -129,11 +133,13 @@ static double benchmark1( int iterations, int len ) {
129133
*/
130134
static double benchmark2( int iterations, int len ) {
131135
double elapsed;
132-
float x[ len ];
133-
float y[ len ];
136+
float *x;
137+
float *y;
134138
double t;
135139
int i;
136140

141+
x = (float *) malloc( len * sizeof( float ) );
142+
y = (float *) malloc( len * sizeof( float ) );
137143
for ( i = 0; i < len; i++ ) {
138144
x[ i ] = ( rand_float()*20000.0f ) - 10000.0f;
139145
y[ i ] = 0.0f;
@@ -150,6 +156,8 @@ static double benchmark2( int iterations, int len ) {
150156
if ( y[ 0 ] != y[ 0 ] ) {
151157
printf( "should not return NaN\n" );
152158
}
159+
free( x );
160+
free( y );
153161
return elapsed;
154162
}
155163

0 commit comments

Comments
 (0)