First commit : 0.14.0 version (with roadmap in doc instead of
[cloog.git] / test / published / Web / web3.cloog
blobe719a5c4d782ecab460c5f0c7e0cb1e8f8586346
1 # CLooG example file #3.
2 # Please read the first example which is fully documented to understand the
3 # different parts of this input file.
5 ################################################################################
6 # The problem here is to generate the scanning code for the integral points    #
7 # inside two different 2-dimensional polyhedra (geometrically two rectangles). #
8 #                                      |                                       #
9 #                j^                    |                                       #
10 #                 | (P1)i>=2           |        for (i=2;i<=p-1;i++)           #
11 #  Context:       | | (P2)i>=m         |        | for (j=2;j<=n;j++)           #
12 #  m>n>p>2        | | | (P1)i<=n       |        | | S1 ;                       #
13 #                 | | | | (P2)i<=p     |                                       #
14 #  P1 System:     | | | | |            |        for (i=p;i<=n;i++)             #
15 #  2<=i<=n      m-+-+-@@@@@--(P2)j<=p  |        | for (j=2;j<=p-1;j++)         #
16 #  2<=j<=n        | | @@@@@           ==>       | | S1 ;                       #
17 #               n-+-**###@@--(P1)j<=n  |        | for (j=p;j<=n;j++)           #
18 #  P2 System:     | **###@@            |        | | S1 ;                       #
19 #  p<=i<=m      p-+-**###@@--(P2)j>=m  |        | | S2 ;                       #
20 #  p<=j<=m        | ***** |            |        | for (j=n+1;j<=m;j++)         #
21 #               2-+-*****-+--(P1)j>=2  |        | | S2 ;                       #
22 #  *:P1 alone     | | | | |            |                                       #
23 #  @:P2 alone   0-+-+-+-+-+-->i        |        for (i=n+1;i<=m;i++)           #
24 #  #:P1 and P2    | | | | |            |        | for (j=p;j<=m;j++)           #
25 #                 0 2 p n m            |        | | S2 ;                       #
26 #                                      |                                       #
27 ################################################################################
29 # 1. Language: C
32 # 2. Parameters {m,n,p | m>n>p>2}
33 3 5           # 3 rows and 5 columns
34 #  m  n  p  1
35 1  0  0  1 -3 # p>=3   (i.e. p>2)
36 1  0  1 -1 -1 # n>=p+1 (i.e. n>p)
37 1  1 -1  0 -1 # m>=n+1 (i.e. m>n)
39 # 3. We set manually the parameter name: m, n and p
41 m n p
43 # 4. Number of polyhedra:
46 # 5. The polyhedron description:
47 #    - the first one
49 # {i, j | 2<=i<=n 2<=j<=n}
50 4 7                       # 4 rows, 7 columns
51 #   i   j   m   n   p   1
52 1   1   0   0   0   0  -2 # i>=2
53 1  -1   0   0   1   0   0 # i<=n
54 1   0   1   0   0   0  -2 # j>=2
55 1   0  -1   0   1   0   0 # j<=n
56 0   0   0                 # 3 zeroes !
58 #    - the second one
60 # {j, j | p<=i<=m p<=j<=m}
61 4 7                       # 4 rows, 7 columns
62 #   i   j   m   n   p   1
63 1   1   0   0   0  -1   0 # i>=p
64 1  -1   0   1   0   0   0 # i<=m
65 1   0   1   0   0  -1   0 # j>=p
66 1   0  -1   1   0   0   0 # j<=m
67 0   0   0                 # 3 zeroes !
69 # 6. We let CLooG choose the iterator names
72 # 7. Let CLoog scan the polyhedra in the way it wants.