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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/low-il/low-il.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/low-il/low-il.sml

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

revision 2668, Thu Jun 12 03:29:04 2014 UTC revision 2690, Fri Aug 29 15:41:22 2014 UTC
# Line 48  Line 48 
48        | prodVec of int        | prodVec of int
49        | prodScaV of int        | prodScaV of int
50        | sumVec of int        | sumVec of int
51          | dotVec of int
52        | Abs of ty        | Abs of ty
53        | LT of ty        | LT of ty
54        | LTE of ty        | LTE of ty
# Line 90  Line 91 
91        | LoadImage of ImageInfo.info        | LoadImage of ImageInfo.info
92        | imgAddr of ImageInfo.info * ty * int        | imgAddr of ImageInfo.info * ty * int
93        | imgLoad of ImageInfo.info * int * int        | imgLoad of ImageInfo.info * int * int
94          | baseAddr of ImageInfo.info
95        | Input of ty * string * string        | Input of ty * string * string
96        | InputWithDefault of ty * string * string        | InputWithDefault of ty * string * string
97        | Print of tys        | Print of tys
# Line 109  Line 111 
111        | resultArity (prodVec _) = 1        | resultArity (prodVec _) = 1
112        | resultArity (prodScaV _) = 1        | resultArity (prodScaV _) = 1
113        | resultArity (sumVec _) = 1        | resultArity (sumVec _) = 1
114          | resultArity (dotVec _) = 1
115        | resultArity (Abs _) = 1        | resultArity (Abs _) = 1
116        | resultArity (LT _) = 1        | resultArity (LT _) = 1
117        | resultArity (LTE _) = 1        | resultArity (LTE _) = 1
# Line 151  Line 154 
154        | resultArity (LoadImage _) = 1        | resultArity (LoadImage _) = 1
155        | resultArity (imgAddr _) = 1        | resultArity (imgAddr _) = 1
156        | resultArity (imgLoad _) = 1        | resultArity (imgLoad _) = 1
157          | resultArity (baseAddr _) = 1
158        | resultArity (Input _) = 1        | resultArity (Input _) = 1
159        | resultArity (InputWithDefault _) = 1        | resultArity (InputWithDefault _) = 1
160        | resultArity (Print _) = 0        | resultArity (Print _) = 0
# Line 170  Line 174 
174        | arity (prodVec _) = 2        | arity (prodVec _) = 2
175        | arity (prodScaV _) = 2        | arity (prodScaV _) = 2
176        | arity (sumVec _) = 2        | arity (sumVec _) = 2
177          | arity (dotVec _) = 2
178        | arity (Abs _) = 1        | arity (Abs _) = 1
179        | arity (LT _) = 2        | arity (LT _) = 2
180        | arity (LTE _) = 2        | arity (LTE _) = 2
# Line 212  Line 217 
217        | arity (LoadImage _) = 0        | arity (LoadImage _) = 0
218        | arity (imgAddr _) = 2        | arity (imgAddr _) = 2
219        | arity (imgLoad _) = 2        | arity (imgLoad _) = 2
220          | arity (baseAddr _) = 2
221        | arity (Input _) = 0        | arity (Input _) = 0
222        | arity (InputWithDefault _) = 1        | arity (InputWithDefault _) = 1
223        | arity (Print _) = ~1        | arity (Print _) = ~1
# Line 238  Line 244 
244        | same (prodVec(a0), prodVec(b0)) = sameint(a0, b0)        | same (prodVec(a0), prodVec(b0)) = sameint(a0, b0)
245        | same (prodScaV(a0), prodScaV(b0)) = sameint(a0, b0)        | same (prodScaV(a0), prodScaV(b0)) = sameint(a0, b0)
246        | same (sumVec(a0), sumVec(b0)) = sameint(a0, b0)        | same (sumVec(a0), sumVec(b0)) = sameint(a0, b0)
247          | same (dotVec(a0), dotVec(b0)) = sameint(a0, b0)
248        | same (Abs(a0), Abs(b0)) = samety(a0, b0)        | same (Abs(a0), Abs(b0)) = samety(a0, b0)
249        | same (LT(a0), LT(b0)) = samety(a0, b0)        | same (LT(a0), LT(b0)) = samety(a0, b0)
250        | same (LTE(a0), LTE(b0)) = samety(a0, b0)        | same (LTE(a0), LTE(b0)) = samety(a0, b0)
# Line 280  Line 287 
287        | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)        | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)
288        | same (imgAddr(a0,a1,a2), imgAddr(b0,b1,b2)) = ImageInfo.same(a0, b0) andalso samety(a1, b1) andalso sameint(a2, b2)        | same (imgAddr(a0,a1,a2), imgAddr(b0,b1,b2)) = ImageInfo.same(a0, b0) andalso samety(a1, b1) andalso sameint(a2, b2)
289        | same (imgLoad(a0,a1,a2), imgLoad(b0,b1,b2)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)        | same (imgLoad(a0,a1,a2), imgLoad(b0,b1,b2)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)
290          | same (baseAddr(a0), baseAddr(b0)) = ImageInfo.same(a0, b0)
291        | same (Input(a0,a1,a2), Input(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)        | same (Input(a0,a1,a2), Input(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
292        | same (InputWithDefault(a0,a1,a2), InputWithDefault(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)        | same (InputWithDefault(a0,a1,a2), InputWithDefault(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
293        | same (Print(a0), Print(b0)) = sametys(a0, b0)        | same (Print(a0), Print(b0)) = sametys(a0, b0)
# Line 300  Line 308 
308        | hash (prodVec(a0)) = 0w43 + hashint a0        | hash (prodVec(a0)) = 0w43 + hashint a0
309        | hash (prodScaV(a0)) = 0w47 + hashint a0        | hash (prodScaV(a0)) = 0w47 + hashint a0
310        | hash (sumVec(a0)) = 0w53 + hashint a0        | hash (sumVec(a0)) = 0w53 + hashint a0
311        | hash (Abs(a0)) = 0w59 + hashty a0        | hash (dotVec(a0)) = 0w59 + hashint a0
312        | hash (LT(a0)) = 0w61 + hashty a0        | hash (Abs(a0)) = 0w61 + hashty a0
313        | hash (LTE(a0)) = 0w67 + hashty a0        | hash (LT(a0)) = 0w67 + hashty a0
314        | hash (EQ(a0)) = 0w71 + hashty a0        | hash (LTE(a0)) = 0w71 + hashty a0
315        | hash (NEQ(a0)) = 0w73 + hashty a0        | hash (EQ(a0)) = 0w73 + hashty a0
316        | hash (GT(a0)) = 0w79 + hashty a0        | hash (NEQ(a0)) = 0w79 + hashty a0
317        | hash (GTE(a0)) = 0w83 + hashty a0        | hash (GT(a0)) = 0w83 + hashty a0
318        | hash Not = 0w89        | hash (GTE(a0)) = 0w89 + hashty a0
319        | hash Max = 0w97        | hash Not = 0w97
320        | hash Min = 0w101        | hash Max = 0w101
321        | hash (Clamp(a0)) = 0w103 + hashty a0        | hash Min = 0w103
322        | hash (Lerp(a0)) = 0w107 + hashty a0        | hash (Clamp(a0)) = 0w107 + hashty a0
323        | hash (PrincipleEvec(a0)) = 0w109 + hashty a0        | hash (Lerp(a0)) = 0w109 + hashty a0
324        | hash EigenVecs2x2 = 0w113        | hash (PrincipleEvec(a0)) = 0w113 + hashty a0
325        | hash EigenVecs3x3 = 0w127        | hash EigenVecs2x2 = 0w127
326        | hash EigenVals2x2 = 0w131        | hash EigenVecs3x3 = 0w131
327        | hash EigenVals3x3 = 0w137        | hash EigenVals2x2 = 0w137
328        | hash (Zero(a0)) = 0w139 + hashty a0        | hash EigenVals3x3 = 0w139
329        | hash (Select(a0,a1)) = 0w149 + hashty a0 + hashint a1        | hash (Zero(a0)) = 0w149 + hashty a0
330        | hash (Index(a0,a1)) = 0w151 + hashty a0 + hashint a1        | hash (Select(a0,a1)) = 0w151 + hashty a0 + hashint a1
331        | hash (Subscript(a0)) = 0w157 + hashty a0        | hash (Index(a0,a1)) = 0w157 + hashty a0 + hashint a1
332        | hash (MkDynamic(a0,a1)) = 0w163 + hashty a0 + hashint a1        | hash (Subscript(a0)) = 0w163 + hashty a0
333        | hash (Append(a0)) = 0w167 + hashty a0        | hash (MkDynamic(a0,a1)) = 0w167 + hashty a0 + hashint a1
334        | hash (Prepend(a0)) = 0w173 + hashty a0        | hash (Append(a0)) = 0w173 + hashty a0
335        | hash (Concat(a0)) = 0w179 + hashty a0        | hash (Prepend(a0)) = 0w179 + hashty a0
336        | hash Sqrt = 0w181        | hash (Concat(a0)) = 0w181 + hashty a0
337        | hash (Ceiling(a0)) = 0w191 + hashint a0        | hash Sqrt = 0w191
338        | hash (Floor(a0)) = 0w193 + hashint a0        | hash (Ceiling(a0)) = 0w193 + hashint a0
339        | hash (Round(a0)) = 0w197 + hashint a0        | hash (Floor(a0)) = 0w197 + hashint a0
340        | hash (Trunc(a0)) = 0w199 + hashint a0        | hash (Round(a0)) = 0w199 + hashint a0
341        | hash IntToReal = 0w211        | hash (Trunc(a0)) = 0w211 + hashint a0
342        | hash (RealToInt(a0)) = 0w223 + hashint a0        | hash IntToReal = 0w223
343        | hash (Transform(a0)) = 0w227 + ImageInfo.hash a0        | hash (RealToInt(a0)) = 0w227 + hashint a0
344        | hash (Translate(a0)) = 0w229 + ImageInfo.hash a0        | hash (Transform(a0)) = 0w229 + ImageInfo.hash a0
345        | hash (Kernel(a0,a1)) = 0w233 + Kernel.hash a0 + hashint a1        | hash (Translate(a0)) = 0w233 + ImageInfo.hash a0
346        | hash (ImageAddress(a0)) = 0w239 + ImageInfo.hash a0        | hash (Kernel(a0,a1)) = 0w239 + Kernel.hash a0 + hashint a1
347        | hash (LoadVoxels(a0,a1)) = 0w241 + ImageInfo.hash a0 + hashint a1        | hash (ImageAddress(a0)) = 0w241 + ImageInfo.hash a0
348        | hash (Inside(a0,a1)) = 0w251 + ImageInfo.hash a0 + hashint a1        | hash (LoadVoxels(a0,a1)) = 0w251 + ImageInfo.hash a0 + hashint a1
349        | hash (LoadSeq(a0,a1)) = 0w257 + hashty a0 + hashstring a1        | hash (Inside(a0,a1)) = 0w257 + ImageInfo.hash a0 + hashint a1
350        | hash (LoadImage(a0)) = 0w263 + ImageInfo.hash a0        | hash (LoadSeq(a0,a1)) = 0w263 + hashty a0 + hashstring a1
351        | hash (imgAddr(a0,a1,a2)) = 0w269 + ImageInfo.hash a0 + hashty a1 + hashint a2        | hash (LoadImage(a0)) = 0w269 + ImageInfo.hash a0
352        | hash (imgLoad(a0,a1,a2)) = 0w271 + ImageInfo.hash a0 + hashint a1 + hashint a2        | hash (imgAddr(a0,a1,a2)) = 0w271 + ImageInfo.hash a0 + hashty a1 + hashint a2
353        | hash (Input(a0,a1,a2)) = 0w277 + hashty a0 + hashstring a1 + hashstring a2        | hash (imgLoad(a0,a1,a2)) = 0w277 + ImageInfo.hash a0 + hashint a1 + hashint a2
354        | hash (InputWithDefault(a0,a1,a2)) = 0w281 + hashty a0 + hashstring a1 + hashstring a2        | hash (baseAddr(a0)) = 0w281 + ImageInfo.hash a0
355        | hash (Print(a0)) = 0w283 + hashtys a0        | hash (Input(a0,a1,a2)) = 0w283 + hashty a0 + hashstring a1 + hashstring a2
356          | hash (InputWithDefault(a0,a1,a2)) = 0w293 + hashty a0 + hashstring a1 + hashstring a2
357          | hash (Print(a0)) = 0w307 + hashtys a0
358    
359      fun toString IAdd = "IAdd"      fun toString IAdd = "IAdd"
360        | toString ISub = "ISub"        | toString ISub = "ISub"
# Line 361  Line 371 
371        | toString (prodVec(a0)) = concat["prodVec<", intToString a0, ">"]        | toString (prodVec(a0)) = concat["prodVec<", intToString a0, ">"]
372        | toString (prodScaV(a0)) = concat["prodScaV<", intToString a0, ">"]        | toString (prodScaV(a0)) = concat["prodScaV<", intToString a0, ">"]
373        | toString (sumVec(a0)) = concat["sumVec<", intToString a0, ">"]        | toString (sumVec(a0)) = concat["sumVec<", intToString a0, ">"]
374          | toString (dotVec(a0)) = concat["dotVec<", intToString a0, ">"]
375        | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]        | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]
376        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
377        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
# Line 403  Line 414 
414        | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]        | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]
415        | toString (imgAddr(a0,a1,a2)) = concat["imgAddr<", ImageInfo.toString a0, ",", tyToString a1, ",", intToString a2, ">"]        | toString (imgAddr(a0,a1,a2)) = concat["imgAddr<", ImageInfo.toString a0, ",", tyToString a1, ",", intToString a2, ">"]
416        | toString (imgLoad(a0,a1,a2)) = concat["imgLoad<", ImageInfo.toString a0, ",", intToString a1, ",", intToString a2, ">"]        | toString (imgLoad(a0,a1,a2)) = concat["imgLoad<", ImageInfo.toString a0, ",", intToString a1, ",", intToString a2, ">"]
417          | toString (baseAddr(a0)) = concat["baseAddr<", ImageInfo.toString a0, ">"]
418        | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]        | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
419        | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]        | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
420        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]

Legend:
Removed from v.2668  
changed lines
  Added in v.2690

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