Home | History | Annotate | Download | only in crosstest
      1 // This is a simple loop that sums elements of an input array and
      2 // returns the result.  It's here mainly because it's one of the
      3 // simple examples guiding the early Subzero design.
      4 
      5 int simple_loop(int *a, int n) {
      6   int sum = 0;
      7   for (int i = 0; i < n; ++i)
      8     sum += a[i];
      9   return sum;
     10 }
     11