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 2636, Tue May 27 16:18:36 2014 UTC revision 2637, Wed May 28 05:20:45 2014 UTC
# Line 38  Line 38 
38        | IMul        | IMul
39        | IDiv        | IDiv
40        | INeg        | INeg
       | C of int  
41        | IndexTensor of int * ty * ty * ty        | IndexTensor of int * ty * ty * ty
42        | addSca        | addSca
43        | subSca        | subSca
# Line 102  Line 101 
101        | resultArity IMul = 1        | resultArity IMul = 1
102        | resultArity IDiv = 1        | resultArity IDiv = 1
103        | resultArity INeg = 1        | resultArity INeg = 1
       | resultArity (C _) = 1  
104        | resultArity (IndexTensor _) = 1        | resultArity (IndexTensor _) = 1
105        | resultArity addSca = 1        | resultArity addSca = 1
106        | resultArity subSca = 1        | resultArity subSca = 1
# Line 166  Line 164 
164        | arity IMul = 2        | arity IMul = 2
165        | arity IDiv = 2        | arity IDiv = 2
166        | arity INeg = 1        | arity INeg = 1
       | arity (C _) = 2  
167        | arity (IndexTensor _) = 2        | arity (IndexTensor _) = 2
168        | arity addSca = 2        | arity addSca = 2
169        | arity subSca = 2        | arity subSca = 2
# Line 237  Line 234 
234        | same (IMul, IMul) = true        | same (IMul, IMul) = true
235        | same (IDiv, IDiv) = true        | same (IDiv, IDiv) = true
236        | same (INeg, INeg) = true        | same (INeg, INeg) = true
       | same (C(a0), C(b0)) = sameint(a0, b0)  
237        | same (IndexTensor(a0,a1,a2,a3), IndexTensor(b0,b1,b2,b3)) = sameint(a0, b0) andalso samety(a1, b1) andalso samety(a2, b2) andalso samety(a3, b3)        | same (IndexTensor(a0,a1,a2,a3), IndexTensor(b0,b1,b2,b3)) = sameint(a0, b0) andalso samety(a1, b1) andalso samety(a2, b2) andalso samety(a3, b3)
238        | same (addSca, addSca) = true        | same (addSca, addSca) = true
239        | same (subSca, subSca) = true        | same (subSca, subSca) = true
# Line 302  Line 298 
298        | hash IMul = 0w7        | hash IMul = 0w7
299        | hash IDiv = 0w11        | hash IDiv = 0w11
300        | hash INeg = 0w13        | hash INeg = 0w13
301        | hash (C(a0)) = 0w17 + hashint a0        | hash (IndexTensor(a0,a1,a2,a3)) = 0w17 + hashint a0 + hashty a1 + hashty a2 + hashty a3
302        | hash (IndexTensor(a0,a1,a2,a3)) = 0w19 + hashint a0 + hashty a1 + hashty a2 + hashty a3        | hash addSca = 0w19
303        | hash addSca = 0w23        | hash subSca = 0w23
304        | hash subSca = 0w29        | hash prodSca = 0w29
305        | hash prodSca = 0w31        | hash divSca = 0w31
306        | hash divSca = 0w37        | hash (addVec(a0)) = 0w37 + hashint a0
307        | hash (addVec(a0)) = 0w41 + hashint a0        | hash (subVec(a0)) = 0w41 + hashint a0
308        | hash (subVec(a0)) = 0w43 + hashint a0        | hash (prodVec(a0)) = 0w43 + hashint a0
309        | hash (prodVec(a0)) = 0w47 + hashint a0        | hash (prodScaV(a0)) = 0w47 + hashint a0
310        | hash (prodScaV(a0)) = 0w53 + hashint a0        | hash (sumVec(a0)) = 0w53 + hashint a0
311        | hash (sumVec(a0)) = 0w59 + hashint a0        | hash (Abs(a0)) = 0w59 + hashty a0
312        | hash (Abs(a0)) = 0w61 + hashty a0        | hash (LT(a0)) = 0w61 + hashty a0
313        | hash (LT(a0)) = 0w67 + hashty a0        | hash (LTE(a0)) = 0w67 + hashty a0
314        | hash (LTE(a0)) = 0w71 + hashty a0        | hash (EQ(a0)) = 0w71 + hashty a0
315        | hash (EQ(a0)) = 0w73 + hashty a0        | hash (NEQ(a0)) = 0w73 + hashty a0
316        | hash (NEQ(a0)) = 0w79 + hashty a0        | hash (GT(a0)) = 0w79 + hashty a0
317        | hash (GT(a0)) = 0w83 + hashty a0        | hash (GTE(a0)) = 0w83 + hashty a0
318        | hash (GTE(a0)) = 0w89 + hashty a0        | hash Not = 0w89
319        | hash Not = 0w97        | hash Max = 0w97
320        | hash Max = 0w101        | hash Min = 0w101
321        | hash Min = 0w103        | hash (Clamp(a0)) = 0w103 + hashty a0
322        | hash (Clamp(a0)) = 0w107 + hashty a0        | hash (Lerp(a0)) = 0w107 + hashty a0
323        | hash (Lerp(a0)) = 0w109 + hashty a0        | hash (Norm(a0)) = 0w109 + hashty a0
324        | hash (Norm(a0)) = 0w113 + hashty a0        | hash (Normalize(a0)) = 0w113 + hashint a0
325        | hash (Normalize(a0)) = 0w127 + hashint a0        | hash (PrincipleEvec(a0)) = 0w127 + hashty a0
326        | hash (PrincipleEvec(a0)) = 0w131 + hashty a0        | hash EigenVecs2x2 = 0w131
327        | hash EigenVecs2x2 = 0w137        | hash EigenVecs3x3 = 0w137
328        | hash EigenVecs3x3 = 0w139        | hash EigenVals2x2 = 0w139
329        | hash EigenVals2x2 = 0w149        | hash EigenVals3x3 = 0w149
330        | hash EigenVals3x3 = 0w151        | hash (Zero(a0)) = 0w151 + hashty a0
331        | hash (Zero(a0)) = 0w157 + hashty a0        | hash (Select(a0,a1)) = 0w157 + hashty a0 + hashint a1
332        | hash (Select(a0,a1)) = 0w163 + hashty a0 + hashint a1        | hash (Index(a0,a1)) = 0w163 + hashty a0 + hashint a1
333        | hash (Index(a0,a1)) = 0w167 + hashty a0 + hashint a1        | hash (Subscript(a0)) = 0w167 + hashty a0
334        | hash (Subscript(a0)) = 0w173 + hashty a0        | hash (MkDynamic(a0,a1)) = 0w173 + hashty a0 + hashint a1
335        | hash (MkDynamic(a0,a1)) = 0w179 + hashty a0 + hashint a1        | hash (Append(a0)) = 0w179 + hashty a0
336        | hash (Append(a0)) = 0w181 + hashty a0        | hash (Prepend(a0)) = 0w181 + hashty a0
337        | hash (Prepend(a0)) = 0w191 + hashty a0        | hash (Concat(a0)) = 0w191 + hashty a0
338        | hash (Concat(a0)) = 0w193 + hashty a0        | hash (Length(a0)) = 0w193 + hashty a0
339        | hash (Length(a0)) = 0w197 + hashty a0        | hash (Ceiling(a0)) = 0w197 + hashint a0
340        | hash (Ceiling(a0)) = 0w199 + hashint a0        | hash (Floor(a0)) = 0w199 + hashint a0
341        | hash (Floor(a0)) = 0w211 + hashint a0        | hash (Round(a0)) = 0w211 + hashint a0
342        | hash (Round(a0)) = 0w223 + hashint a0        | hash (Trunc(a0)) = 0w223 + hashint a0
343        | hash (Trunc(a0)) = 0w227 + hashint a0        | hash IntToReal = 0w227
344        | hash IntToReal = 0w229        | hash (RealToInt(a0)) = 0w229 + hashint a0
345        | hash (RealToInt(a0)) = 0w233 + hashint a0        | hash (Transform(a0)) = 0w233 + ImageInfo.hash a0
346        | hash (Transform(a0)) = 0w239 + ImageInfo.hash a0        | hash (Translate(a0)) = 0w239 + ImageInfo.hash a0
347        | hash (Translate(a0)) = 0w241 + ImageInfo.hash a0        | hash (Kernel(a0,a1)) = 0w241 + Kernel.hash a0 + hashint a1
348        | hash (Kernel(a0,a1)) = 0w251 + Kernel.hash a0 + hashint a1        | hash (ImageAddress(a0)) = 0w251 + ImageInfo.hash a0
349        | hash (ImageAddress(a0)) = 0w257 + ImageInfo.hash a0        | hash (LoadVoxels(a0,a1)) = 0w257 + ImageInfo.hash a0 + hashint a1
350        | hash (LoadVoxels(a0,a1)) = 0w263 + ImageInfo.hash a0 + hashint a1        | hash (Inside(a0,a1)) = 0w263 + ImageInfo.hash a0 + hashint a1
351        | hash (Inside(a0,a1)) = 0w269 + ImageInfo.hash a0 + hashint a1        | hash (LoadSeq(a0,a1)) = 0w269 + hashty a0 + hashstring a1
352        | hash (LoadSeq(a0,a1)) = 0w271 + hashty a0 + hashstring a1        | hash (LoadImage(a0)) = 0w271 + ImageInfo.hash a0
353        | hash (LoadImage(a0)) = 0w277 + ImageInfo.hash a0        | hash (imgAddr(a0,a1,a2)) = 0w277 + ImageInfo.hash a0 + hashty a1 + hashint a2
354        | hash (imgAddr(a0,a1,a2)) = 0w281 + ImageInfo.hash a0 + hashty a1 + hashint a2        | hash (imgLoad(a0,a1,a2)) = 0w281 + ImageInfo.hash a0 + hashint a1 + hashint a2
355        | hash (imgLoad(a0,a1,a2)) = 0w283 + ImageInfo.hash a0 + hashint a1 + hashint a2        | hash (Input(a0,a1,a2)) = 0w283 + hashty a0 + hashstring a1 + hashstring a2
356        | hash (Input(a0,a1,a2)) = 0w293 + hashty a0 + hashstring a1 + hashstring a2        | hash (InputWithDefault(a0,a1,a2)) = 0w293 + hashty a0 + hashstring a1 + hashstring a2
357        | hash (InputWithDefault(a0,a1,a2)) = 0w307 + hashty a0 + hashstring a1 + hashstring a2        | hash (Print(a0)) = 0w307 + hashtys a0
       | hash (Print(a0)) = 0w311 + hashtys a0  
358    
359      fun toString IAdd = "IAdd"      fun toString IAdd = "IAdd"
360        | toString ISub = "ISub"        | toString ISub = "ISub"
361        | toString IMul = "IMul"        | toString IMul = "IMul"
362        | toString IDiv = "IDiv"        | toString IDiv = "IDiv"
363        | toString INeg = "INeg"        | toString INeg = "INeg"
       | toString (C(a0)) = concat["C<", intToString a0, ">"]  
364        | toString (IndexTensor(a0,a1,a2,a3)) = concat["IndexTensor<", intToString a0, ",", tyToString a1, ",", tyToString a2, ",", tyToString a3, ">"]        | toString (IndexTensor(a0,a1,a2,a3)) = concat["IndexTensor<", intToString a0, ",", tyToString a1, ",", tyToString a2, ",", tyToString a3, ">"]
365        | toString addSca = "addSca"        | toString addSca = "addSca"
366        | toString subSca = "subSca"        | toString subSca = "subSca"

Legend:
Removed from v.2636  
changed lines
  Added in v.2637

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