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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/high-to-mid/probe-ein.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/high-to-mid/probe-ein.sml

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

revision 4013, Tue Jun 21 17:16:47 2016 UTC revision 4014, Tue Jun 21 18:58:13 2016 UTC
# Line 56  Line 56 
56                  ])                  ])
57            (* end case *))            (* end case *))
58    
59      fun getImagInfo e = (case IR.Var.getDef e    (* get the image referenced on a RHS and its border control (if any) *)
60             of IR.OP(Op.LoadImage(Ty.ImageTy info, _), []) => (e, info, NONE)      fun getImagInfo x = (case V.getDef x
61              | IR.OP(Op.BorderCtlDefault info, [imgArg]) =>             of IR.GLOBAL gv => let
62                  (imgArg, info, raise Fail "Default boarder control")                  val Ty.ImageTy info = IR.GlobalVar.ty gv
63              | IR.OP(Op.BorderCtlClamp info, [imgArg]) => (imgArg, info, SOME IndexCtl.Clamp)                  in
64              | IR.OP(Op.BorderCtlMirror info, [imgArg]) => (imgArg, info, SOME IndexCtl.Mirror)                    (x, info, NONE)
65              | IR.OP(Op.BorderCtlWrap info, [imgArg]) => (imgArg, info, SOME IndexCtl.Wrap)                  end
66                | IR.OP(Op.BorderCtlDefault info, [img, v]) =>
67                    (img, info, raise Fail "Default boarder control")
68                | IR.OP(Op.BorderCtlClamp info, [img]) => (img, info, SOME IndexCtl.Clamp)
69                | IR.OP(Op.BorderCtlMirror info, [img]) => (img, info, SOME IndexCtl.Mirror)
70                | IR.OP(Op.BorderCtlWrap info, [img]) => (img, info, SOME IndexCtl.Wrap)
71                | IR.OP(Op.LoadImage(Ty.ImageTy info, _), _) => (x, info, NONE)
72              | rhs => raise Fail (String.concat[              | rhs => raise Fail (String.concat[
73                    "expected image for ", IR.Var.toString e, " but found ", IR.RHS.toString rhs                    "expected image for ", V.toString x, " but found ", IR.RHS.toString rhs
74                  ])                  ])
75            (* end case *))            (* end case *))
76    

Legend:
Removed from v.4013  
changed lines
  Added in v.4014

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