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

Legend:
Removed from v.2749  
changed lines
  Added in v.2791

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