Fortran MAXLOC SVP64 demo
MAXLOC is a notoriously difficult function for SIMD to cope with. SVP64 however has similar capabilities to Z80 CPIR and LDIR
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;
}