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 3194, Wed May 13 02:57:42 2015 UTC revision 3195, Wed May 20 21:02:12 2015 UTC
# Line 46  Line 46 
46        | INeg        | INeg
47        | R of ty        | R of ty
48        | IndexTensor of int * ty * ty        | IndexTensor of int * ty * ty
49        | ProjectTensor of int * int * ty * ty        | ProjectLast of int * int * ty * ty
50          | ProjectFirst of int * int * ty * ty
51        | addSca        | addSca
52        | subSca        | subSca
53        | prodSca        | prodSca
# Line 117  Line 118 
118        | resultArity INeg = 1        | resultArity INeg = 1
119        | resultArity (R _) = 1        | resultArity (R _) = 1
120        | resultArity (IndexTensor _) = 1        | resultArity (IndexTensor _) = 1
121        | resultArity (ProjectTensor _) = 1        | resultArity (ProjectLast _) = 1
122          | resultArity (ProjectFirst _) = 1
123        | resultArity addSca = 1        | resultArity addSca = 1
124        | resultArity subSca = 1        | resultArity subSca = 1
125        | resultArity prodSca = 1        | resultArity prodSca = 1
# Line 188  Line 190 
190        | arity INeg = 1        | arity INeg = 1
191        | arity (R _) = 1        | arity (R _) = 1
192        | arity (IndexTensor _) = 2        | arity (IndexTensor _) = 2
193        | arity (ProjectTensor _) = 2        | arity (ProjectLast _) = 2
194          | arity (ProjectFirst _) = 2
195        | arity addSca = 2        | arity addSca = 2
196        | arity subSca = 2        | arity subSca = 2
197        | arity prodSca = 2        | arity prodSca = 2
# Line 267  Line 270 
270        | same (INeg, INeg) = true        | same (INeg, INeg) = true
271        | same (R(a0), R(b0)) = samety(a0, b0)        | same (R(a0), R(b0)) = samety(a0, b0)
272        | same (IndexTensor(a0,a1,a2), IndexTensor(b0,b1,b2)) = sameint(a0, b0) andalso samety(a1, b1) andalso samety(a2, b2)        | same (IndexTensor(a0,a1,a2), IndexTensor(b0,b1,b2)) = sameint(a0, b0) andalso samety(a1, b1) andalso samety(a2, b2)
273        | 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)        | same (ProjectLast(a0,a1,a2,a3), ProjectLast(b0,b1,b2,b3)) = sameint(a0, b0) andalso sameint(a1, b1) andalso samety(a2, b2) andalso samety(a3, b3)
274          | same (ProjectFirst(a0,a1,a2,a3), ProjectFirst(b0,b1,b2,b3)) = sameint(a0, b0) andalso sameint(a1, b1) andalso samety(a2, b2) andalso samety(a3, b3)
275        | same (addSca, addSca) = true        | same (addSca, addSca) = true
276        | same (subSca, subSca) = true        | same (subSca, subSca) = true
277        | same (prodSca, prodSca) = true        | same (prodSca, prodSca) = true
# Line 339  Line 343 
343        | hash INeg = 0w13        | hash INeg = 0w13
344        | hash (R(a0)) = 0w17 + hashty a0        | hash (R(a0)) = 0w17 + hashty a0
345        | hash (IndexTensor(a0,a1,a2)) = 0w19 + hashint a0 + hashty a1 + hashty a2        | hash (IndexTensor(a0,a1,a2)) = 0w19 + hashint a0 + hashty a1 + hashty a2
346        | hash (ProjectTensor(a0,a1,a2,a3)) = 0w23 + hashint a0 + hashint a1 + hashty a2 + hashty a3        | hash (ProjectLast(a0,a1,a2,a3)) = 0w23 + hashint a0 + hashint a1 + hashty a2 + hashty a3
347        | hash addSca = 0w29        | hash (ProjectFirst(a0,a1,a2,a3)) = 0w29 + hashint a0 + hashint a1 + hashty a2 + hashty a3
348        | hash subSca = 0w31        | hash addSca = 0w31
349        | hash prodSca = 0w37        | hash subSca = 0w37
350        | hash divSca = 0w41        | hash prodSca = 0w41
351        | hash (powRat(a0)) = 0w43 + hashty a0        | hash divSca = 0w43
352        | hash powInt = 0w47        | hash (powRat(a0)) = 0w47 + hashty a0
353        | hash (addVec(a0)) = 0w53 + hashint a0        | hash powInt = 0w53
354        | hash (subVec(a0)) = 0w59 + hashint a0        | hash (addVec(a0)) = 0w59 + hashint a0
355        | hash (prodVec(a0)) = 0w61 + hashint a0        | hash (subVec(a0)) = 0w61 + hashint a0
356        | hash (prodScaV(a0)) = 0w67 + hashint a0        | hash (prodVec(a0)) = 0w67 + hashint a0
357        | hash (sumVec(a0)) = 0w71 + hashint a0        | hash (prodScaV(a0)) = 0w71 + hashint a0
358        | hash (dotVec(a0)) = 0w73 + hashint a0        | hash (sumVec(a0)) = 0w73 + hashint a0
359        | hash (Abs(a0)) = 0w79 + hashty a0        | hash (dotVec(a0)) = 0w79 + hashint a0
360        | hash (LT(a0)) = 0w83 + hashty a0        | hash (Abs(a0)) = 0w83 + hashty a0
361        | hash (LTE(a0)) = 0w89 + hashty a0        | hash (LT(a0)) = 0w89 + hashty a0
362        | hash (EQ(a0)) = 0w97 + hashty a0        | hash (LTE(a0)) = 0w97 + hashty a0
363        | hash (NEQ(a0)) = 0w101 + hashty a0        | hash (EQ(a0)) = 0w101 + hashty a0
364        | hash (GT(a0)) = 0w103 + hashty a0        | hash (NEQ(a0)) = 0w103 + hashty a0
365        | hash (GTE(a0)) = 0w107 + hashty a0        | hash (GT(a0)) = 0w107 + hashty a0
366        | hash Not = 0w109        | hash (GTE(a0)) = 0w109 + hashty a0
367        | hash Max = 0w113        | hash Not = 0w113
368        | hash Min = 0w127        | hash Max = 0w127
369        | hash (Clamp(a0)) = 0w131 + hashty a0        | hash Min = 0w131
370        | hash (Lerp(a0)) = 0w137 + hashty a0        | hash (Clamp(a0)) = 0w137 + hashty a0
371        | hash (Normalize(a0)) = 0w139 + hashint a0        | hash (Lerp(a0)) = 0w139 + hashty a0
372        | hash (PrincipleEvec(a0)) = 0w149 + hashty a0        | hash (Normalize(a0)) = 0w149 + hashint a0
373        | hash EigenVecs2x2 = 0w151        | hash (PrincipleEvec(a0)) = 0w151 + hashty a0
374        | hash EigenVecs3x3 = 0w157        | hash EigenVecs2x2 = 0w157
375        | hash EigenVals2x2 = 0w163        | hash EigenVecs3x3 = 0w163
376        | hash EigenVals3x3 = 0w167        | hash EigenVals2x2 = 0w167
377        | hash (Zero(a0)) = 0w173 + hashty a0        | hash EigenVals3x3 = 0w173
378        | hash (Select(a0,a1)) = 0w179 + hashty a0 + hashint a1        | hash (Zero(a0)) = 0w179 + hashty a0
379        | hash (Index(a0,a1)) = 0w181 + hashty a0 + hashint a1        | hash (Select(a0,a1)) = 0w181 + hashty a0 + hashint a1
380        | hash (Subscript(a0)) = 0w191 + hashty a0        | hash (Index(a0,a1)) = 0w191 + hashty a0 + hashint a1
381        | hash (MkDynamic(a0,a1)) = 0w193 + hashty a0 + hashint a1        | hash (Subscript(a0)) = 0w193 + hashty a0
382        | hash (Append(a0)) = 0w197 + hashty a0        | hash (MkDynamic(a0,a1)) = 0w197 + hashty a0 + hashint a1
383        | hash (Prepend(a0)) = 0w199 + hashty a0        | hash (Append(a0)) = 0w199 + hashty a0
384        | hash (Concat(a0)) = 0w211 + hashty a0        | hash (Prepend(a0)) = 0w211 + hashty a0
385        | hash Sqrt = 0w223        | hash (Concat(a0)) = 0w223 + hashty a0
386        | hash Cosine = 0w227        | hash Sqrt = 0w227
387        | hash ArcCosine = 0w229        | hash Cosine = 0w229
388        | hash Sine = 0w233        | hash ArcCosine = 0w233
389        | hash ArcSine = 0w239        | hash Sine = 0w239
390        | hash (Ceiling(a0)) = 0w241 + hashint a0        | hash ArcSine = 0w241
391        | hash (Floor(a0)) = 0w251 + hashint a0        | hash (Ceiling(a0)) = 0w251 + hashint a0
392        | hash (Round(a0)) = 0w257 + hashint a0        | hash (Floor(a0)) = 0w257 + hashint a0
393        | hash (Trunc(a0)) = 0w263 + hashint a0        | hash (Round(a0)) = 0w263 + hashint a0
394        | hash IntToReal = 0w269        | hash (Trunc(a0)) = 0w269 + hashint a0
395        | hash (RealToInt(a0)) = 0w271 + hashint a0        | hash IntToReal = 0w271
396        | hash (Transform(a0)) = 0w277 + ImageInfo.hash a0        | hash (RealToInt(a0)) = 0w277 + hashint a0
397        | hash (Translate(a0)) = 0w281 + ImageInfo.hash a0        | hash (Transform(a0)) = 0w281 + ImageInfo.hash a0
398        | hash (Kernel(a0,a1)) = 0w283 + Kernel.hash a0 + hashint a1        | hash (Translate(a0)) = 0w283 + ImageInfo.hash a0
399        | hash (ImageAddress(a0)) = 0w293 + ImageInfo.hash a0        | hash (Kernel(a0,a1)) = 0w293 + Kernel.hash a0 + hashint a1
400        | hash (LoadVoxels(a0,a1)) = 0w307 + ImageInfo.hash a0 + hashint a1        | hash (ImageAddress(a0)) = 0w307 + ImageInfo.hash a0
401        | hash (Inside(a0,a1)) = 0w311 + ImageInfo.hash a0 + hashint a1        | hash (LoadVoxels(a0,a1)) = 0w311 + ImageInfo.hash a0 + hashint a1
402        | hash (imgAddr(a0,a1,a2)) = 0w313 + ImageInfo.hash a0 + hashty a1 + hashint a2        | hash (Inside(a0,a1)) = 0w313 + ImageInfo.hash a0 + hashint a1
403        | hash (imgLoad(a0,a1,a2)) = 0w317 + ImageInfo.hash a0 + hashint a1 + hashint a2        | hash (imgAddr(a0,a1,a2)) = 0w317 + ImageInfo.hash a0 + hashty a1 + hashint a2
404        | hash (baseAddr(a0)) = 0w331 + ImageInfo.hash a0        | hash (imgLoad(a0,a1,a2)) = 0w331 + ImageInfo.hash a0 + hashint a1 + hashint a2
405        | hash (LoadSeq(a0,a1)) = 0w337 + hashty a0 + hashstring a1        | hash (baseAddr(a0)) = 0w337 + ImageInfo.hash a0
406        | hash (LoadImage(a0,a1,a2)) = 0w347 + hashty a0 + hashstring a1 + ImageInfo.hash a2        | hash (LoadSeq(a0,a1)) = 0w347 + hashty a0 + hashstring a1
407        | hash (Input(a0)) = 0w349 + hashinput a0        | hash (LoadImage(a0,a1,a2)) = 0w349 + hashty a0 + hashstring a1 + ImageInfo.hash a2
408        | hash (Print(a0)) = 0w353 + hashtys a0        | hash (Input(a0)) = 0w353 + hashinput a0
409          | hash (Print(a0)) = 0w359 + hashtys a0
410    
411      fun toString IAdd = "IAdd"      fun toString IAdd = "IAdd"
412        | toString ISub = "ISub"        | toString ISub = "ISub"
# Line 410  Line 415 
415        | toString INeg = "INeg"        | toString INeg = "INeg"
416        | toString (R(a0)) = concat["R<", tyToString a0, ">"]        | toString (R(a0)) = concat["R<", tyToString a0, ">"]
417        | toString (IndexTensor(a0,a1,a2)) = concat["IndexTensor<", intToString a0, ",", tyToString a1, ",", tyToString a2, ">"]        | toString (IndexTensor(a0,a1,a2)) = concat["IndexTensor<", intToString a0, ",", tyToString a1, ",", tyToString a2, ">"]
418        | toString (ProjectTensor(a0,a1,a2,a3)) = concat["ProjectTensor<", intToString a0, ",", intToString a1, ",", tyToString a2, ",", tyToString a3, ">"]        | toString (ProjectLast(a0,a1,a2,a3)) = concat["ProjectLast<", intToString a0, ",", intToString a1, ",", tyToString a2, ",", tyToString a3, ">"]
419          | toString (ProjectFirst(a0,a1,a2,a3)) = concat["ProjectFirst<", intToString a0, ",", intToString a1, ",", tyToString a2, ",", tyToString a3, ">"]
420        | toString addSca = "addSca"        | toString addSca = "addSca"
421        | toString subSca = "subSca"        | toString subSca = "subSca"
422        | toString prodSca = "prodSca"        | toString prodSca = "prodSca"

Legend:
Removed from v.3194  
changed lines
  Added in v.3195

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