Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/tree-il/tree-ops.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/tree-il/tree-ops.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2691, Fri Sep 5 01:59:12 2014 UTC revision 2791, Wed Oct 29 16:56:19 2014 UTC
# Line 42  Line 42 
42        | INeg        | INeg
43        | C of int        | C of int
44        | IndexTensor of int * ty * ty * ty        | IndexTensor of int * ty * ty * ty
45          | ProjectTensor of  int *  int
46        | addSca        | addSca
47        | subSca        | subSca
48        | prodSca        | prodSca
# Line 106  Line 107 
107        | resultArity INeg = 1        | resultArity INeg = 1
108        | resultArity (C _) = 1        | resultArity (C _) = 1
109        | resultArity (IndexTensor _) = 1        | resultArity (IndexTensor _) = 1
110             | resultArity (ProjectTensor _) = 1
111        | resultArity addSca = 1        | resultArity addSca = 1
112        | resultArity subSca = 1        | resultArity subSca = 1
113        | resultArity prodSca = 1        | resultArity prodSca = 1
# Line 171  Line 173 
173        | arity INeg = 1        | arity INeg = 1
174        | arity (C _) = 2        | arity (C _) = 2
175        | arity (IndexTensor _) = 2        | arity (IndexTensor _) = 2
176     | arity (ProjectTensor _) = 2
177        | arity addSca = 2        | arity addSca = 2
178        | arity subSca = 2        | arity subSca = 2
179        | arity prodSca = 2        | arity prodSca = 2
# Line 242  Line 245 
245        | same (INeg, INeg) = true        | same (INeg, INeg) = true
246        | same (C(a0), C(b0)) = sameint(a0, b0)        | same (C(a0), C(b0)) = sameint(a0, b0)
247        | 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)
248      | same (ProjectTensor(a0,a1), ProjectTensor(b0,b1)) =  sameint(a0, b0) andalso sameint(a1, b1)
249        | same (addSca, addSca) = true        | same (addSca, addSca) = true
250        | same (subSca, subSca) = true        | same (subSca, subSca) = true
251        | same (prodSca, prodSca) = true        | same (prodSca, prodSca) = true
# Line 306  Line 310 
310        | hash INeg = 0w13        | hash INeg = 0w13
311        | hash (C(a0)) = 0w17 + hashint a0        | hash (C(a0)) = 0w17 + hashint a0
312        | hash (IndexTensor(a0,a1,a2,a3)) = 0w19 + hashint a0 + hashty a1 + hashty a2 + hashty a3        | hash (IndexTensor(a0,a1,a2,a3)) = 0w19 + hashint a0 + hashty a1 + hashty a2 + hashty a3
313             | hash (ProjectTensor(a0,a1)) = 0w19 + hashint a0 +hashint a1
314        | hash addSca = 0w23        | hash addSca = 0w23
315        | hash subSca = 0w29        | hash subSca = 0w29
316        | hash prodSca = 0w31        | hash prodSca = 0w31
# Line 370  Line 375 
375        | toString INeg = "INeg"        | toString INeg = "INeg"
376        | toString (C(a0)) = concat["C<", intToString a0, ">"]        | toString (C(a0)) = concat["C<", intToString a0, ">"]
377        | 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, ">"]
378           | toString (ProjectTensor(a0,a1)) = concat["ProjectTensor",intToString a0,"<", intToString a1,  ">"]
379        | toString addSca = "addSca"        | toString addSca = "addSca"
380        | toString subSca = "subSca"        | toString subSca = "subSca"
381        | toString prodSca = "prodSca"        | toString prodSca = "prodSca"

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

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