From 9b2185ab5f1696a0447682fd8f0cf4b21581fa07 Mon Sep 17 00:00:00 2001 From: lkcl Date: Wed, 26 Apr 2023 16:17:30 +0100 Subject: [PATCH] --- .../sv/cookbook/fortran__95__maxloc.mdwn | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 openpower/sv/cookbook/fortran__95__maxloc.mdwn diff --git a/openpower/sv/cookbook/fortran__95__maxloc.mdwn b/openpower/sv/cookbook/fortran__95__maxloc.mdwn new file mode 100644 index 000000000..2cee8b617 --- /dev/null +++ b/openpower/sv/cookbook/fortran__95__maxloc.mdwn @@ -0,0 +1,21 @@ + + +``` +int m2(int * const restrict a, int n) +{ + int m, nm; + int i; + + m = INT_MIN; + nm = -1; + for (i=0; i m) + { + m = a[i]; + nm = i; + } + } + return nm; +} +``` -- 2.30.2