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 3788, Thu Apr 28 15:32:43 2016 UTC revision 3789, Thu Apr 28 16:51:48 2016 UTC
# Line 125  Line 125 
125              (* end case *)              (* end case *)
126            end            end
127    
128    (* FIXME: what does this do??? *)    (* mkLdVoxel creates load voxel operator to represent image addressing *)
129      fun mkLdVoxel (avail, vI, vN, info, alpha, shape, dim, s, border) = let      fun mkLdVoxel (avail, vI, vN, info, alpha, shape, dim, s, border) = let
130         (* creates lb int *)         (* creates lb int *)
131           val vLb = AvailRHS.addAssign (avail, "lit", Ty.intTy,  IR.LIT(Literal.Int (1-(IntInf.fromInt s))))           val vLb = AvailRHS.addAssign (avail, "lit", Ty.intTy,  IR.LIT(Literal.Int (1-(IntInf.fromInt s))))
132             val seqTy = Ty.SeqTy(Ty.intTy, SOME dim)
133         (*created n_0 +lb, n_1+lb*)         (*created n_0 +lb, n_1+lb*)
134           fun f i = let           fun f i = let
135                val vA = AvailRHS.addAssign (                val vA = AvailRHS.addAssign (
136                      avail, "idx", Ty.intTy,  IR.LIT(Literal.Int (IntInf.fromInt i)))                      avail, "idx", Ty.intTy,  IR.LIT(Literal.Int (IntInf.fromInt i)))
137                val vB = AvailRHS.addAssign (                val vB = AvailRHS.addAssign (
138                      avail, "subscript",                      avail, "subscript",
139                      Ty.intTy, IR.OP(Op.Subscript(Ty.SeqTy(Ty.intTy, SOME dim)), [vN, vA]))                      Ty.intTy, IR.OP(Op.Subscript seqTy, [vN, vA]))
140                in                in
141                  AvailRHS.addAssign (avail, "add", Ty.intTy, IR.OP(Op.IAdd, [vB, vLb]))                  AvailRHS.addAssign (avail, "add", Ty.intTy, IR.OP(Op.IAdd, [vB, vLb]))
142                end                end
# Line 144  Line 145 
145            val supportshape =  List.tabulate(dim, fn _ => s')            val supportshape =  List.tabulate(dim, fn _ => s')
146            val ldty = Ty.TensorTy (shape@supportshape)            val ldty = Ty.TensorTy (shape@supportshape)
147            val vNs = List.tabulate( dim, fn n => f n)            val vNs = List.tabulate( dim, fn n => f n)
148              val aTy =  Ty.TensorTy[dim]
149            val vSq = AvailRHS.addAssign (            val vSq = AvailRHS.addAssign (
150                  avail, "seq",                  avail, "seq",
151  (* FIXME: where does this "9" come from??? *)                  seqTy, IR.SEQ(vNs, MidTypes.SeqTy(MidTypes.IntTy, SOME dim)))
                 Ty.TensorTy[9], IR.SEQ(vNs, MidTypes.SeqTy(MidTypes.IntTy, SOME dim)))  
152            val op1 = (case border            val op1 = (case border
153                   of NONE => Op.LoadVoxels (info, 2*s)                   of NONE => Op.LoadVoxels (info, 2*s)
154                    | SOME b => Op.LoadVoxelsWithCtl (info, 2*s, b)                    | SOME b => Op.LoadVoxelsWithCtl (info, 2*s, b)

Legend:
Removed from v.3788  
changed lines
  Added in v.3789

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