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

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/low-il/check-low-il.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/low-il/check-low-il.sml

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

revision 2821, Sun Nov 9 02:34:48 2014 UTC revision 2822, Sun Nov 9 02:36:50 2014 UTC
# Line 73  Line 73 
73              | Op.Identity d => (Ty.TensorTy[d,d], [])              | Op.Identity d => (Ty.TensorTy[d,d], [])
74              | Op.Zero ty => (ty, [])              | Op.Zero ty => (ty, [])
75              | Op.Transpose(d1, d2) => (Ty.TensorTy[d2, d1], [Ty.TensorTy[d1, d2]])              | Op.Transpose(d1, d2) => (Ty.TensorTy[d2, d1], [Ty.TensorTy[d1, d2]])
76                | Op.Slice(ty as Ty.TensorTy dd, m) => let
77                    val (resDims, idxDims) = let
78                          fun f (d, false, (rds, ids)) = (d::rds, ids)
79                            | f (_, true, (rds, ids)) = (rds, Ty.IntTy::ids)
80                          in
81                            ListPair.foldr f ([], []) (dd, m)
82                          end
83                    in
84                      (Ty.TensorTy resDims, ty::idxDims)
85                    end
86              | Op.Select(ty as Ty.TupleTy tys, i) => (List.nth(tys, i-1), [ty])              | Op.Select(ty as Ty.TupleTy tys, i) => (List.nth(tys, i-1), [ty])
87              | Op.Index(ty as Ty.TensorTy[d], _) => (Ty.realTy, [ty])              | Op.Index(ty as Ty.TensorTy[d], _) => (Ty.realTy, [ty])
88              | Op.Index(ty as Ty.SeqTy(elemTy, _), _) => (elemTy, [ty])              | Op.Index(ty as Ty.SeqTy(elemTy, _), _) => (elemTy, [ty])

Legend:
Removed from v.2821  
changed lines
  Added in v.2822

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