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 2624, Fri May 16 17:53:41 2014 UTC revision 2627, Sat May 17 00:44:22 2014 UTC
# Line 62  Line 62 
62        | prodVec of int        | prodVec of int
63        | prodScaV of int        | prodScaV of int
64        | sumVec of int        | sumVec of int
       | LoadVec of ty * int  
       | StoreVec of ty * int  
65        | Clamp of ty        | Clamp of ty
66        | Lerp of ty        | Lerp of ty
67        | Norm of ty        | Norm of ty
# Line 129  Line 127 
127        | resultArity (prodVec _) = 1        | resultArity (prodVec _) = 1
128        | resultArity (prodScaV _) = 1        | resultArity (prodScaV _) = 1
129        | resultArity (sumVec _) = 1        | resultArity (sumVec _) = 1
       | resultArity (LoadVec _) = 1  
       | resultArity (StoreVec _) = 1  
130        | resultArity (Clamp _) = 1        | resultArity (Clamp _) = 1
131        | resultArity (Lerp _) = 1        | resultArity (Lerp _) = 1
132        | resultArity (Norm _) = 1        | resultArity (Norm _) = 1
# Line 196  Line 192 
192        | arity (prodVec _) = 2        | arity (prodVec _) = 2
193        | arity (prodScaV _) = 2        | arity (prodScaV _) = 2
194        | arity (sumVec _) = 2        | arity (sumVec _) = 2
       | arity (LoadVec _) = 2  
       | arity (StoreVec _) = 1  
195        | arity (Clamp _) = 3        | arity (Clamp _) = 3
196        | arity (Lerp _) = 3        | arity (Lerp _) = 3
197        | arity (Norm _) = 1        | arity (Norm _) = 1
# Line 270  Line 264 
264        | same (prodVec(a0), prodVec(b0)) = sameint(a0, b0)        | same (prodVec(a0), prodVec(b0)) = sameint(a0, b0)
265        | same (prodScaV(a0), prodScaV(b0)) = sameint(a0, b0)        | same (prodScaV(a0), prodScaV(b0)) = sameint(a0, b0)
266        | same (sumVec(a0), sumVec(b0)) = sameint(a0, b0)        | same (sumVec(a0), sumVec(b0)) = sameint(a0, b0)
       | same (LoadVec(a0,a1), LoadVec(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)  
       | same (StoreVec(a0,a1), StoreVec(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)  
267        | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)        | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)
268        | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)        | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)
269        | same (Norm(a0), Norm(b0)) = samety(a0, b0)        | same (Norm(a0), Norm(b0)) = samety(a0, b0)
# Line 338  Line 330 
330        | hash (prodVec(a0)) = 0w107 + hashint a0        | hash (prodVec(a0)) = 0w107 + hashint a0
331        | hash (prodScaV(a0)) = 0w109 + hashint a0        | hash (prodScaV(a0)) = 0w109 + hashint a0
332        | hash (sumVec(a0)) = 0w113 + hashint a0        | hash (sumVec(a0)) = 0w113 + hashint a0
333        | hash (LoadVec(a0,a1)) = 0w127 + hashty a0 + hashint a1        | hash (Clamp(a0)) = 0w127 + hashty a0
334        | hash (StoreVec(a0,a1)) = 0w131 + hashty a0 + hashint a1        | hash (Lerp(a0)) = 0w131 + hashty a0
335        | hash (Clamp(a0)) = 0w137 + hashty a0        | hash (Norm(a0)) = 0w137 + hashty a0
336        | hash (Lerp(a0)) = 0w139 + hashty a0        | hash (Normalize(a0)) = 0w139 + hashint a0
337        | hash (Norm(a0)) = 0w149 + hashty a0        | hash (PrincipleEvec(a0)) = 0w149 + hashty a0
338        | hash (Normalize(a0)) = 0w151 + hashint a0        | hash EigenVecs2x2 = 0w151
339        | hash (PrincipleEvec(a0)) = 0w157 + hashty a0        | hash EigenVecs3x3 = 0w157
340        | hash EigenVecs2x2 = 0w163        | hash EigenVals2x2 = 0w163
341        | hash EigenVecs3x3 = 0w167        | hash EigenVals3x3 = 0w167
342        | hash EigenVals2x2 = 0w173        | hash (Zero(a0)) = 0w173 + hashty a0
343        | hash EigenVals3x3 = 0w179        | hash (Select(a0,a1)) = 0w179 + hashty a0 + hashint a1
344        | hash (Zero(a0)) = 0w181 + hashty a0        | hash (Index(a0,a1)) = 0w181 + hashty a0 + hashint a1
345        | hash (Select(a0,a1)) = 0w191 + hashty a0 + hashint a1        | hash (Subscript(a0)) = 0w191 + hashty a0
346        | hash (Index(a0,a1)) = 0w193 + hashty a0 + hashint a1        | hash (MkDynamic(a0,a1)) = 0w193 + hashty a0 + hashint a1
347        | hash (Subscript(a0)) = 0w197 + hashty a0        | hash (Append(a0)) = 0w197 + hashty a0
348        | hash (MkDynamic(a0,a1)) = 0w199 + hashty a0 + hashint a1        | hash (Prepend(a0)) = 0w199 + hashty a0
349        | hash (Append(a0)) = 0w211 + hashty a0        | hash (Concat(a0)) = 0w211 + hashty a0
350        | hash (Prepend(a0)) = 0w223 + hashty a0        | hash (Length(a0)) = 0w223 + hashty a0
351        | hash (Concat(a0)) = 0w227 + hashty a0        | hash (Ceiling(a0)) = 0w227 + hashint a0
352        | hash (Length(a0)) = 0w229 + hashty a0        | hash (Floor(a0)) = 0w229 + hashint a0
353        | hash (Ceiling(a0)) = 0w233 + hashint a0        | hash (Round(a0)) = 0w233 + hashint a0
354        | hash (Floor(a0)) = 0w239 + hashint a0        | hash (Trunc(a0)) = 0w239 + hashint a0
355        | hash (Round(a0)) = 0w241 + hashint a0        | hash IntToReal = 0w241
356        | hash (Trunc(a0)) = 0w251 + hashint a0        | hash (RealToInt(a0)) = 0w251 + hashint a0
357        | hash IntToReal = 0w257        | hash (Transform(a0)) = 0w257 + ImageInfo.hash a0
358        | hash (RealToInt(a0)) = 0w263 + hashint a0        | hash (Translate(a0)) = 0w263 + ImageInfo.hash a0
359        | hash (Transform(a0)) = 0w269 + ImageInfo.hash a0        | hash (Kernel(a0,a1)) = 0w269 + Kernel.hash a0 + hashint a1
360        | hash (Translate(a0)) = 0w271 + ImageInfo.hash a0        | hash (ImageAddress(a0)) = 0w271 + ImageInfo.hash a0
361        | hash (Kernel(a0,a1)) = 0w277 + Kernel.hash a0 + hashint a1        | hash (LoadVoxels(a0,a1)) = 0w277 + ImageInfo.hash a0 + hashint a1
362        | hash (ImageAddress(a0)) = 0w281 + ImageInfo.hash a0        | hash (Inside(a0,a1)) = 0w281 + ImageInfo.hash a0 + hashint a1
363        | hash (LoadVoxels(a0,a1)) = 0w283 + ImageInfo.hash a0 + hashint a1        | hash (LoadSeq(a0,a1)) = 0w283 + hashty a0 + hashstring a1
364        | hash (Inside(a0,a1)) = 0w293 + ImageInfo.hash a0 + hashint a1        | hash (LoadImage(a0)) = 0w293 + ImageInfo.hash a0
365        | hash (LoadSeq(a0,a1)) = 0w307 + hashty a0 + hashstring a1        | hash (Input(a0,a1,a2)) = 0w307 + hashty a0 + hashstring a1 + hashstring a2
366        | hash (LoadImage(a0)) = 0w311 + ImageInfo.hash a0        | hash (InputWithDefault(a0,a1,a2)) = 0w311 + hashty a0 + hashstring a1 + hashstring a2
367        | hash (Input(a0,a1,a2)) = 0w313 + hashty a0 + hashstring a1 + hashstring a2        | hash (Print(a0)) = 0w313 + hashtys a0
       | hash (InputWithDefault(a0,a1,a2)) = 0w317 + hashty a0 + hashstring a1 + hashstring a2  
       | hash (Print(a0)) = 0w331 + hashtys a0  
368    
369      fun toString IAdd = "IAdd"      fun toString IAdd = "IAdd"
370        | toString ISub = "ISub"        | toString ISub = "ISub"
# Line 405  Line 395 
395        | toString (prodVec(a0)) = concat["prodVec<", intToString a0, ">"]        | toString (prodVec(a0)) = concat["prodVec<", intToString a0, ">"]
396        | toString (prodScaV(a0)) = concat["prodScaV<", intToString a0, ">"]        | toString (prodScaV(a0)) = concat["prodScaV<", intToString a0, ">"]
397        | toString (sumVec(a0)) = concat["sumVec<", intToString a0, ">"]        | toString (sumVec(a0)) = concat["sumVec<", intToString a0, ">"]
       | toString (LoadVec(a0,a1)) = concat["LoadVec<", tyToString a0, ",", intToString a1, ">"]  
       | toString (StoreVec(a0,a1)) = concat["StoreVec<", tyToString a0, ",", intToString a1, ">"]  
398        | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]        | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]
399        | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]        | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]
400        | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]        | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]

Legend:
Removed from v.2624  
changed lines
  Added in v.2627

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