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

trunk/src/compiler/mid-il/mid-il.sml revision 1640, Wed Nov 16 02:19:51 2011 UTC branches/vis12/src/compiler/mid-il/mid-il.sml revision 1945, Fri Jul 6 14:54:21 2012 UTC
# Line 55  Line 55 
55        | MulVecMat of int * int        | MulVecMat of int * int
56        | MulMatVec of int * int        | MulMatVec of int * int
57        | MulMatMat of int * int * int        | MulMatMat of int * int * int
58          | MulVecTen3 of int * int * int
59          | 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 70  Line 73 
73        | Select of ty * int        | Select of ty * int
74        | Index of ty * int        | Index of ty * int
75        | Subscript of ty        | Subscript of ty
76          | MkDynamic of ty * int
77          | Append of ty
78          | Prepend of ty
79          | Concat of ty
80          | Length of ty
81        | Ceiling of int        | Ceiling of int
82        | Floor of int        | Floor of int
83        | Round of int        | Round of int
# Line 108  Line 116 
116        | resultArity (MulVecMat _) = 1        | resultArity (MulVecMat _) = 1
117        | resultArity (MulMatVec _) = 1        | resultArity (MulMatVec _) = 1
118        | resultArity (MulMatMat _) = 1        | resultArity (MulMatMat _) = 1
119          | resultArity (MulVecTen3 _) = 1
120          | 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 123  Line 134 
134        | resultArity (Select _) = 1        | resultArity (Select _) = 1
135        | resultArity (Index _) = 1        | resultArity (Index _) = 1
136        | resultArity (Subscript _) = 1        | resultArity (Subscript _) = 1
137          | resultArity (MkDynamic _) = 1
138          | resultArity (Append _) = 2
139          | resultArity (Prepend _) = 2
140          | resultArity (Concat _) = 2
141          | resultArity (Length _) = 1
142        | resultArity (Ceiling _) = 1        | resultArity (Ceiling _) = 1
143        | resultArity (Floor _) = 1        | resultArity (Floor _) = 1
144        | resultArity (Round _) = 1        | resultArity (Round _) = 1
# Line 161  Line 177 
177        | arity (MulVecMat _) = 2        | arity (MulVecMat _) = 2
178        | arity (MulMatVec _) = 2        | arity (MulMatVec _) = 2
179        | arity (MulMatMat _) = 2        | arity (MulMatMat _) = 2
180          | arity (MulVecTen3 _) = 2
181          | 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 176  Line 195 
195        | arity (Select _) = 1        | arity (Select _) = 1
196        | arity (Index _) = 1        | arity (Index _) = 1
197        | arity (Subscript _) = 2        | arity (Subscript _) = 2
198          | arity (MkDynamic _) = 1
199          | arity (Append _) = 1
200          | arity (Prepend _) = 1
201          | arity (Concat _) = 1
202          | arity (Length _) = 1
203        | arity (Ceiling _) = 1        | arity (Ceiling _) = 1
204        | arity (Floor _) = 1        | arity (Floor _) = 1
205        | arity (Round _) = 1        | arity (Round _) = 1
# Line 214  Line 238 
238        | same (MulVecMat(a0,a1), MulVecMat(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)        | same (MulVecMat(a0,a1), MulVecMat(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)
239        | 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)
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)
242          | 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 229  Line 256 
256        | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)        | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
257        | same (Index(a0,a1), Index(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)        | same (Index(a0,a1), Index(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
258        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)
259          | same (MkDynamic(a0,a1), MkDynamic(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
260          | same (Append(a0), Append(b0)) = samety(a0, b0)
261          | same (Prepend(a0), Prepend(b0)) = samety(a0, b0)
262          | same (Concat(a0), Concat(b0)) = samety(a0, b0)
263          | same (Length(a0), Length(b0)) = samety(a0, b0)
264        | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)        | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)
265        | same (Floor(a0), Floor(b0)) = sameint(a0, b0)        | same (Floor(a0), Floor(b0)) = sameint(a0, b0)
266        | same (Round(a0), Round(b0)) = sameint(a0, b0)        | same (Round(a0), Round(b0)) = sameint(a0, b0)
# Line 268  Line 300 
300        | hash (MulVecMat(a0,a1)) = 0w71 + hashint a0 + hashint a1        | hash (MulVecMat(a0,a1)) = 0w71 + hashint a0 + hashint a1
301        | hash (MulMatVec(a0,a1)) = 0w73 + hashint a0 + hashint a1        | hash (MulMatVec(a0,a1)) = 0w73 + hashint a0 + hashint a1
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 Cross = 0w83        | hash (MulVecTen3(a0,a1,a2)) = 0w83 + hashint a0 + hashint a1 + hashint a2
304        | hash (Norm(a0)) = 0w89 + hashty a0        | hash (MulTen3Vec(a0,a1,a2)) = 0w89 + hashint a0 + hashint a1 + hashint a2
305        | hash (Normalize(a0)) = 0w97 + hashint a0        | hash (ColonMul(a0,a1)) = 0w97 + hashty a0 + hashty a1
306        | hash (Scale(a0)) = 0w101 + hashty a0        | hash Cross = 0w101
307        | hash (PrincipleEvec(a0)) = 0w103 + hashty a0        | hash (Norm(a0)) = 0w103 + hashty a0
308        | hash EigenVecs2x2 = 0w107        | hash (Normalize(a0)) = 0w107 + hashint a0
309        | hash EigenVecs3x3 = 0w109        | hash (Scale(a0)) = 0w109 + hashty a0
310        | hash EigenVals2x2 = 0w113        | hash (PrincipleEvec(a0)) = 0w113 + hashty a0
311        | hash EigenVals3x3 = 0w127        | hash EigenVecs2x2 = 0w127
312        | hash (Identity(a0)) = 0w131 + hashint a0        | hash EigenVecs3x3 = 0w131
313        | hash (Zero(a0)) = 0w137 + hashty a0        | hash EigenVals2x2 = 0w137
314        | hash (Trace(a0)) = 0w139 + hashint a0        | hash EigenVals3x3 = 0w139
315        | hash (Select(a0,a1)) = 0w149 + hashty a0 + hashint a1        | hash (Identity(a0)) = 0w149 + hashint a0
316        | hash (Index(a0,a1)) = 0w151 + hashty a0 + hashint a1        | hash (Zero(a0)) = 0w151 + hashty a0
317        | hash (Subscript(a0)) = 0w157 + hashty a0        | hash (Trace(a0)) = 0w157 + hashint a0
318        | hash (Ceiling(a0)) = 0w163 + hashint a0        | hash (Select(a0,a1)) = 0w163 + hashty a0 + hashint a1
319        | hash (Floor(a0)) = 0w167 + hashint a0        | hash (Index(a0,a1)) = 0w167 + hashty a0 + hashint a1
320        | hash (Round(a0)) = 0w173 + hashint a0        | hash (Subscript(a0)) = 0w173 + hashty a0
321        | hash (Trunc(a0)) = 0w179 + hashint a0        | hash (MkDynamic(a0,a1)) = 0w179 + hashty a0 + hashint a1
322        | hash IntToReal = 0w181        | hash (Append(a0)) = 0w181 + hashty a0
323        | hash (RealToInt(a0)) = 0w191 + hashint a0        | hash (Prepend(a0)) = 0w191 + hashty a0
324        | hash (VoxelAddress(a0,a1)) = 0w193 + ImageInfo.hash a0 + hashint a1        | hash (Concat(a0)) = 0w193 + hashty a0
325        | hash (LoadVoxels(a0,a1)) = 0w197 + ImageInfo.hash a0 + hashint a1        | hash (Length(a0)) = 0w197 + hashty a0
326        | hash (PosToImgSpace(a0)) = 0w199 + ImageInfo.hash a0        | hash (Ceiling(a0)) = 0w199 + hashint a0
327        | hash (TensorToWorldSpace(a0,a1)) = 0w211 + ImageInfo.hash a0 + hashty a1        | hash (Floor(a0)) = 0w211 + hashint a0
328        | hash (EvalKernel(a0,a1,a2)) = 0w223 + hashint a0 + Kernel.hash a1 + hashint a2        | hash (Round(a0)) = 0w223 + hashint a0
329        | hash (LoadImage(a0)) = 0w227 + ImageInfo.hash a0        | hash (Trunc(a0)) = 0w227 + hashint a0
330        | hash (Inside(a0,a1)) = 0w229 + ImageInfo.hash a0 + hashint a1        | hash IntToReal = 0w229
331        | hash (Input(a0,a1,a2)) = 0w233 + hashty a0 + hashstring a1 + hashstring a2        | hash (RealToInt(a0)) = 0w233 + hashint a0
332        | hash (InputWithDefault(a0,a1,a2)) = 0w239 + hashty a0 + hashstring a1 + hashstring a2        | hash (VoxelAddress(a0,a1)) = 0w239 + ImageInfo.hash a0 + hashint a1
333        | hash (Print(a0)) = 0w241 + hashtys a0        | hash (LoadVoxels(a0,a1)) = 0w241 + ImageInfo.hash a0 + hashint a1
334          | hash (PosToImgSpace(a0)) = 0w251 + ImageInfo.hash a0
335          | hash (TensorToWorldSpace(a0,a1)) = 0w257 + ImageInfo.hash a0 + hashty a1
336          | hash (EvalKernel(a0,a1,a2)) = 0w263 + hashint a0 + Kernel.hash a1 + hashint a2
337          | hash (LoadImage(a0)) = 0w269 + ImageInfo.hash a0
338          | hash (Inside(a0,a1)) = 0w271 + ImageInfo.hash a0 + hashint a1
339          | hash (Input(a0,a1,a2)) = 0w277 + hashty a0 + hashstring a1 + hashstring a2
340          | 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 321  Line 361 
361        | toString (MulVecMat(a0,a1)) = concat["MulVecMat<", intToString a0, ",", intToString a1, ">"]        | toString (MulVecMat(a0,a1)) = concat["MulVecMat<", intToString a0, ",", intToString a1, ">"]
362        | toString (MulMatVec(a0,a1)) = concat["MulMatVec<", intToString a0, ",", intToString a1, ">"]        | toString (MulMatVec(a0,a1)) = concat["MulMatVec<", intToString a0, ",", intToString a1, ">"]
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, ">"]
365          | 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, ">"]
# Line 336  Line 379 
379        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]
380        | toString (Index(a0,a1)) = concat["Index<", tyToString a0, ",", intToString a1, ">"]        | toString (Index(a0,a1)) = concat["Index<", tyToString a0, ",", intToString a1, ">"]
381        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]
382          | toString (MkDynamic(a0,a1)) = concat["MkDynamic<", tyToString a0, ",", intToString a1, ">"]
383          | toString (Append(a0)) = concat["Append<", tyToString a0, ">"]
384          | toString (Prepend(a0)) = concat["Prepend<", tyToString a0, ">"]
385          | toString (Concat(a0)) = concat["Concat<", tyToString a0, ">"]
386          | toString (Length(a0)) = concat["Length<", tyToString a0, ">"]
387        | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]        | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]
388        | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]        | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]
389        | toString (Round(a0)) = concat["Round<", intToString a0, ">"]        | toString (Round(a0)) = concat["Round<", intToString a0, ">"]

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

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