Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/mid-il/mid-il.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/mid-il/mid-il.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1524, Mon Oct 10 18:29:43 2011 UTC revision 1525, Thu Oct 13 15:57:40 2011 UTC
# Line 50  Line 50 
50        | MulMatVec of int * int        | MulMatVec of int * int
51        | MulMatMat of int * int * int        | MulMatMat of int * int * int
52        | Cross        | Cross
       | Select of ty * int  
53        | Norm of ty        | Norm of ty
54        | Normalize of int        | Normalize of int
55        | Scale of ty        | Scale of ty
# Line 60  Line 59 
59        | Identity of int        | Identity of int
60        | Zero of ty        | Zero of ty
61        | Trace of int        | Trace of int
62          | Select of ty * int
63          | Index of ty * int
64        | Subscript of ty        | Subscript of ty
65        | Ceiling of int        | Ceiling of int
66        | Floor of int        | Floor of int
# Line 99  Line 100 
100        | arity (MulMatVec _) = 2        | arity (MulMatVec _) = 2
101        | arity (MulMatMat _) = 2        | arity (MulMatMat _) = 2
102        | arity Cross = 2        | arity Cross = 2
       | arity (Select _) = 1  
103        | arity (Norm _) = 1        | arity (Norm _) = 1
104        | arity (Normalize _) = 1        | arity (Normalize _) = 1
105        | arity (Scale _) = 2        | arity (Scale _) = 2
# Line 109  Line 109 
109        | arity (Identity _) = 0        | arity (Identity _) = 0
110        | arity (Zero _) = 0        | arity (Zero _) = 0
111        | arity (Trace _) = 1        | arity (Trace _) = 1
112          | arity (Select _) = 1
113          | arity (Index _) = 1
114        | arity (Subscript _) = 2        | arity (Subscript _) = 2
115        | arity (Ceiling _) = 1        | arity (Ceiling _) = 1
116        | arity (Floor _) = 1        | arity (Floor _) = 1
# Line 148  Line 150 
150        | same (MulMatVec(a0,a1), MulMatVec(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)        | same (MulMatVec(a0,a1), MulMatVec(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)
151        | same (MulMatMat(a0,a1,a2), MulMatMat(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)        | same (MulMatMat(a0,a1,a2), MulMatMat(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)
152        | same (Cross, Cross) = true        | same (Cross, Cross) = true
       | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)  
153        | same (Norm(a0), Norm(b0)) = samety(a0, b0)        | same (Norm(a0), Norm(b0)) = samety(a0, b0)
154        | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)        | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)
155        | same (Scale(a0), Scale(b0)) = samety(a0, b0)        | same (Scale(a0), Scale(b0)) = samety(a0, b0)
# Line 158  Line 159 
159        | same (Identity(a0), Identity(b0)) = sameint(a0, b0)        | same (Identity(a0), Identity(b0)) = sameint(a0, b0)
160        | same (Zero(a0), Zero(b0)) = samety(a0, b0)        | same (Zero(a0), Zero(b0)) = samety(a0, b0)
161        | same (Trace(a0), Trace(b0)) = sameint(a0, b0)        | same (Trace(a0), Trace(b0)) = sameint(a0, b0)
162          | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
163          | same (Index(a0,a1), Index(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
164        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)
165        | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)        | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)
166        | same (Floor(a0), Floor(b0)) = sameint(a0, b0)        | same (Floor(a0), Floor(b0)) = sameint(a0, b0)
# Line 198  Line 201 
201        | hash (MulMatVec(a0,a1)) = 0w73 + hashint a0 + hashint a1        | hash (MulMatVec(a0,a1)) = 0w73 + hashint a0 + hashint a1
202        | hash (MulMatMat(a0,a1,a2)) = 0w79 + hashint a0 + hashint a1 + hashint a2        | hash (MulMatMat(a0,a1,a2)) = 0w79 + hashint a0 + hashint a1 + hashint a2
203        | hash Cross = 0w83        | hash Cross = 0w83
204        | hash (Select(a0,a1)) = 0w89 + hashty a0 + hashint a1        | hash (Norm(a0)) = 0w89 + hashty a0
205        | hash (Norm(a0)) = 0w97 + hashty a0        | hash (Normalize(a0)) = 0w97 + hashint a0
206        | hash (Normalize(a0)) = 0w101 + hashint a0        | hash (Scale(a0)) = 0w101 + hashty a0
207        | hash (Scale(a0)) = 0w103 + hashty a0        | hash (PrincipleEvec(a0)) = 0w103 + hashty a0
208        | hash (PrincipleEvec(a0)) = 0w107 + hashty a0        | hash Eigen2x2 = 0w107
209        | hash Eigen2x2 = 0w109        | hash Eigen3x3 = 0w109
210        | hash Eigen3x3 = 0w113        | hash (Identity(a0)) = 0w113 + hashint a0
211        | hash (Identity(a0)) = 0w127 + hashint a0        | hash (Zero(a0)) = 0w127 + hashty a0
212        | hash (Zero(a0)) = 0w131 + hashty a0        | hash (Trace(a0)) = 0w131 + hashint a0
213        | hash (Trace(a0)) = 0w137 + hashint a0        | hash (Select(a0,a1)) = 0w137 + hashty a0 + hashint a1
214        | hash (Subscript(a0)) = 0w139 + hashty a0        | hash (Index(a0,a1)) = 0w139 + hashty a0 + hashint a1
215        | hash (Ceiling(a0)) = 0w149 + hashint a0        | hash (Subscript(a0)) = 0w149 + hashty a0
216        | hash (Floor(a0)) = 0w151 + hashint a0        | hash (Ceiling(a0)) = 0w151 + hashint a0
217        | hash (Round(a0)) = 0w157 + hashint a0        | hash (Floor(a0)) = 0w157 + hashint a0
218        | hash (Trunc(a0)) = 0w163 + hashint a0        | hash (Round(a0)) = 0w163 + hashint a0
219        | hash IntToReal = 0w167        | hash (Trunc(a0)) = 0w167 + hashint a0
220        | hash (RealToInt(a0)) = 0w173 + hashint a0        | hash IntToReal = 0w173
221        | hash (VoxelAddress(a0,a1)) = 0w179 + ImageInfo.hash a0 + hashint a1        | hash (RealToInt(a0)) = 0w179 + hashint a0
222        | hash (LoadVoxels(a0,a1)) = 0w181 + ImageInfo.hash a0 + hashint a1        | hash (VoxelAddress(a0,a1)) = 0w181 + ImageInfo.hash a0 + hashint a1
223        | hash (PosToImgSpace(a0)) = 0w191 + ImageInfo.hash a0        | hash (LoadVoxels(a0,a1)) = 0w191 + ImageInfo.hash a0 + hashint a1
224        | hash (TensorToWorldSpace(a0,a1)) = 0w193 + ImageInfo.hash a0 + hashty a1        | hash (PosToImgSpace(a0)) = 0w193 + ImageInfo.hash a0
225        | hash (EvalKernel(a0,a1,a2)) = 0w197 + hashint a0 + Kernel.hash a1 + hashint a2        | hash (TensorToWorldSpace(a0,a1)) = 0w197 + ImageInfo.hash a0 + hashty a1
226        | hash (LoadImage(a0)) = 0w199 + ImageInfo.hash a0        | hash (EvalKernel(a0,a1,a2)) = 0w199 + hashint a0 + Kernel.hash a1 + hashint a2
227        | hash (Inside(a0,a1)) = 0w211 + ImageInfo.hash a0 + hashint a1        | hash (LoadImage(a0)) = 0w211 + ImageInfo.hash a0
228        | hash (Input(a0,a1,a2)) = 0w223 + hashty a0 + hashstring a1 + hashstring a2        | hash (Inside(a0,a1)) = 0w223 + ImageInfo.hash a0 + hashint a1
229        | hash (InputWithDefault(a0,a1,a2)) = 0w227 + hashty a0 + hashstring a1 + hashstring a2        | hash (Input(a0,a1,a2)) = 0w227 + hashty a0 + hashstring a1 + hashstring a2
230          | hash (InputWithDefault(a0,a1,a2)) = 0w229 + hashty a0 + hashstring a1 + hashstring a2
231    
232      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
233        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 247  Line 251 
251        | toString (MulMatVec(a0,a1)) = concat["MulMatVec<", intToString a0, ",", intToString a1, ">"]        | toString (MulMatVec(a0,a1)) = concat["MulMatVec<", intToString a0, ",", intToString a1, ">"]
252        | toString (MulMatMat(a0,a1,a2)) = concat["MulMatMat<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]        | toString (MulMatMat(a0,a1,a2)) = concat["MulMatMat<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]
253        | toString Cross = "Cross"        | toString Cross = "Cross"
       | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]  
254        | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]        | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]
255        | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]        | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]
256        | toString (Scale(a0)) = concat["Scale<", tyToString a0, ">"]        | toString (Scale(a0)) = concat["Scale<", tyToString a0, ">"]
# Line 257  Line 260 
260        | toString (Identity(a0)) = concat["Identity<", intToString a0, ">"]        | toString (Identity(a0)) = concat["Identity<", intToString a0, ">"]
261        | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]        | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]
262        | toString (Trace(a0)) = concat["Trace<", intToString a0, ">"]        | toString (Trace(a0)) = concat["Trace<", intToString a0, ">"]
263          | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]
264          | toString (Index(a0,a1)) = concat["Index<", tyToString a0, ",", intToString a1, ">"]
265        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]
266        | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]        | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]
267        | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]        | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]

Legend:
Removed from v.1524  
changed lines
  Added in v.1525

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0