Skip to content

Commit cfc58ee

Browse files
committed
Auto-generated commit
1 parent ebb49ec commit cfc58ee

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@
22

33
> Package changelog.
44
5+
<section class="release" id="unreleased">
6+
7+
## Unreleased (2026-03-07)
8+
9+
<section class="commits">
10+
11+
### Commits
12+
13+
<details>
14+
15+
- [`28e23cd`](https://github.com/stdlib-js/stdlib/commit/28e23cdec2c505bfdb97dca8287c1b0f9c9c16e4) - **bench:** refactor to use dynamic memory allocation in `blas/ext/base/sdsnansumpw` [(#10762)](https://github.com/stdlib-js/stdlib/pull/10762) _(by Prajjwal Bajpai)_
16+
17+
</details>
18+
19+
</section>
20+
21+
<!-- /.commits -->
22+
23+
<section class="contributors">
24+
25+
### Contributors
26+
27+
A total of 1 person contributed to this release. Thank you to this contributor:
28+
29+
- Prajjwal Bajpai
30+
31+
</section>
32+
33+
<!-- /.contributors -->
34+
35+
</section>
36+
37+
<!-- /.release -->
38+
539
<section class="release" id="v0.3.1">
640

741
## 0.3.1 (2026-02-08)

benchmark/c/benchmark.length.c

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

104+
x = (float *) malloc( len * sizeof( float ) );
104105
for ( i = 0; i < len; i++ ) {
105106
if ( rand_float() < 0.2f ) {
106107
x[ i ] = 0.0f / 0.0f; // NaN
@@ -122,6 +123,7 @@ static double benchmark1( int iterations, int len ) {
122123
if ( v != v ) {
123124
printf( "should not return NaN\n" );
124125
}
126+
free( x );
125127
return elapsed;
126128
}
127129

@@ -134,11 +136,12 @@ static double benchmark1( int iterations, int len ) {
134136
*/
135137
static double benchmark2( int iterations, int len ) {
136138
double elapsed;
137-
float x[ len ];
139+
float *x;
138140
float v;
139141
double t;
140142
int i;
141143

144+
x = (float *) malloc( len * sizeof( float ) );
142145
for ( i = 0; i < len; i++ ) {
143146
if ( rand_float() < 0.2f ) {
144147
x[ i ] = 0.0f / 0.0f; // NaN
@@ -160,6 +163,7 @@ static double benchmark2( int iterations, int len ) {
160163
if ( v != v ) {
161164
printf( "should not return NaN\n" );
162165
}
166+
free( x );
163167
return elapsed;
164168
}
165169

0 commit comments

Comments
 (0)