Skip to content

Commit 8aea8a0

Browse files
GeoDaoyukgryte
andauthored
chore: fix C lint errors
PR-URL: #7974 Closes: #7973 Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Athan Reines <[email protected]>
1 parent 0e4ba2c commit 8aea8a0

File tree

1 file changed

+80
-80
lines changed
  • lib/node_modules/@stdlib/ndarray/base/ind2sub/benchmark/c

1 file changed

+80
-80
lines changed

lib/node_modules/@stdlib/ndarray/base/ind2sub/benchmark/c/benchmark.c

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ static double benchmark1( void ) {
9999
double t;
100100
int i;
101101

102-
int64_t ndims = 3;
103-
int64_t shape[] = { 10, 10, 10 };
104-
int64_t strides[] = { 100, -10, 1 };
105-
int64_t offset = 90;
106-
int64_t len = 1000;
102+
const int64_t ndims = 3;
103+
const int64_t shape[] = { 10, 10, 10 };
104+
const int64_t strides[] = { 100, -10, 1 };
105+
const int64_t offset = 90;
106+
const int64_t len = 1000;
107107

108108
int64_t out[ 3 ];
109109

@@ -135,11 +135,11 @@ static double benchmark2( void ) {
135135
double t;
136136
int i;
137137

138-
int64_t ndims = 3;
139-
int64_t shape[] = { 10, 10, 10 };
140-
int64_t strides[] = { 1, -10, 100 };
141-
int64_t offset = 90;
142-
int64_t len = 1000;
138+
const int64_t ndims = 3;
139+
const int64_t shape[] = { 10, 10, 10 };
140+
const int64_t strides[] = { 1, -10, 100 };
141+
const int64_t offset = 90;
142+
const int64_t len = 1000;
143143

144144
int64_t out[ 3 ];
145145

@@ -171,11 +171,11 @@ static double benchmark3( void ) {
171171
double t;
172172
int i;
173173

174-
int64_t ndims = 3;
175-
int64_t shape[] = { 10, 10, 10 };
176-
int64_t strides[] = { 100, 10, 1 };
177-
int64_t offset = 0;
178-
int64_t len = 1000;
174+
const int64_t ndims = 3;
175+
const int64_t shape[] = { 10, 10, 10 };
176+
const int64_t strides[] = { 100, 10, 1 };
177+
const int64_t offset = 0;
178+
const int64_t len = 1000;
179179

180180
int64_t out[ 3 ];
181181

@@ -207,11 +207,11 @@ static double benchmark4( void ) {
207207
double t;
208208
int i;
209209

210-
int64_t ndims = 3;
211-
int64_t shape[] = { 10, 10, 10 };
212-
int64_t strides[] = { 1, 10, 100 };
213-
int64_t offset = 0;
214-
int64_t len = 1000;
210+
const int64_t ndims = 3;
211+
const int64_t shape[] = { 10, 10, 10 };
212+
const int64_t strides[] = { 1, 10, 100 };
213+
const int64_t offset = 0;
214+
const int64_t len = 1000;
215215

216216
int64_t out[ 3 ];
217217

@@ -243,11 +243,11 @@ static double benchmark5( void ) {
243243
double t;
244244
int i;
245245

246-
int64_t ndims = 3;
247-
int64_t shape[] = { 10, 10, 10 };
248-
int64_t strides[] = { 100, -10, 1 };
249-
int64_t offset = 90;
250-
int64_t len = 1000;
246+
const int64_t ndims = 3;
247+
const int64_t shape[] = { 10, 10, 10 };
248+
const int64_t strides[] = { 100, -10, 1 };
249+
const int64_t offset = 90;
250+
const int64_t len = 1000;
251251

252252
int64_t out[ 3 ];
253253

@@ -279,11 +279,11 @@ static double benchmark6( void ) {
279279
double t;
280280
int i;
281281

282-
int64_t ndims = 3;
283-
int64_t shape[] = { 10, 10, 10 };
284-
int64_t strides[] = { 1, -10, 100 };
285-
int64_t offset = 90;
286-
int64_t len = 1000;
282+
const int64_t ndims = 3;
283+
const int64_t shape[] = { 10, 10, 10 };
284+
const int64_t strides[] = { 1, -10, 100 };
285+
const int64_t offset = 90;
286+
const int64_t len = 1000;
287287

288288
int64_t out[ 3 ];
289289

@@ -315,11 +315,11 @@ static double benchmark7( void ) {
315315
double t;
316316
int i;
317317

318-
int64_t ndims = 3;
319-
int64_t shape[] = { 10, 10, 10 };
320-
int64_t strides[] = { 100, 10, 1 };
321-
int64_t offset = 0;
322-
int64_t len = 1000;
318+
const int64_t ndims = 3;
319+
const int64_t shape[] = { 10, 10, 10 };
320+
const int64_t strides[] = { 100, 10, 1 };
321+
const int64_t offset = 0;
322+
const int64_t len = 1000;
323323

324324
int64_t out[ 3 ];
325325

@@ -351,11 +351,11 @@ static double benchmark8( void ) {
351351
double t;
352352
int i;
353353

354-
int64_t ndims = 3;
355-
int64_t shape[] = { 10, 10, 10 };
356-
int64_t strides[] = { 1, 10, 100 };
357-
int64_t offset = 0;
358-
int64_t len = 1000;
354+
const int64_t ndims = 3;
355+
const int64_t shape[] = { 10, 10, 10 };
356+
const int64_t strides[] = { 1, 10, 100 };
357+
const int64_t offset = 0;
358+
const int64_t len = 1000;
359359

360360
int64_t out[ 3 ];
361361

@@ -387,11 +387,11 @@ static double benchmark9( void ) {
387387
double t;
388388
int i;
389389

390-
int64_t ndims = 3;
391-
int64_t shape[] = { 10, 10, 10 };
392-
int64_t strides[] = { 100, -10, 1 };
393-
int64_t offset = 90;
394-
int64_t len = 1000;
390+
const int64_t ndims = 3;
391+
const int64_t shape[] = { 10, 10, 10 };
392+
const int64_t strides[] = { 100, -10, 1 };
393+
const int64_t offset = 90;
394+
const int64_t len = 1000;
395395

396396
int64_t out[ 3 ];
397397

@@ -423,11 +423,11 @@ static double benchmark10( void ) {
423423
double t;
424424
int i;
425425

426-
int64_t ndims = 3;
427-
int64_t shape[] = { 10, 10, 10 };
428-
int64_t strides[] = { 1, -10, 100 };
429-
int64_t offset = 90;
430-
int64_t len = 1000;
426+
const int64_t ndims = 3;
427+
const int64_t shape[] = { 10, 10, 10 };
428+
const int64_t strides[] = { 1, -10, 100 };
429+
const int64_t offset = 90;
430+
const int64_t len = 1000;
431431

432432
int64_t out[ 3 ];
433433

@@ -459,11 +459,11 @@ static double benchmark11( void ) {
459459
double t;
460460
int i;
461461

462-
int64_t ndims = 3;
463-
int64_t shape[] = { 10, 10, 10 };
464-
int64_t strides[] = { 100, 10, 1 };
465-
int64_t offset = 0;
466-
int64_t len = 1000;
462+
const int64_t ndims = 3;
463+
const int64_t shape[] = { 10, 10, 10 };
464+
const int64_t strides[] = { 100, 10, 1 };
465+
const int64_t offset = 0;
466+
const int64_t len = 1000;
467467

468468
int64_t out[ 3 ];
469469

@@ -495,11 +495,11 @@ static double benchmark12( void ) {
495495
double t;
496496
int i;
497497

498-
int64_t ndims = 3;
499-
int64_t shape[] = { 10, 10, 10 };
500-
int64_t strides[] = { 1, 10, 100 };
501-
int64_t offset = 0;
502-
int64_t len = 1000;
498+
const int64_t ndims = 3;
499+
const int64_t shape[] = { 10, 10, 10 };
500+
const int64_t strides[] = { 1, 10, 100 };
501+
const int64_t offset = 0;
502+
const int64_t len = 1000;
503503

504504
int64_t out[ 3 ];
505505

@@ -531,11 +531,11 @@ static double benchmark13( void ) {
531531
double t;
532532
int i;
533533

534-
int64_t ndims = 3;
535-
int64_t shape[] = { 10, 10, 10 };
536-
int64_t strides[] = { 100, -10, 1 };
537-
int64_t offset = 90;
538-
int64_t len = 1000;
534+
const int64_t ndims = 3;
535+
const int64_t shape[] = { 10, 10, 10 };
536+
const int64_t strides[] = { 100, -10, 1 };
537+
const int64_t offset = 90;
538+
const int64_t len = 1000;
539539

540540
int64_t out[ 3 ];
541541

@@ -567,11 +567,11 @@ static double benchmark14( void ) {
567567
double t;
568568
int i;
569569

570-
int64_t ndims = 3;
571-
int64_t shape[] = { 10, 10, 10 };
572-
int64_t strides[] = { 1, -10, 100 };
573-
int64_t offset = 90;
574-
int64_t len = 1000;
570+
const int64_t ndims = 3;
571+
const int64_t shape[] = { 10, 10, 10 };
572+
const int64_t strides[] = { 1, -10, 100 };
573+
const int64_t offset = 90;
574+
const int64_t len = 1000;
575575

576576
int64_t out[ 3 ];
577577

@@ -603,11 +603,11 @@ static double benchmark15( void ) {
603603
double t;
604604
int i;
605605

606-
int64_t ndims = 3;
607-
int64_t shape[] = { 10, 10, 10 };
608-
int64_t strides[] = { 100, 10, 1 };
609-
int64_t offset = 0;
610-
int64_t len = 1000;
606+
const int64_t ndims = 3;
607+
const int64_t shape[] = { 10, 10, 10 };
608+
const int64_t strides[] = { 100, 10, 1 };
609+
const int64_t offset = 0;
610+
const int64_t len = 1000;
611611

612612
int64_t out[ 3 ];
613613

@@ -639,11 +639,11 @@ static double benchmark16( void ) {
639639
double t;
640640
int i;
641641

642-
int64_t ndims = 3;
643-
int64_t shape[] = { 10, 10, 10 };
644-
int64_t strides[] = { 1, 10, 100 };
645-
int64_t offset = 0;
646-
int64_t len = 1000;
642+
const int64_t ndims = 3;
643+
const int64_t shape[] = { 10, 10, 10 };
644+
const int64_t strides[] = { 1, 10, 100 };
645+
const int64_t offset = 0;
646+
const int64_t len = 1000;
647647

648648
int64_t out[ 3 ];
649649

0 commit comments

Comments
 (0)