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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/cxx-util/gen-outputs-util.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/cxx-util/gen-outputs-util.sml

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

revision 4027, Wed Jun 22 17:38:35 2016 UTC revision 4028, Wed Jun 22 21:15:36 2016 UTC
# Line 83  Line 83 
83            val optsV = CL.mkVar "opts"            val optsV = CL.mkVar "opts"
84          (* make a global variable declaration *)          (* make a global variable declaration *)
85            fun mkDecl (name, value) =            fun mkDecl (name, value) =
86                  CL.D_Var(["static"], CL.T_Named "std::string", name, SOME(CL.I_Exp(CL.mkStr value)))                  CL.D_Var(["static"], CL.T_Named "std::string", [], name,
87                      SOME(CL.I_Exp(CL.mkStr value)))
88          (* register a flag for a given output *)          (* register a flag for a given output *)
89            fun registerOutput {name, ty, isGlobal} = let            fun registerOutput {name, ty, isGlobal} = let
90                  val optName = "redirect-" ^ name                  val optName = "redirect-" ^ name
# Line 116  Line 117 
117                    | _ => multi ()                    | _ => multi ()
118                  (* end case *))                  (* end case *))
119            val registerFn = CL.D_Func(            val registerFn = CL.D_Func(
120                  ["static"], CL.voidTy, "register_outputs",                  ["static"], CL.voidTy, [], "register_outputs",
121                  [CL.PARAM([], RN.optionsPtrTy env, "opts")],                  [CL.PARAM([], RN.optionsPtrTy env, "opts")],
122                  CL.mkBlock stms)                  CL.mkBlock stms)
123            in            in
# Line 225  Line 226 
226                    ]                    ]
227            in [            in [
228              CL.D_Func(              CL.D_Func(
229                ["static"], CL.voidTy, "write_output",                ["static"], CL.voidTy, [], "write_output",
230                [CL.PARAM([], RN.worldPtrTy, "wrld")],                [CL.PARAM([], RN.worldPtrTy, "wrld")],
231                CL.mkBlock(outDecls @ List.foldr (fn (output, l) => writeNrrd output @ l) [] outputs))                CL.mkBlock(outDecls @ List.foldr (fn (output, l) => writeNrrd output @ l) [] outputs))
232            ] end            ] end

Legend:
Removed from v.4027  
changed lines
  Added in v.4028

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