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

SCM Repository

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

Diff of /branches/pure-cfg/src/compiler/high-to-mid/probe.sml

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

revision 605, Fri Mar 11 18:49:33 2011 UTC revision 606, Fri Mar 11 19:25:02 2011 UTC
# Line 61  Line 61 
61                    mkVar (0, l, [])                    mkVar (0, l, [])
62                  end                  end
63  val _ = print(concat["probeElem: ", Partials.partialToString pdOp, " in ", Int.toString(List.length convCoeffs), "D space\n"])  val _ = print(concat["probeElem: ", Partials.partialToString pdOp, " in ", Int.toString(List.length convCoeffs), "D space\n"])
64          (* for each dimension, we evaluate the kernel at the coordinates for that axis *)          (* for each dimension in space, we evaluate the kernel at the coordinates for that axis. *)
65            val coeffCode = let            val coeffCode = let
66                  fun gen (x, k, (d, code)) = let                  fun gen (x, k, (d, code)) = let
                       val d = d-1  
67                        val fd = newVar_dim ("f", d, DstTy.realTy)                        val fd = newVar_dim ("f", d, DstTy.realTy)
68                        val a = DstV.new ("a", vecsTy)                        val a = DstV.new ("a", vecsTy)
69                        val tmps = List.tabulate(2*s,                        val tmps = List.tabulate(2*s,
# Line 84  Line 83 
83                              assign(fd, DstOp.Select(DstTy.VecTy dim, d), [f]) ::                              assign(fd, DstOp.Select(DstTy.VecTy dim, d), [f]) ::
84                                List.foldr mkArg code tmps                                List.foldr mkArg code tmps
85                        in                        in
86                          (d, code)                          (d+1, code)
87                        end                        end
88                  val Partials.D l = pdOp                  val Partials.D l = pdOp
89                  in                  in
90                    #2 (ListPair.foldr gen (dim, []) (convCoeffs, l))                  (* we iterate from fastest to slowest axis *)
91                      #2 (ListPair.foldr gen (0, []) (convCoeffs, l))
92                  end                  end
93          (* generate the reduction code *)          (* generate the reduction code *)
94            fun genReduce (result, [hh], IT.LF{vox, offsets}, code) =            fun genReduce (result, [hh], IT.LF{vox, offsets}, code) =

Legend:
Removed from v.605  
changed lines
  Added in v.606

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