source: CIVL/examples/languageFeatures/civlParforNotConcrete.cvl@ afc300c

1.23 2.0 main test-branch
Last change on this file since afc300c was 6d95f28, checked in by Si Li <sili@…>, 11 years ago

Add example civlParforNotConcrete.cvl to test the condition that the argument for $parfor is not concrete.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@2546 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.