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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/tree-ir/tree-types.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/tree-ir/tree-types.sml

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

revision 3918, Mon May 30 06:31:35 2016 UTC revision 3919, Mon May 30 06:53:48 2016 UTC
# Line 52  Line 52 
52              toVecs (#wid layout, #pieces layout)              toVecs (#wid layout, #pieces layout)
53            end            end
54    
55      (* return the unpadded width of the n'th component of a vector layout *)
56        fun nthWidth (layout : vec_layout, n) = let
57              fun get (_, _, []) =
58                    raise Fail(concat["nthWidth(", layoutToString layout, ", ", Int.toString n, ")"])
59                | get (0, wid, _) = wid
60                | get (n, wid, w::ws) = get (n-1, wid-w, ws)
61              in
62                get (n, #wid layout, #pieces layout)
63              end
64    
65    (* return the n'th component of a vector layout as a vector type. *)    (* return the n'th component of a vector layout as a vector type. *)
66      fun nthVec (layout : vec_layout, n) = let      fun nthVec (layout : vec_layout, n) = let
67            fun get (_, _, []) =            fun get (_, _, []) =

Legend:
Removed from v.3918  
changed lines
  Added in v.3919

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