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 2377, Mon Jun 3 19:41:56 2013 UTC revision 2400, Sun Jul 7 13:29:54 2013 UTC
# Line 33  Line 33 
33      fun stringToString s = String.concat["\"", s, "\""]      fun stringToString s = String.concat["\"", s, "\""]
34    
35      datatype rator      datatype rator
36        = Add of ty        = IAdd of ty
37        | Sub of ty        | ISub of ty
38        | Mul of ty        | IMul of ty
39        | Div of ty        | IDiv of ty
40        | Neg of ty        | INeg of ty
41        | Abs of ty        | Abs of ty
42        | LT of ty        | LT of ty
43        | LTE of ty        | LTE of ty
# Line 50  Line 50 
50        | Min        | Min
51        | Clamp of ty        | Clamp of ty
52        | Lerp of ty        | Lerp of ty
       | Dot of int  
       | MulVecMat of int * int  
       | MulMatVec of int * int  
       | MulMatMat of int * int * int  
       | MulVecTen3 of int * int * int  
       | MulTen3Vec of int * int * int  
       | ColonMul of ty * ty  
       | Cross  
53        | Norm of ty        | Norm of ty
54        | Normalize of int        | Normalize of int
       | Scale of ty  
55        | PrincipleEvec of ty        | PrincipleEvec of ty
56        | EigenVecs2x2        | EigenVecs2x2
57        | EigenVecs3x3        | EigenVecs3x3
58        | EigenVals2x2        | EigenVals2x2
59        | EigenVals3x3        | EigenVals3x3
       | Identity of int  
60        | Zero of ty        | Zero of ty
       | Transpose of int * int  
61        | Select of ty * int        | Select of ty * int
62        | Index of ty * int        | Index of ty * int
63        | Subscript of ty        | Subscript of ty
64          | MkDynamic of ty * int
65          | Append of ty
66          | Prepend of ty
67          | Concat of ty
68          | Length of ty
69        | Ceiling of int        | Ceiling of int
70        | Floor of int        | Floor of int
71        | Round of int        | Round of int
# Line 82  Line 76 
76        | LoadVoxels of ImageInfo.info * int        | LoadVoxels of ImageInfo.info * int
77        | PosToImgSpace of ImageInfo.info        | PosToImgSpace of ImageInfo.info
78        | TensorToWorldSpace of ImageInfo.info * ty        | TensorToWorldSpace of ImageInfo.info * ty
       | LoadImage of ImageInfo.info  
79        | Inside of ImageInfo.info * int        | Inside of ImageInfo.info * int
80        | Input of ty * string * string        | LoadSeq of ty * string
81        | InputWithDefault of ty * string * string        | LoadImage of ty * string * ImageInfo.info
82          | Input of input
83        | Print of tys        | Print of tys
84    
85      fun resultArity (Add _) = 1      fun resultArity (IAdd _) = 1
86        | resultArity (Sub _) = 1        | resultArity (ISub _) = 1
87        | resultArity (Mul _) = 1        | resultArity (IMul _) = 1
88        | resultArity (Div _) = 1        | resultArity (IDiv _) = 1
89        | resultArity (Neg _) = 1        | resultArity (INeg _) = 1
90        | resultArity (Abs _) = 1        | resultArity (Abs _) = 1
91        | resultArity (LT _) = 1        | resultArity (LT _) = 1
92        | resultArity (LTE _) = 1        | resultArity (LTE _) = 1
# Line 105  Line 99 
99        | resultArity Min = 1        | resultArity Min = 1
100        | resultArity (Clamp _) = 1        | resultArity (Clamp _) = 1
101        | resultArity (Lerp _) = 1        | resultArity (Lerp _) = 1
       | resultArity (Dot _) = 1  
       | resultArity (MulVecMat _) = 1  
       | resultArity (MulMatVec _) = 1  
       | resultArity (MulMatMat _) = 1  
       | resultArity (MulVecTen3 _) = 1  
       | resultArity (MulTen3Vec _) = 1  
       | resultArity (ColonMul _) = 1  
       | resultArity Cross = 1  
102        | resultArity (Norm _) = 1        | resultArity (Norm _) = 1
103        | resultArity (Normalize _) = 1        | resultArity (Normalize _) = 1
       | resultArity (Scale _) = 1  
104        | resultArity (PrincipleEvec _) = 1        | resultArity (PrincipleEvec _) = 1
105        | resultArity EigenVecs2x2 = 1        | resultArity EigenVecs2x2 = 1
106        | resultArity EigenVecs3x3 = 1        | resultArity EigenVecs3x3 = 1
107        | resultArity EigenVals2x2 = 1        | resultArity EigenVals2x2 = 1
108        | resultArity EigenVals3x3 = 1        | resultArity EigenVals3x3 = 1
       | resultArity (Identity _) = 1  
109        | resultArity (Zero _) = 1        | resultArity (Zero _) = 1
       | resultArity (Transpose _) = 1  
110        | resultArity (Select _) = 1        | resultArity (Select _) = 1
111        | resultArity (Index _) = 1        | resultArity (Index _) = 1
112        | resultArity (Subscript _) = 1        | resultArity (Subscript _) = 1
113          | resultArity (MkDynamic _) = 1
114          | resultArity (Append _) = 2
115          | resultArity (Prepend _) = 2
116          | resultArity (Concat _) = 2
117          | resultArity (Length _) = 1
118        | resultArity (Ceiling _) = 1        | resultArity (Ceiling _) = 1
119        | resultArity (Floor _) = 1        | resultArity (Floor _) = 1
120        | resultArity (Round _) = 1        | resultArity (Round _) = 1
# Line 137  Line 125 
125        | resultArity (LoadVoxels _) = 1        | resultArity (LoadVoxels _) = 1
126        | resultArity (PosToImgSpace _) = 1        | resultArity (PosToImgSpace _) = 1
127        | resultArity (TensorToWorldSpace _) = 1        | resultArity (TensorToWorldSpace _) = 1
       | resultArity (LoadImage _) = 1  
128        | resultArity (Inside _) = 1        | resultArity (Inside _) = 1
129        | resultArity (Input _) = 1        | resultArity (LoadSeq _) = 1
130        | resultArity (InputWithDefault _) = 1        | resultArity (LoadImage _) = 1
131          | resultArity (Input _) = 0
132        | resultArity (Print _) = 0        | resultArity (Print _) = 0
133    
134      fun arity (Add _) = 2      fun arity (IAdd _) = 2
135        | arity (Sub _) = 2        | arity (ISub _) = 2
136        | arity (Mul _) = 2        | arity (IMul _) = 2
137        | arity (Div _) = 2        | arity (IDiv _) = 2
138        | arity (Neg _) = 1        | arity (INeg _) = 1
139        | arity (Abs _) = 1        | arity (Abs _) = 1
140        | arity (LT _) = 2        | arity (LT _) = 2
141        | arity (LTE _) = 2        | arity (LTE _) = 2
# Line 160  Line 148 
148        | arity Min = 2        | arity Min = 2
149        | arity (Clamp _) = 3        | arity (Clamp _) = 3
150        | arity (Lerp _) = 3        | arity (Lerp _) = 3
       | arity (Dot _) = 2  
       | arity (MulVecMat _) = 2  
       | arity (MulMatVec _) = 2  
       | arity (MulMatMat _) = 2  
       | arity (MulVecTen3 _) = 2  
       | arity (MulTen3Vec _) = 2  
       | arity (ColonMul _) = 2  
       | arity Cross = 2  
151        | arity (Norm _) = 1        | arity (Norm _) = 1
152        | arity (Normalize _) = 1        | arity (Normalize _) = 1
       | arity (Scale _) = 2  
153        | arity (PrincipleEvec _) = 2        | arity (PrincipleEvec _) = 2
154        | arity EigenVecs2x2 = 1        | arity EigenVecs2x2 = 1
155        | arity EigenVecs3x3 = 1        | arity EigenVecs3x3 = 1
156        | arity EigenVals2x2 = 1        | arity EigenVals2x2 = 1
157        | arity EigenVals3x3 = 1        | arity EigenVals3x3 = 1
       | arity (Identity _) = 0  
158        | arity (Zero _) = 0        | arity (Zero _) = 0
       | arity (Transpose _) = 1  
159        | arity (Select _) = 1        | arity (Select _) = 1
160        | arity (Index _) = 1        | arity (Index _) = 1
161        | arity (Subscript _) = 2        | arity (Subscript _) = 2
162          | arity (MkDynamic _) = 1
163          | arity (Append _) = 1
164          | arity (Prepend _) = 1
165          | arity (Concat _) = 1
166          | arity (Length _) = 1
167        | arity (Ceiling _) = 1        | arity (Ceiling _) = 1
168        | arity (Floor _) = 1        | arity (Floor _) = 1
169        | arity (Round _) = 1        | arity (Round _) = 1
# Line 192  Line 174 
174        | arity (LoadVoxels _) = 1        | arity (LoadVoxels _) = 1
175        | arity (PosToImgSpace _) = 2        | arity (PosToImgSpace _) = 2
176        | arity (TensorToWorldSpace _) = 2        | arity (TensorToWorldSpace _) = 2
       | arity (LoadImage _) = 1  
177        | arity (Inside _) = 2        | arity (Inside _) = 2
178          | arity (LoadSeq _) = 0
179          | arity (LoadImage _) = 0
180        | arity (Input _) = 0        | arity (Input _) = 0
       | arity (InputWithDefault _) = 1  
181        | arity (Print _) = ~1        | arity (Print _) = ~1
182    
183      fun isPure (Print _) = false      fun isPure (MkDynamic _) = false
184          | isPure (Append _) = false
185          | isPure (Prepend _) = false
186          | isPure (Concat _) = false
187          | isPure (Print _) = false
188        | isPure _ = true        | isPure _ = true
189    
190      fun same (Add(a0), Add(b0)) = samety(a0, b0)      fun same (IAdd(a0), IAdd(b0)) = samety(a0, b0)
191        | same (Sub(a0), Sub(b0)) = samety(a0, b0)        | same (ISub(a0), ISub(b0)) = samety(a0, b0)
192        | same (Mul(a0), Mul(b0)) = samety(a0, b0)        | same (IMul(a0), IMul(b0)) = samety(a0, b0)
193        | same (Div(a0), Div(b0)) = samety(a0, b0)        | same (IDiv(a0), IDiv(b0)) = samety(a0, b0)
194        | same (Neg(a0), Neg(b0)) = samety(a0, b0)        | same (INeg(a0), INeg(b0)) = samety(a0, b0)
195        | same (Abs(a0), Abs(b0)) = samety(a0, b0)        | same (Abs(a0), Abs(b0)) = samety(a0, b0)
196        | same (LT(a0), LT(b0)) = samety(a0, b0)        | same (LT(a0), LT(b0)) = samety(a0, b0)
197        | same (LTE(a0), LTE(b0)) = samety(a0, b0)        | same (LTE(a0), LTE(b0)) = samety(a0, b0)
# Line 218  Line 204 
204        | same (Min, Min) = true        | same (Min, Min) = true
205        | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)        | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)
206        | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)        | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)
       | same (Dot(a0), Dot(b0)) = sameint(a0, b0)  
       | same (MulVecMat(a0,a1), MulVecMat(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)  
       | same (MulMatVec(a0,a1), MulMatVec(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)  
       | same (MulMatMat(a0,a1,a2), MulMatMat(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)  
       | same (MulVecTen3(a0,a1,a2), MulVecTen3(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)  
       | same (MulTen3Vec(a0,a1,a2), MulTen3Vec(b0,b1,b2)) = sameint(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)  
       | same (ColonMul(a0,a1), ColonMul(b0,b1)) = samety(a0, b0) andalso samety(a1, b1)  
       | same (Cross, Cross) = true  
207        | same (Norm(a0), Norm(b0)) = samety(a0, b0)        | same (Norm(a0), Norm(b0)) = samety(a0, b0)
208        | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)        | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)
       | same (Scale(a0), Scale(b0)) = samety(a0, b0)  
209        | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)        | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)
210        | same (EigenVecs2x2, EigenVecs2x2) = true        | same (EigenVecs2x2, EigenVecs2x2) = true
211        | same (EigenVecs3x3, EigenVecs3x3) = true        | same (EigenVecs3x3, EigenVecs3x3) = true
212        | same (EigenVals2x2, EigenVals2x2) = true        | same (EigenVals2x2, EigenVals2x2) = true
213        | same (EigenVals3x3, EigenVals3x3) = true        | same (EigenVals3x3, EigenVals3x3) = true
       | same (Identity(a0), Identity(b0)) = sameint(a0, b0)  
214        | same (Zero(a0), Zero(b0)) = samety(a0, b0)        | same (Zero(a0), Zero(b0)) = samety(a0, b0)
       | same (Transpose(a0,a1), Transpose(b0,b1)) = sameint(a0, b0) andalso sameint(a1, b1)  
215        | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)        | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
216        | same (Index(a0,a1), Index(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)        | same (Index(a0,a1), Index(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
217        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)
218          | same (MkDynamic(a0,a1), MkDynamic(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
219          | same (Append(a0), Append(b0)) = samety(a0, b0)
220          | same (Prepend(a0), Prepend(b0)) = samety(a0, b0)
221          | same (Concat(a0), Concat(b0)) = samety(a0, b0)
222          | same (Length(a0), Length(b0)) = samety(a0, b0)
223        | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)        | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)
224        | same (Floor(a0), Floor(b0)) = sameint(a0, b0)        | same (Floor(a0), Floor(b0)) = sameint(a0, b0)
225        | same (Round(a0), Round(b0)) = sameint(a0, b0)        | same (Round(a0), Round(b0)) = sameint(a0, b0)
# Line 250  Line 230 
230        | same (LoadVoxels(a0,a1), LoadVoxels(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)        | same (LoadVoxels(a0,a1), LoadVoxels(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
231        | same (PosToImgSpace(a0), PosToImgSpace(b0)) = ImageInfo.same(a0, b0)        | same (PosToImgSpace(a0), PosToImgSpace(b0)) = ImageInfo.same(a0, b0)
232        | same (TensorToWorldSpace(a0,a1), TensorToWorldSpace(b0,b1)) = ImageInfo.same(a0, b0) andalso samety(a1, b1)        | same (TensorToWorldSpace(a0,a1), TensorToWorldSpace(b0,b1)) = ImageInfo.same(a0, b0) andalso samety(a1, b1)
       | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)  
233        | same (Inside(a0,a1), Inside(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)        | same (Inside(a0,a1), Inside(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
234        | same (Input(a0,a1,a2), Input(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)        | same (LoadSeq(a0,a1), LoadSeq(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)
235        | same (InputWithDefault(a0,a1,a2), InputWithDefault(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)        | same (LoadImage(a0,a1,a2), LoadImage(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso ImageInfo.same(a2, b2)
236          | same (Input(a0), Input(b0)) = sameinput(a0, b0)
237        | same (Print(a0), Print(b0)) = sametys(a0, b0)        | same (Print(a0), Print(b0)) = sametys(a0, b0)
238        | same _ = false        | same _ = false
239    
240      fun hash (Add(a0)) = 0w3 + hashty a0      fun hash (IAdd(a0)) = 0w3 + hashty a0
241        | hash (Sub(a0)) = 0w5 + hashty a0        | hash (ISub(a0)) = 0w5 + hashty a0
242        | hash (Mul(a0)) = 0w7 + hashty a0        | hash (IMul(a0)) = 0w7 + hashty a0
243        | hash (Div(a0)) = 0w11 + hashty a0        | hash (IDiv(a0)) = 0w11 + hashty a0
244        | hash (Neg(a0)) = 0w13 + hashty a0        | hash (INeg(a0)) = 0w13 + hashty a0
245        | hash (Abs(a0)) = 0w17 + hashty a0        | hash (Abs(a0)) = 0w17 + hashty a0
246        | hash (LT(a0)) = 0w19 + hashty a0        | hash (LT(a0)) = 0w19 + hashty a0
247        | hash (LTE(a0)) = 0w23 + hashty a0        | hash (LTE(a0)) = 0w23 + hashty a0
# Line 274  Line 254 
254        | hash Min = 0w53        | hash Min = 0w53
255        | hash (Clamp(a0)) = 0w59 + hashty a0        | hash (Clamp(a0)) = 0w59 + hashty a0
256        | hash (Lerp(a0)) = 0w61 + hashty a0        | hash (Lerp(a0)) = 0w61 + hashty a0
257        | hash (Dot(a0)) = 0w67 + hashint a0        | hash (Norm(a0)) = 0w67 + hashty a0
258        | hash (MulVecMat(a0,a1)) = 0w71 + hashint a0 + hashint a1        | hash (Normalize(a0)) = 0w71 + hashint a0
259        | hash (MulMatVec(a0,a1)) = 0w73 + hashint a0 + hashint a1        | hash (PrincipleEvec(a0)) = 0w73 + hashty a0
260        | hash (MulMatMat(a0,a1,a2)) = 0w79 + hashint a0 + hashint a1 + hashint a2        | hash EigenVecs2x2 = 0w79
261        | hash (MulVecTen3(a0,a1,a2)) = 0w83 + hashint a0 + hashint a1 + hashint a2        | hash EigenVecs3x3 = 0w83
262        | hash (MulTen3Vec(a0,a1,a2)) = 0w89 + hashint a0 + hashint a1 + hashint a2        | hash EigenVals2x2 = 0w89
263        | hash (ColonMul(a0,a1)) = 0w97 + hashty a0 + hashty a1        | hash EigenVals3x3 = 0w97
264        | hash Cross = 0w101        | hash (Zero(a0)) = 0w101 + hashty a0
265        | hash (Norm(a0)) = 0w103 + hashty a0        | hash (Select(a0,a1)) = 0w103 + hashty a0 + hashint a1
266        | hash (Normalize(a0)) = 0w107 + hashint a0        | hash (Index(a0,a1)) = 0w107 + hashty a0 + hashint a1
267        | hash (Scale(a0)) = 0w109 + hashty a0        | hash (Subscript(a0)) = 0w109 + hashty a0
268        | hash (PrincipleEvec(a0)) = 0w113 + hashty a0        | hash (MkDynamic(a0,a1)) = 0w113 + hashty a0 + hashint a1
269        | hash EigenVecs2x2 = 0w127        | hash (Append(a0)) = 0w127 + hashty a0
270        | hash EigenVecs3x3 = 0w131        | hash (Prepend(a0)) = 0w131 + hashty a0
271        | hash EigenVals2x2 = 0w137        | hash (Concat(a0)) = 0w137 + hashty a0
272        | hash EigenVals3x3 = 0w139        | hash (Length(a0)) = 0w139 + hashty a0
273        | hash (Identity(a0)) = 0w149 + hashint a0        | hash (Ceiling(a0)) = 0w149 + hashint a0
274        | hash (Zero(a0)) = 0w151 + hashty a0        | hash (Floor(a0)) = 0w151 + hashint a0
275        | hash (Transpose(a0,a1)) = 0w157 + hashint a0 + hashint a1        | hash (Round(a0)) = 0w157 + hashint a0
276        | hash (Select(a0,a1)) = 0w163 + hashty a0 + hashint a1        | hash (Trunc(a0)) = 0w163 + hashint a0
277        | hash (Index(a0,a1)) = 0w167 + hashty a0 + hashint a1        | hash IntToReal = 0w167
278        | hash (Subscript(a0)) = 0w173 + hashty a0        | hash (RealToInt(a0)) = 0w173 + hashint a0
279        | hash (Ceiling(a0)) = 0w179 + hashint a0        | hash (ImageAddress(a0)) = 0w179 + ImageInfo.hash a0
280        | hash (Floor(a0)) = 0w181 + hashint a0        | hash (LoadVoxels(a0,a1)) = 0w181 + ImageInfo.hash a0 + hashint a1
281        | hash (Round(a0)) = 0w191 + hashint a0        | hash (PosToImgSpace(a0)) = 0w191 + ImageInfo.hash a0
282        | hash (Trunc(a0)) = 0w193 + hashint a0        | hash (TensorToWorldSpace(a0,a1)) = 0w193 + ImageInfo.hash a0 + hashty a1
283        | hash IntToReal = 0w197        | hash (Inside(a0,a1)) = 0w197 + ImageInfo.hash a0 + hashint a1
284        | hash (RealToInt(a0)) = 0w199 + hashint a0        | hash (LoadSeq(a0,a1)) = 0w199 + hashty a0 + hashstring a1
285        | hash (ImageAddress(a0)) = 0w211 + ImageInfo.hash a0        | hash (LoadImage(a0,a1,a2)) = 0w211 + hashty a0 + hashstring a1 + ImageInfo.hash a2
286        | hash (LoadVoxels(a0,a1)) = 0w223 + ImageInfo.hash a0 + hashint a1        | hash (Input(a0)) = 0w223 + hashinput a0
287        | hash (PosToImgSpace(a0)) = 0w227 + ImageInfo.hash a0        | hash (Print(a0)) = 0w227 + hashtys a0
       | hash (TensorToWorldSpace(a0,a1)) = 0w229 + ImageInfo.hash a0 + hashty a1  
       | hash (LoadImage(a0)) = 0w233 + ImageInfo.hash a0  
       | hash (Inside(a0,a1)) = 0w239 + ImageInfo.hash a0 + hashint a1  
       | hash (Input(a0,a1,a2)) = 0w241 + hashty a0 + hashstring a1 + hashstring a2  
       | hash (InputWithDefault(a0,a1,a2)) = 0w251 + hashty a0 + hashstring a1 + hashstring a2  
       | hash (Print(a0)) = 0w257 + hashtys a0  
288    
289      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (IAdd(a0)) = concat["IAdd<", tyToString a0, ">"]
290        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (ISub(a0)) = concat["ISub<", tyToString a0, ">"]
291        | toString (Mul(a0)) = concat["Mul<", tyToString a0, ">"]        | toString (IMul(a0)) = concat["IMul<", tyToString a0, ">"]
292        | toString (Div(a0)) = concat["Div<", tyToString a0, ">"]        | toString (IDiv(a0)) = concat["IDiv<", tyToString a0, ">"]
293        | toString (Neg(a0)) = concat["Neg<", tyToString a0, ">"]        | toString (INeg(a0)) = concat["INeg<", tyToString a0, ">"]
294        | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]        | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]
295        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
296        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
# Line 329  Line 303 
303        | toString Min = "Min"        | toString Min = "Min"
304        | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]        | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]
305        | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]        | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]
       | toString (Dot(a0)) = concat["Dot<", intToString a0, ">"]  
       | toString (MulVecMat(a0,a1)) = concat["MulVecMat<", intToString a0, ",", intToString a1, ">"]  
       | toString (MulMatVec(a0,a1)) = concat["MulMatVec<", intToString a0, ",", intToString a1, ">"]  
       | toString (MulMatMat(a0,a1,a2)) = concat["MulMatMat<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]  
       | toString (MulVecTen3(a0,a1,a2)) = concat["MulVecTen3<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]  
       | toString (MulTen3Vec(a0,a1,a2)) = concat["MulTen3Vec<", intToString a0, ",", intToString a1, ",", intToString a2, ">"]  
       | toString (ColonMul(a0,a1)) = concat["ColonMul<", tyToString a0, ",", tyToString a1, ">"]  
       | toString Cross = "Cross"  
306        | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]        | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]
307        | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]        | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]
       | toString (Scale(a0)) = concat["Scale<", tyToString a0, ">"]  
308        | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]        | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]
309        | toString EigenVecs2x2 = "EigenVecs2x2"        | toString EigenVecs2x2 = "EigenVecs2x2"
310        | toString EigenVecs3x3 = "EigenVecs3x3"        | toString EigenVecs3x3 = "EigenVecs3x3"
311        | toString EigenVals2x2 = "EigenVals2x2"        | toString EigenVals2x2 = "EigenVals2x2"
312        | toString EigenVals3x3 = "EigenVals3x3"        | toString EigenVals3x3 = "EigenVals3x3"
       | toString (Identity(a0)) = concat["Identity<", intToString a0, ">"]  
313        | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]        | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]
       | toString (Transpose(a0,a1)) = concat["Transpose<", intToString a0, ",", intToString a1, ">"]  
314        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]
315        | toString (Index(a0,a1)) = concat["Index<", tyToString a0, ",", intToString a1, ">"]        | toString (Index(a0,a1)) = concat["Index<", tyToString a0, ",", intToString a1, ">"]
316        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]
317          | toString (MkDynamic(a0,a1)) = concat["MkDynamic<", tyToString a0, ",", intToString a1, ">"]
318          | toString (Append(a0)) = concat["Append<", tyToString a0, ">"]
319          | toString (Prepend(a0)) = concat["Prepend<", tyToString a0, ">"]
320          | toString (Concat(a0)) = concat["Concat<", tyToString a0, ">"]
321          | toString (Length(a0)) = concat["Length<", tyToString a0, ">"]
322        | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]        | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]
323        | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]        | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]
324        | toString (Round(a0)) = concat["Round<", intToString a0, ">"]        | toString (Round(a0)) = concat["Round<", intToString a0, ">"]
# Line 361  Line 329 
329        | toString (LoadVoxels(a0,a1)) = concat["LoadVoxels<", ImageInfo.toString a0, ",", intToString a1, ">"]        | toString (LoadVoxels(a0,a1)) = concat["LoadVoxels<", ImageInfo.toString a0, ",", intToString a1, ">"]
330        | toString (PosToImgSpace(a0)) = concat["PosToImgSpace<", ImageInfo.toString a0, ">"]        | toString (PosToImgSpace(a0)) = concat["PosToImgSpace<", ImageInfo.toString a0, ">"]
331        | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"]        | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"]
       | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]  
332        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]
333        | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]        | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]
334        | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]        | toString (LoadImage(a0,a1,a2)) = concat["LoadImage<", tyToString a0, ",", stringToString a1, ",", ImageInfo.toString a2, ">"]
335          | toString (Input(a0)) = concat["Input<", inputToString a0, ">"]
336        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
337    
338    end    end

Legend:
Removed from v.2377  
changed lines
  Added in v.2400

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