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/gen-output.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/c-target/gen-output.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 96  Line 96 
96      fun forStrands stm = CL.mkFor(      fun forStrands stm = CL.mkFor(
97            [(CL.uint32, "i", mkInt 0)],            [(CL.uint32, "i", mkInt 0)],
98            CL.mkBinOp(iV, CL.#<, CL.mkIndirect(wrldV, "numStrands")),            CL.mkBinOp(iV, CL.#<, CL.mkIndirect(wrldV, "numStrands")),
99            [CL.mkPostOp(numStableV, CL.^++)],            [CL.mkPostOp(iV, CL.^++)],
100            stm)            stm)
101    
102    (* code fragment to test for stable strands in a loop    (* code fragment to test for stable strands in a loop
# Line 171  Line 171 
171                    (if isArray                    (if isArray
172                      then dimSizes ::                      then dimSizes ::
173                        List.tabulate (nAxes, fn i =>                        List.tabulate (nAxes, fn i =>
174                          setSizes(i+1, CL.mkSubscript(CL.mkIndirect(wrldV, "sizes"), mkInt(nAxes-i-1)))) @                          setSizes(i+1, CL.mkSubscript(CL.mkIndirect(wrldV, "size"), mkInt(nAxes-i-1)))) @
175                        [maybeAlloc (lengthsV, "nrrdTypeInt", nAxes+1)]                        [maybeAlloc (lengthsV, "nrrdTypeInt", nAxes+1)]
176                      else [                      else [
177                          dimSizes, setSizes(nDims, numStableV),                          dimSizes, setSizes(nDims, numStableV),
# Line 251  Line 251 
251                    if isArray                    if isArray
252                      then dimSizes @                      then dimSizes @
253                        List.tabulate (nAxes, fn i =>                        List.tabulate (nAxes, fn i =>
254                          setSizes(nDims+i, CL.mkSubscript(CL.mkIndirect(wrldV, "sizes"), mkInt(nAxes-i-1))))                          setSizes(nDims+i, CL.mkSubscript(CL.mkIndirect(wrldV, "size"), mkInt(nAxes-i-1))))
255                      else                      else
256                        CL.mkDeclInit(sizeTy, "numStable", mkInt 0) ::                        CL.mkDeclInit(sizeTy, "numStable", mkInt 0) ::
257                        forStrands (ifStable(CL.S_Exp(CL.mkPostOp(numStableV, CL.^++)))) ::                        forStrands (ifStable(CL.S_Exp(CL.mkPostOp(numStableV, CL.^++)))) ::
# Line 278  Line 278 
278          (* the function body *)          (* the function body *)
279            val stms =            val stms =
280                  CL.mkComment["Compute sizes of nrrd file"] ::                  CL.mkComment["Compute sizes of nrrd file"] ::
                 CL.mkDecl(sizeTy, "sizes", NONE) ::  
281                  initSizes @                  initSizes @
282                  CL.mkComment["Allocate nrrd data"] ::                  CL.mkComment["Allocate nrrd data"] ::
283                  maybeAlloc (dataV, nrrdType, nDims+nAxes) ::                  maybeAlloc (dataV, nrrdType, nDims+nAxes) ::

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