Bug 676 - FORTRAN MAXLOC SVP64 example
Summary: FORTRAN MAXLOC SVP64 example
Status: CONFIRMED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Documentation (show other bugs)
Version: unspecified
Hardware: Other Linux
: --- enhancement
Assignee: Luke Kenneth Casson Leighton
URL:
Depends on:
Blocks:
 
Reported: 2021-08-27 14:36 BST by Luke Kenneth Casson Leighton
Modified: 2021-09-23 02:46 BST (History)
1 user (show)

See Also:
NLnet milestone: NLNet.2019.10.Standards
total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0
parent task for budget allocation: 242
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kenneth Casson Leighton 2021-08-27 14:36:53 BST
https://groups.google.com/g/comp.arch/c/5h6jzyESg5s

create example SVP64 assembly for:

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; 
}
Comment 1 Luke Kenneth Casson Leighton 2021-08-27 14:58:05 BST
* a data-dependent fail-first sv.cmp tests against
  a[i] <= m.

* SVP64 Branch new CTR Mode would loop back over all elements that
failed, decrementing CTR in the process.

* a data-dependent ffirst sv.cmp a[i] > m creates a predicate
  mask where VL is truncated to exclude the first failed
  element.
Comment 2 Luke Kenneth Casson Leighton 2021-08-27 22:42:10 BST
int m2(int * const restrict a, int n) 
{ 
    int m, nm; 
    int i; 

    m = INT_MIN; 
    nm = -1; 
    i=0; 
    while (i<n) { 
        while (i<n && a[i]<=m) 
            i++; 
        if (a[i] > m) { 
            m = a[i]; 
            nm = i; 
        } 
        i++; 
    } 
    return nm; 
}

bug 
https://groups.google.com/g/comp.arch/c/5h6jzyESg5s/m/FiMO3falAgAJ

while (i<n) { 
    while (i<n && a[i]<=m) 
       i++; 
    if (i < n) { 
       m = a[i]; 
      nm = i; 
    } 
    i++;
}
Comment 3 Jacob Lifshay 2021-09-23 02:46:01 BST
changing milestone to match parent task for budget allocation