source: CIVL/examples/languageFeatures/civlParforNotConcrete.cvl@ 7d77e64

main test-branch
Last change on this file since 7d77e64 was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

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

  • Property mode set to 100644
File size: 395 bytes
Line 
1/* This example is to test the condition that the argument of the domain for $parfor
2 * is not concrete.
3*/
4
5#include <civlc.cvh>
6#include <stdio.h>
7$input int n;
8$assume (n>1);
9
10void main(){
11 $range r1 = 1 .. n;
12 $domain(1) dom = ($domain){r1};
13 int sum = 0;
14
15 $parfor(int i: dom){
16 printf("This is proc %s, my i: %d\n", $self, i);
17 sum += 1;
18 printf("sum is %d", sum);
19 }
20}
Note: See TracBrowser for help on using the repository browser.