source: CIVL/examples/languageFeatures/add_seq.cvl@ 90dd7d7

1.23 2.0 main test-branch
Last change on this file since 90dd7d7 was dde38bf, checked in by Stephen Siegel <siegel@…>, 13 years ago

Adding simple sequential array adder example which is failing.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@202 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 214 bytes
RevLine 
[dde38bf]1/* Compare sequential and parallel sum of array */
2#include<civlc.h>
3$input int N;
4$assume N>=0;
5$input double a[N];
6double sum_seq;
7
8void main() {
9 sum_seq = 0.0;
10 for (int i=0; i<N; i++)
11 sum_seq += a[i];
12}
Note: See TracBrowser for help on using the repository browser.