source: CIVL/examples/backend/mallocInputArray.cvl@ e2877ba

1.23 2.0 main test-branch
Last change on this file since e2877ba was 7329898, checked in by Manchun Zheng <zmanchun@…>, 11 years ago

minor correction of abs call analyer; printed expression values of statements for transition printing.

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

  • Property mode set to 100644
File size: 536 bytes
RevLine 
[7329898]1#include <civlc.cvh>
2#include <concurrency.cvh>
3
4
5$input int N;
6int** A;
7$assume(3<N && N<5);
8
9int main(){
10 $gbarrier gb = $gbarrier_create($here, N);
11 $barrier bs[N];
12 $scope sc=$here;
13
14 A=(int**)$malloc($root, sizeof(int*)*N);
15 for(int i =0; i<N; i++)
16 A[i]=(int*)$malloc(sc, sizeof(int)*N);
17 for(int i=N-1; i>=0; i--)
18 $free(A[i]);
19 $free(A);
20 for(int i=0; i<N;i++)
21 bs[i] = $barrier_create(sc, gb, i);
22 $gbarrier_destroy(gb);
23 for(int i=N-1; i>=0; i--)
24 $barrier_destroy(bs[i]);
25}
Note: See TracBrowser for help on using the repository browser.