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/vector-layout.sml
ViewVC logotype

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

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

revision 3834, Sat May 7 18:39:53 2016 UTC revision 3854, Fri May 13 19:21:27 2016 UTC
# Line 45  Line 45 
45           *)           *)
46            fun find (n, []) = raise Fail "impossible"            fun find (n, []) = raise Fail "impossible"
47              | find (n, [sz]) = sz              | find (n, [sz]) = sz
48              | find (sz::szs) = if (n <= sz) then sz else find(n, szs)              | find (n, sz::szs) = if (n <= sz) then sz else find(n, szs)
49          (* split n into pieces *)          (* split n into pieces *)
50            fun split (n, pieces) = let            fun split (n, pieces) = let
51                  val sz = find (n, sizes)                  val sz = find (n, sizes)
# Line 77  Line 77 
77      end (* local *)      end (* local *)
78    
79      fun valid (sizes : int list) = let      fun valid (sizes : int list) = let
80            fun validSize sz = List.exists (op =) sizes            fun validSize sz = List.exists (fn sz' => (sz = sz')) sizes
81            fun check {wid, padded, pieces} = let            fun check {wid, padded, pieces} = let
82                  fun chkPieces ([], totWid) =                  fun chkPieces ([], totWid) =
83                        (wid = totWid) orelse (padded andalso (wid < totWid))                        (wid = totWid) orelse (padded andalso (wid < totWid))

Legend:
Removed from v.3834  
changed lines
  Added in v.3854

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