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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/low-opt/low-contract.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/low-opt/low-contract.sml

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

revision 3890, Sat May 21 15:15:55 2016 UTC revision 3891, Sat May 21 16:19:41 2016 UTC
# Line 105  Line 105 
105                        SOME[(lhs, IR.VAR(use x))])                        SOME[(lhs, IR.VAR(use x))])
106                    | get (ix::ixs, d::ds, x) = (case getLocalDef x                    | get (ix::ixs, d::ds, x) = (case getLocalDef x
107                         of IR.CONS(ys, _) => get(ixs, ds, List.nth(ys, ix))                         of IR.CONS(ys, _) => get(ixs, ds, List.nth(ys, ix))
108                          | _ => SOME[                          | _ => let
109                                (lhs, IR.OP(Op.TensorIndex(Ty.tensorTy(d::ds), ix::ixs), [use x]))                              val rator = if List.null ds
110                              ]                                    then Op.VIndex(d, ix)
111                                      else Op.TensorIndex(Ty.tensorTy(d::ds), ix::ixs)
112                                in
113                                  SOME[(lhs, IR.OP(rator, [use x]))]
114                                end
115                        (* end case *))                        (* end case *))
116                    | get _ = raise Fail "malformed TensorIndex"                    | get _ = raise Fail "malformed TensorIndex"
117                  in                  in

Legend:
Removed from v.3890  
changed lines
  Added in v.3891

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