projects
/
libreriscv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6bc723
)
(no commit message)
author
lkcl
<lkcl@web>
Wed, 26 Apr 2023 15:17:30 +0000
(16:17 +0100)
committer
IkiWiki
<ikiwiki.info>
Wed, 26 Apr 2023 15:17:30 +0000
(16:17 +0100)
openpower/sv/cookbook/fortran__95__maxloc.mdwn
[new file with mode: 0644]
patch
|
blob
diff --git a/openpower/sv/cookbook/fortran__95__maxloc.mdwn
b/openpower/sv/cookbook/fortran__95__maxloc.mdwn
new file mode 100644
(file)
index 0000000..
2cee8b6
--- /dev/null
+++ b/
openpower/sv/cookbook/fortran__95__maxloc.mdwn
@@ -0,0
+1,21
@@
+<https://bugs.libre-soc.org/show_bug.cgi?id=676>
+
+```
+int m2(int * const restrict a, int n)
+{
+ int m, nm;
+ int i;
+
+ m = INT_MIN;
+ nm = -1;
+ for (i=0; i<n; i++)
+ {
+ if (a[i] > m)
+ {
+ m = a[i];
+ nm = i;
+ }
+ }
+ return nm;
+}
+```