~ubuntu-branches/ubuntu/wily/cloog/wily-proposed

« back to all changes in this revision

Viewing changes to osl/tests/test_matmult.scop

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2015-04-24 15:07:57 UTC
  • mfrom: (3.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20150424150757-wumy8mdonvtgf29j
Tags: 0.18.3-1
* New upstream version.
* Update symbols file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Matmul example, relation representation
 
2
 
 
3
<OpenScop>
 
4
 
 
5
# =============================================== Global
 
6
# Backend Language
 
7
C
 
8
 
 
9
# Context
 
10
CONTEXT
 
11
1 3 0 0 0 1
 
12
   1    1   -1    ## N-1 >= 0
 
13
 
 
14
# Parameter names are provided
 
15
1
 
16
# Parameter names
 
17
<strings>
 
18
 
19
</strings>
 
20
 
 
21
# Number of statements
 
22
2
 
23
 
 
24
# =============================================== Statement 1
 
25
# Number of relations describing the statement
 
26
3
 
27
 
 
28
# ----------------------------------------------  1.1 Domain
 
29
DOMAIN
 
30
4 5 2 0 0 1
 
31
# e/i   i    j    N    1
 
32
   1    1    0    0    0    ## i >= 0
 
33
   1   -1    0    1   -1    ## -i+N-1 >= 0
 
34
   1    0    1    0    0    ## j >= 0
 
35
   1    0   -1    1   -1    ## -j+N-1 >= 0
 
36
 
 
37
# ----------------------------------------------  1.2 Scattering
 
38
SCATTERING
 
39
5 10 5 2 0 1
 
40
# e/i  s1   s2   s3   s4   s5    i    j    N    1 
 
41
   0   -1    0    0    0    0    0    0    0    0    ## s1 = 0
 
42
   0    0   -1    0    0    0    1    0    0    0    ## s2 = i
 
43
   0    0    0   -1    0    0    0    0    0    0    ## s3 = 0
 
44
   0    0    0    0   -1    0    0    1    0    0    ## s4 = j
 
45
   0    0    0    0    0   -1    0    0    0    0    ## s5 = 0
 
46
 
 
47
# ----------------------------------------------  1.3 Access
 
48
WRITE
 
49
3 8 3 2 0 1
 
50
# e/i  Arr  [1]  [2]   i    j    N    1
 
51
   0   -1    0    0    0    0    0    1    ## C
 
52
   0    0   -1    0    1    0    0    0    ##  [i]
 
53
   0    0    0   -1    0    1    0    0    ##     [j]
 
54
 
 
55
# ----------------------------------------------  1.4 Body
 
56
# Statement body is provided
 
57
1
 
58
<body>
 
59
# Number of original iterators
 
60
2
 
61
# Original iterator names
 
62
i j 
 
63
# Statement body
 
64
C[i][j] = 0.0;
 
65
</body>
 
66
 
 
67
# =============================================== Statement 2
 
68
# Number of relations describing the statement
 
69
6
 
70
 
 
71
# ----------------------------------------------  2.1 Domain
 
72
DOMAIN
 
73
6 6 3 0 0 1
 
74
# e/i   i    j    k    N    1
 
75
   1    1    0    0    0    0    ## i >= 0
 
76
   1   -1    0    0    1   -1    ## -i+N-1 >= 0
 
77
   1    0    1    0    0    0    ## j >= 0
 
78
   1    0   -1    0    1   -1    ## -j+N-1 >= 0
 
79
   1    0    0    1    0    0    ## k >= 0
 
80
   1    0    0   -1    1   -1    ## -k+N-1 >= 0
 
81
 
 
82
# ----------------------------------------------  2.2 Scattering
 
83
SCATTERING
 
84
7 13 7 3 0 1
 
85
# e/i  s1   s2   s3   s4   s5   s6   s7    i    j    k    N    1
 
86
   0   -1    0    0    0    0    0    0    0    0    0    0    0   ## s1 = 0
 
87
   0    0   -1    0    0    0    0    0    1    0    0    0    0   ## s2 = i
 
88
   0    0    0   -1    0    0    0    0    0    0    0    0    0   ## s3 = 0
 
89
   0    0    0    0   -1    0    0    0    0    1    0    0    0   ## s4 = j
 
90
   0    0    0    0    0   -1    0    0    0    0    0    0    1   ## s5 = 1
 
91
   0    0    0    0    0    0   -1    0    0    0    1    0    0   ## s6 = k
 
92
   0    0    0    0    0    0    0   -1    0    0    0    0    0   ## s7 = 0
 
93
 
 
94
# ----------------------------------------------  2.3 Access
 
95
WRITE
 
96
3 9 3 3 0 1
 
97
# e/i  Arr  [1]  [2]   i    j    k    N    1
 
98
   0   -1    0    0    0    0    0    0    1    ## C
 
99
   0    0   -1    0    1    0    0    0    0    ##  [i]
 
100
   0    0    0   -1    0    1    0    0    0    ##     [j]
 
101
 
 
102
READ
 
103
3 9 3 3 0 1
 
104
# e/i  Arr  [1]  [2]   i    j    k    N    1
 
105
   0   -1    0    0    0    0    0    0    1    ## C
 
106
   0    0   -1    0    1    0    0    0    0    ##  [i]
 
107
   0    0    0   -1    0    1    0    0    0    ##     [j]
 
108
 
 
109
READ
 
110
3 9 3 3 0 1
 
111
# e/i  Arr  [1]  [2]   i    j    k    N    1
 
112
   0   -1    0    0    0    0    0    0    2    ## A
 
113
   0    0   -1    0    1    0    0    0    0    ##  [i]
 
114
   0    0    0   -1    0    0    1    0    0    ##     [k]
 
115
 
 
116
READ
 
117
3 9 3 3 0 1
 
118
# e/i  Arr  [1]  [2]   i    j    k    N    1
 
119
   0   -1    0    0    0    0    0    0    3    ## B
 
120
   0    0   -1    0    0    0    1    0    0    ##  [k]
 
121
   0    0    0   -1    0    1    0    0    0    ##     [j]
 
122
 
 
123
# ----------------------------------------------  2.4 Body
 
124
# Statement body is provided
 
125
1
 
126
<body>
 
127
# Number of original iterators
 
128
3
 
129
# Original iterator names
 
130
i j k 
 
131
# Statement body
 
132
C[i][j] = C[i][j] + A[i][k] * B[k][j];
 
133
</body>
 
134
 
 
135
</OpenScop>
 
136