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

SCM Repository

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

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

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

revision 2824, Mon Nov 10 17:06:01 2014 UTC revision 2825, Mon Nov 10 21:06:31 2014 UTC
# Line 72  Line 72 
72              | Op.Zero ty => (ty, [])              | Op.Zero ty => (ty, [])
73              | Op.Trace d => (Ty.realTy, [Ty.TensorTy[d, d]])              | Op.Trace d => (Ty.realTy, [Ty.TensorTy[d, d]])
74              | Op.Transpose(d1, d2) => (Ty.TensorTy[d2, d1], [Ty.TensorTy[d1, d2]])              | Op.Transpose(d1, d2) => (Ty.TensorTy[d2, d1], [Ty.TensorTy[d1, d2]])
75                | Op.Slice(ty as Ty.TensorTy dd, m) => let
76                    val (resDims, idxDims) = let
77                          fun f (d, false, (rds, ids)) = (d::rds, ids)
78                            | f (_, true, (rds, ids)) = (rds, Ty.IntTy::ids)
79                          in
80                            ListPair.foldr f ([], []) (dd, m)
81                          end
82                    in
83                      (Ty.TensorTy resDims, ty::idxDims)
84                    end
85              | 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])
86              | Op.Index(ty as Ty.TensorTy[d], _) => (Ty.realTy, [ty])              | Op.Index(ty as Ty.TensorTy[d], _) => (Ty.realTy, [ty])
87              | Op.Index(ty as Ty.SeqTy(elemTy, _), _) => (elemTy, [ty])              | Op.Index(ty as Ty.SeqTy(elemTy, _), _) => (elemTy, [ty])

Legend:
Removed from v.2824  
changed lines
  Added in v.2825

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