Index: crosstest/simple_loop.c |
diff --git a/crosstest/simple_loop.c b/crosstest/simple_loop.c |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6568380de318f72fba9cd721dee631ffe079e50c |
--- /dev/null |
+++ b/crosstest/simple_loop.c |
@@ -0,0 +1,10 @@ |
+// 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; |
+} |