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

SCM Repository

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

Diff of /branches/vis12/src/compiler/cl-target/cl-target.sml

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

revision 1717, Sat Mar 10 19:44:29 2012 UTC revision 1718, Sat Mar 10 23:03:02 2012 UTC
# Line 327  Line 327 
327    
328        (* create and register the initially function for a program *)        (* create and register the initially function for a program *)
329          fun initially {          fun initially {
330                prog = Prog{strands, initially, numDims, ...},                prog = Prog{tgt, strands, initially, numDims, ...},
331                isArray : bool,                isArray : bool,
332                iterPrefix : stm list,                iterPrefix : stm list,
333                iters : (var * exp * exp) list,                iters : (var * exp * exp) list,
# Line 337  Line 337 
337              } = let              } = let
338                val name = Atom.toString strand                val name = Atom.toString strand
339                val nDims = List.length iters                val nDims = List.length iters
340                val worldTy = CL.T_Ptr(CL.T_Named N.worldTy)                val worldTy = CL.T_Ptr(CL.T_Named(N.worldTy tgt))
341                fun mapi f xs = let                fun mapi f xs = let
342                      fun mapf (_, []) = []                      fun mapf (_, []) = []
343                        | mapf (i, x::xs) = f(i, x) :: mapf(i+1, xs)                        | mapf (i, x::xs) = f(i, x) :: mapf(i+1, xs)
# Line 395  Line 395 
395                      allocCode @                      allocCode @
396                      iterCode @                      iterCode @
397                      [CL.mkReturn(SOME(CL.mkVar "wrld"))])                      [CL.mkReturn(SOME(CL.mkVar "wrld"))])
398                val initFn = CL.D_Func([], worldTy, N.initially, [], body)                val initFn = CL.D_Func([], worldTy, N.initially tgt, [], body)
399                in                in
400                  numDims := nDims;                  numDims := nDims;
401                  initially := initFn                  initially := initFn

Legend:
Removed from v.1717  
changed lines
  Added in v.1718

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