source: CIVL/examples/languageFeatures/civlParfor.cvl@ 63d4ef2

1.23 2.0 main test-branch
Last change on this file since 63d4ef2 was 3f8afc7, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

implemented CIVL $parfor; added the test LanguageFeaturesTest.civlParfor() to demonstrate the new feature.

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

  • Property mode set to 100644
File size: 241 bytes
Line 
1#include <civlc.h>
2
3void main(){
4 $range r1 = 1 .. 2;
5 $range r2 = 1 .. 2#1;
6 $range r3 = 1 .. 2#1;
7 $domain(3) dom = ($domain){r1, r2, r3};
8 int sum = 0;
9
10 $parfor(int i,j,k : dom){
11 sum += i * j * k;
12 }
13 $assert(sum == 27);
14}
Note: See TracBrowser for help on using the repository browser.