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 1710, Fri Mar 9 15:08:12 2012 UTC revision 1711, Fri Mar 9 15:10:59 2012 UTC
# Line 18  Line 18 
18   *      collection, dynamic-size elements   *      collection, dynamic-size elements
19   *              lengths nrrd has size 2 for objects (offset, length) followed by a single axis   *              lengths nrrd has size 2 for objects (offset, length) followed by a single axis
20   *              data nrrd has object dimensions followed by a single axis   *              data nrrd has object dimensions followed by a single axis
  *  
  * TODO: copy code for collection of fixed-size elements  
21   *)   *)
22    
23  structure GenOutput : sig  structure GenOutput : sig
# Line 262  Line 260 
260            val copyCode = let            val copyCode = let
261                  val pDecl = CL.mkDecl(CL.charPtr, "p", SOME(CL.I_Exp(                  val pDecl = CL.mkDecl(CL.charPtr, "p", SOME(CL.I_Exp(
262                          CL.mkCast(CL.charPtr, CL.mkIndirect(dataV, "data")))))                          CL.mkCast(CL.charPtr, CL.mkIndirect(dataV, "data")))))
263                  val copyCore = CL.mkBlock[                  val copyBlk = CL.mkBlock[
264                          CL.mkCall("memcpy", [                          CL.mkCall("memcpy", [
265                              pV,                              pV,
266                              CL.mkUnOp(CL.%&, stateVar name),                              CL.mkUnOp(CL.%&, stateVar name),
# Line 270  Line 268 
268                            ]),                            ]),
269                          CL.mkExpStm(CL.mkAssignOp(pV, CL.+=, CL.mkSizeof elemCTy))                          CL.mkExpStm(CL.mkAssignOp(pV, CL.+=, CL.mkSizeof elemCTy))
270                        ]                        ]
271                    val copyStm = if isArray
272                          then copyBlk
273                          else ifStable copyBlk
274                  in                  in
275                    if isArray                    [pDecl, forStrands copyStm]
                     then [pDecl, forStrands copyCore]  
                     else raise Fail "FIXME"  
276                  end                  end
277          (* the function body *)          (* the function body *)
278            val stms =            val stms =

Legend:
Removed from v.1710  
changed lines
  Added in v.1711

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