blob: 6568380de318f72fba9cd721dee631ffe079e50c [file] [log] [blame]
// This is a simple loop that sums elements of an input array and
// returns the result. It's here mainly because it's one of the
// simple examples guiding the early Subzero design.
int simple_loop(int *a, int n) {
int sum = 0;
for (int i = 0; i < n; ++i)
sum += a[i];
return sum;
}