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

SCM Repository

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

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

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

revision 1758, Thu Mar 22 04:09:05 2012 UTC revision 1759, Thu Mar 22 15:23:11 2012 UTC
# Line 304  Line 304 
304              (* create the loop nest for the initially iterations *)              (* create the loop nest for the initially iterations *)
305                val indexVar = "ix"                val indexVar = "ix"
306                val strandTy = CL.T_Ptr(CL.T_Named(N.strandTy name))                val strandTy = CL.T_Ptr(CL.T_Named(N.strandTy name))
307                  fun statePtr inout = CL.mkSubscript(CL.mkIndirect(CL.mkVar "wrld", inout), CL.mkVar indexVar)
308                fun mkLoopNest [] = CL.mkBlock(createPrefix @ [                fun mkLoopNest [] = CL.mkBlock(createPrefix @ [
309                        CL.mkCall(N.strandInit name,                        CL.mkCall(N.strandInit name, statePtr "inState" :: args),
310                          CL.mkSubscript(CL.mkIndirect(CL.mkVar "wrld", "inState"), CL.mkVar indexVar) :: args),                        CL.mkCall("memcpy", [
311                              statePtr "outState", statePtr "inState",
312                              CL.mkSizeof(CL.T_Named(N.strandTy name))
313                            ]),
314                        CL.S_Exp(CL.mkPostOp(CL.mkVar indexVar, CL.^++))                        CL.S_Exp(CL.mkPostOp(CL.mkVar indexVar, CL.^++))
315                      ])                      ])
316                  | mkLoopNest ((CL.V(ty, param), lo, hi)::iters) = let                  | mkLoopNest ((CL.V(ty, param), lo, hi)::iters) = let

Legend:
Removed from v.1758  
changed lines
  Added in v.1759

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