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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/gen/ir/high-ir.in
ViewVC logotype

Diff of /branches/vis15/src/compiler/gen/ir/high-ir.in

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

revision 3475, Wed Dec 2 18:48:58 2015 UTC revision 3797, Mon May 2 21:10:12 2016 UTC
# Line 23  Line 23 
23      type tys = ty list      type tys = ty list
24      fun sametys (tys1, tys2) = ListPair.allEq samety (tys1, tys2)      fun sametys (tys1, tys2) = ListPair.allEq samety (tys1, tys2)
25      fun hashtys tys = List.foldl (fn (ty, s) => hashty ty + 0w3 * s) 0w0 tys      fun hashtys tys = List.foldl (fn (ty, s) => hashty ty + 0w3 * s) 0w0 tys
26      fun tysToString tys = String.concat["[", String.concatWith "," (List.map tyToString tys), "]" ]      fun tysToString tys = String.concat["[", String.concatWithMap "," tyToString tys, "]" ]
27    
28    (* required helper functions for the int type *)    (* required helper functions for the int type *)
29      fun sameint (i1 : int, i2) = (i1 = i2)      fun sameint (i1 : int, i2) = (i1 = i2)
# Line 36  Line 36 
36      fun stringToString s = String.concat["\"", s, "\""]      fun stringToString s = String.concat["\"", s, "\""]
37    
38    (* required helper functions for the mask type *)    (* required helper functions for the mask type *)
39      type mask = bool list      type mask = TensorSlice.t
40      val samemask : (mask * mask -> bool) = (op =)      val samemask = TensorSlice.same
41      fun hashmask m =      val hashmask = TensorSlice.hash
42            List.foldl (fn (false, w) => w+w | (true, w) => w+w+0w1)      val maskToString = TensorSlice.toString
43              (Word.fromInt(List.length m)) m  
44      fun maskToString m =    (* required helper functions for the shape type *)
45            String.concat(List.map (fn true => "_" | false => ":") m)      type shape = TensorShape.t
46        val sameshape = TensorShape.same
47    (* required helper functions for the input type *)      val hashshape = TensorShape.hash
48      type input = ty Inputs.input      val shapeToString = TensorShape.toString
     val sameinput = Inputs.same  
     val hashinput = Inputs.hash  
     val inputToString = Inputs.toString  
49    
50  @BODY@  @BODY@
51    
52    end    end
53    
54  structure HighIR = SSAFn(  structure HighIR = SSAFn(
55    val ilName = "high-ir"    val irName = "high-ir"
56    structure Ty = HighTypes    structure Ty = HighTypes
57    structure Op = HighOps)    structure Op = HighOps)
58    

Legend:
Removed from v.3475  
changed lines
  Added in v.3797

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