Skip to content

Commit c9bf3d9

Browse files
committed
Auto-generated commit
1 parent 8bfbb5a commit c9bf3d9

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-03)
8+
9+
<section class="commits">
10+
11+
### Commits
12+
13+
<details>
14+
15+
- [`d558dd6`](https://github.com/stdlib-js/stdlib/commit/d558dd6beca84f984f4d929da7d64df843304cd4) - **bench:** refactor to use dynamic memory allocation in `blas/ext/base/dlast-index-of` [(#10640)](https://github.com/stdlib-js/stdlib/pull/10640) _(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.1.1">
640

741
## 0.1.1 (2026-02-07)

benchmark/c/benchmark.length.c

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

104+
x = (double *) malloc( len * sizeof( double ) );
104105
for ( i = 0; i < len; i++ ) {
105106
x[ i ] = ( rand_double()*20000.0 ) - 10000.0;
106107
}
@@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) {
118119
if ( idx < -2 ) {
119120
printf( "unexpected result\n" );
120121
}
122+
free( x );
121123
return elapsed;
122124
}
123125

@@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) {
130132
*/
131133
static double benchmark2( int iterations, int len ) {
132134
double elapsed;
133-
double x[ len ];
135+
double *x;
134136
double t;
135137
int idx;
136138
int i;
137139

140+
x = (double *) malloc( len * sizeof( double ) );
138141
for ( i = 0; i < len; i++ ) {
139142
x[ i ] = ( rand_double()*20000.0 ) - 10000.0;
140143
}
@@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) {
152155
if ( idx < -2 ) {
153156
printf( "unexpected result\n" );
154157
}
158+
free( x );
155159
return elapsed;
156160
}
157161

0 commit comments

Comments
 (0)