projects
/
openpower-isa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a70020b
)
add debug print
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Wed, 8 Nov 2023 20:25:09 +0000
(20:25 +0000)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Fri, 22 Dec 2023 19:26:21 +0000
(19:26 +0000)
maxloc/maxloc.c
patch
|
blob
|
history
diff --git
a/maxloc/maxloc.c
b/maxloc/maxloc.c
index d87f9bcdbabf5a05c461bd41f70da8824db1394a..e37160c65b8947811d56eee4b5cea7215263299e 100644
(file)
--- a/
maxloc/maxloc.c
+++ b/
maxloc/maxloc.c
@@
-9,7
+9,10
@@
int m2(int *a, int n)
nm = -1;
i=0;
while (i<n) {
- while (i<n && a[i]<=m) i++;
+ while (i<n && a[i]<=m) {
+ printf("%d idx %d <= m %d\n", i, a[i], m);
+ i++;
+ }
if (a[i] > m) {
m = a[i];
nm = i;