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/check-tree.sml
ViewVC logotype

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

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

revision 3882, Thu May 19 19:50:46 2016 UTC revision 3886, Fri May 20 15:10:11 2016 UTC
# Line 142  Line 142 
142                  val dim = ImageInfo.dim info                  val dim = ImageInfo.dim info
143                  in                  in
144                    if (dim = 1)                    if (dim = 1)
145                      then (Ty.TensorTy[], [Ty.ImageTy info])                      then (Ty.realTy, [Ty.ImageTy info])
146                      else (Ty.TensorTy[dim, dim], [Ty.ImageTy info])                      else (Ty.TensorTy[dim, dim], [Ty.ImageTy info])
147                  end                  end
148              | Op.Translate info => let              | Op.Translate info => let
149                  val dim = ImageInfo.dim info                  val dim = ImageInfo.dim info
150                  in                  in
151                    if (dim = 1)                    if (dim = 1)
152                      then (Ty.TensorTy[], [Ty.ImageTy info])                      then (Ty.realTy, [Ty.ImageTy info])
153                      else (Ty.TensorTy[dim], [Ty.ImageTy info])                      else (Ty.TensorTy[dim], [Ty.ImageTy info])
154                  end                  end
155              | Op.ControlIndex(info, _, _) => (Ty.IntTy, [Ty.ImageTy info, Ty.IntTy])              | Op.ControlIndex(info, _, _) => (Ty.IntTy, [Ty.ImageTy info, Ty.IntTy])
# Line 157  Line 157 
157              | Op.Inside(info, _) =>              | Op.Inside(info, _) =>
158                  (Ty.BoolTy, [Ty.SeqTy(Ty.IntTy, SOME(ImageInfo.dim info)), Ty.ImageTy info])                  (Ty.BoolTy, [Ty.SeqTy(Ty.IntTy, SOME(ImageInfo.dim info)), Ty.ImageTy info])
159              | Op.ImageDim(info, _) => (Ty.IntTy, [Ty.ImageTy info])              | Op.ImageDim(info, _) => (Ty.IntTy, [Ty.ImageTy info])
             | Op.LoadSeq(ty, _) => (ty, [])  
             | Op.LoadImage(ty, _) => (ty, [])  
160              | Op.MathFn f => MathFns.sigOf (Ty.realTy, f)              | Op.MathFn f => MathFns.sigOf (Ty.realTy, f)
161              | _ => raise Fail("sigOf: invalid operator " ^ Op.toString rator)              | _ => raise Fail("sigOf: invalid operator " ^ Op.toString rator)
162            (* end case *))            (* end case *))

Legend:
Removed from v.3882  
changed lines
  Added in v.3886

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