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

SCM Repository

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

Diff of /branches/vis12/src/compiler/mid-il/mid-il.sml

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

revision 1939, Mon Jul 2 21:11:07 2012 UTC revision 1945, Fri Jul 6 14:54:21 2012 UTC
# Line 57  Line 57 
57        | MulMatMat of int * int * int        | MulMatMat of int * int * int
58        | MulVecTen3 of int * int * int        | MulVecTen3 of int * int * int
59        | MulTen3Vec of int * int * int        | MulTen3Vec of int * int * int
60          | ColonMul of ty * ty
61        | Cross        | Cross
62        | Norm of ty        | Norm of ty
63        | Normalize of int        | Normalize of int
# Line 117  Line 118 
118        | resultArity (MulMatMat _) = 1        | resultArity (MulMatMat _) = 1
119        | resultArity (MulVecTen3 _) = 1        | resultArity (MulVecTen3 _) = 1
120        | resultArity (MulTen3Vec _) = 1        | resultArity (MulTen3Vec _) = 1
121          | resultArity (ColonMul _) = 1
122        | resultArity Cross = 1        | resultArity Cross = 1
123        | resultArity (Norm _) = 1        | resultArity (Norm _) = 1
124        | resultArity (Normalize _) = 1        | resultArity (Normalize _) = 1
# Line 177  Line 179 
179        | arity (MulMatMat _) = 2        | arity (MulMatMat _) = 2
180        | arity (MulVecTen3 _) = 2        | arity (MulVecTen3 _) = 2
181        | arity (MulTen3Vec _) = 2        | arity (MulTen3Vec _) = 2
182          | arity (ColonMul _) = 2
183        | arity Cross = 2        | arity Cross = 2
184        | arity (Norm _) = 1        | arity (Norm _) = 1
185        | arity (Normalize _) = 1        | arity (Normalize _) = 1
# Line 237  Line 240 
240        | 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)
241        | same (MulVecTen3(a0,a1,a2), MulVecTen3(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)        | same (MulVecTen3(a0,a1,a2), MulVecTen3(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)
242        | same (MulTen3Vec(a0,a1,a2), MulTen3Vec(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)        | same (MulTen3Vec(a0,a1,a2), MulTen3Vec(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)
243          | same (ColonMul(a0,a1), ColonMul(b0,b1)) = samety(a0, b0) andalso samety(a1, b1)
244        | same (Cross, Cross) = true        | same (Cross, Cross) = true
245        | same (Norm(a0), Norm(b0)) = samety(a0, b0)        | same (Norm(a0), Norm(b0)) = samety(a0, b0)
246        | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)        | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)
# Line 298  Line 302 
302        | hash (MulMatMat(a0,a1,a2)) = 0w79 + hashint a0 + hashint a1 + hashint a2        | hash (MulMatMat(a0,a1,a2)) = 0w79 + hashint a0 + hashint a1 + hashint a2
303        | hash (MulVecTen3(a0,a1,a2)) = 0w83 + hashint a0 + hashint a1 + hashint a2        | hash (MulVecTen3(a0,a1,a2)) = 0w83 + hashint a0 + hashint a1 + hashint a2
304        | hash (MulTen3Vec(a0,a1,a2)) = 0w89 + hashint a0 + hashint a1 + hashint a2        | hash (MulTen3Vec(a0,a1,a2)) = 0w89 + hashint a0 + hashint a1 + hashint a2
305        | hash Cross = 0w97        | hash (ColonMul(a0,a1)) = 0w97 + hashty a0 + hashty a1
306        | hash (Norm(a0)) = 0w101 + hashty a0        | hash Cross = 0w101
307        | hash (Normalize(a0)) = 0w103 + hashint a0        | hash (Norm(a0)) = 0w103 + hashty a0
308        | hash (Scale(a0)) = 0w107 + hashty a0        | hash (Normalize(a0)) = 0w107 + hashint a0
309        | hash (PrincipleEvec(a0)) = 0w109 + hashty a0        | hash (Scale(a0)) = 0w109 + hashty a0
310        | hash EigenVecs2x2 = 0w113        | hash (PrincipleEvec(a0)) = 0w113 + hashty a0
311        | hash EigenVecs3x3 = 0w127        | hash EigenVecs2x2 = 0w127
312        | hash EigenVals2x2 = 0w131        | hash EigenVecs3x3 = 0w131
313        | hash EigenVals3x3 = 0w137        | hash EigenVals2x2 = 0w137
314        | hash (Identity(a0)) = 0w139 + hashint a0        | hash EigenVals3x3 = 0w139
315        | hash (Zero(a0)) = 0w149 + hashty a0        | hash (Identity(a0)) = 0w149 + hashint a0
316        | hash (Trace(a0)) = 0w151 + hashint a0        | hash (Zero(a0)) = 0w151 + hashty a0
317        | hash (Select(a0,a1)) = 0w157 + hashty a0 + hashint a1        | hash (Trace(a0)) = 0w157 + hashint a0
318        | hash (Index(a0,a1)) = 0w163 + hashty a0 + hashint a1        | hash (Select(a0,a1)) = 0w163 + hashty a0 + hashint a1
319        | hash (Subscript(a0)) = 0w167 + hashty a0        | hash (Index(a0,a1)) = 0w167 + hashty a0 + hashint a1
320        | hash (MkDynamic(a0,a1)) = 0w173 + hashty a0 + hashint a1        | hash (Subscript(a0)) = 0w173 + hashty a0
321        | hash (Append(a0)) = 0w179 + hashty a0        | hash (MkDynamic(a0,a1)) = 0w179 + hashty a0 + hashint a1
322        | hash (Prepend(a0)) = 0w181 + hashty a0        | hash (Append(a0)) = 0w181 + hashty a0
323        | hash (Concat(a0)) = 0w191 + hashty a0        | hash (Prepend(a0)) = 0w191 + hashty a0
324        | hash (Length(a0)) = 0w193 + hashty a0        | hash (Concat(a0)) = 0w193 + hashty a0
325        | hash (Ceiling(a0)) = 0w197 + hashint a0        | hash (Length(a0)) = 0w197 + hashty a0
326        | hash (Floor(a0)) = 0w199 + hashint a0        | hash (Ceiling(a0)) = 0w199 + hashint a0
327        | hash (Round(a0)) = 0w211 + hashint a0        | hash (Floor(a0)) = 0w211 + hashint a0
328        | hash (Trunc(a0)) = 0w223 + hashint a0        | hash (Round(a0)) = 0w223 + hashint a0
329        | hash IntToReal = 0w227        | hash (Trunc(a0)) = 0w227 + hashint a0
330        | hash (RealToInt(a0)) = 0w229 + hashint a0        | hash IntToReal = 0w229
331        | hash (VoxelAddress(a0,a1)) = 0w233 + ImageInfo.hash a0 + hashint a1        | hash (RealToInt(a0)) = 0w233 + hashint a0
332        | hash (LoadVoxels(a0,a1)) = 0w239 + ImageInfo.hash a0 + hashint a1        | hash (VoxelAddress(a0,a1)) = 0w239 + ImageInfo.hash a0 + hashint a1
333        | hash (PosToImgSpace(a0)) = 0w241 + ImageInfo.hash a0        | hash (LoadVoxels(a0,a1)) = 0w241 + ImageInfo.hash a0 + hashint a1
334        | hash (TensorToWorldSpace(a0,a1)) = 0w251 + ImageInfo.hash a0 + hashty a1        | hash (PosToImgSpace(a0)) = 0w251 + ImageInfo.hash a0
335        | hash (EvalKernel(a0,a1,a2)) = 0w257 + hashint a0 + Kernel.hash a1 + hashint a2        | hash (TensorToWorldSpace(a0,a1)) = 0w257 + ImageInfo.hash a0 + hashty a1
336        | hash (LoadImage(a0)) = 0w263 + ImageInfo.hash a0        | hash (EvalKernel(a0,a1,a2)) = 0w263 + hashint a0 + Kernel.hash a1 + hashint a2
337        | hash (Inside(a0,a1)) = 0w269 + ImageInfo.hash a0 + hashint a1        | hash (LoadImage(a0)) = 0w269 + ImageInfo.hash a0
338        | hash (Input(a0,a1,a2)) = 0w271 + hashty a0 + hashstring a1 + hashstring a2        | hash (Inside(a0,a1)) = 0w271 + ImageInfo.hash a0 + hashint a1
339        | hash (InputWithDefault(a0,a1,a2)) = 0w277 + hashty a0 + hashstring a1 + hashstring a2        | hash (Input(a0,a1,a2)) = 0w277 + hashty a0 + hashstring a1 + hashstring a2
340        | hash (Print(a0)) = 0w281 + hashtys a0        | hash (InputWithDefault(a0,a1,a2)) = 0w281 + hashty a0 + hashstring a1 + hashstring a2
341          | hash (Print(a0)) = 0w283 + hashtys a0
342    
343      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
344        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 358  Line 363 
363        | 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, ">"]
364        | toString (MulVecTen3(a0,a1,a2)) = concat["MulVecTen3<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]        | toString (MulVecTen3(a0,a1,a2)) = concat["MulVecTen3<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]
365        | toString (MulTen3Vec(a0,a1,a2)) = concat["MulTen3Vec<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]        | toString (MulTen3Vec(a0,a1,a2)) = concat["MulTen3Vec<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]
366          | toString (ColonMul(a0,a1)) = concat["ColonMul<", tyToString a0, ",", tyToString a1, ">"]
367        | toString Cross = "Cross"        | toString Cross = "Cross"
368        | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]        | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]
369        | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]        | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]

Legend:
Removed from v.1939  
changed lines
  Added in v.1945

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