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

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/c-util/gen-library-interface.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/c-util/gen-library-interface.sml

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

revision 1911, Tue Jun 5 13:51:17 2012 UTC revision 1912, Tue Jun 5 16:02:39 2012 UTC
# Line 99  Line 99 
99                    descDcl @ getDcl @ setDcl                    descDcl @ getDcl @ setDcl
100                  end                  end
101          (* create a decl for an output variable *)          (* create a decl for an output variable *)
102            fun mkGetDecl (Ty.DynSeqTy _, name) = [            fun mkGetDecl snapshot (Ty.DynSeqTy _, name) = [
103                    CL.D_Proto(                    CL.D_Proto(
104                      [], CL.boolTy, N.outputGet(tgt, name),                      [], CL.boolTy, (if snapshot then N.snapshotGet else N.outputGet)(tgt, name),
105                      [CL.PARAM([], worldPtrTy, "wrld"), CL.PARAM([], nrrdPtrTy, "lengths"), CL.PARAM([], nrrdPtrTy, "data")])                      [CL.PARAM([], worldPtrTy, "wrld"), CL.PARAM([], nrrdPtrTy, "lengths"), CL.PARAM([], nrrdPtrTy, "data")])
106                  ]                  ]
107              | mkGetDecl (_, name) = [              | mkGetDecl snapshot (_, name) = [
108                    CL.D_Proto(                    CL.D_Proto(
109                      [], CL.boolTy, N.outputGet(tgt, name),                      [], CL.boolTy, (if snapshot then N.snapshotGet else N.outputGet)(tgt, name),
110                      [CL.PARAM([], worldPtrTy, "wrld"), CL.PARAM([], nrrdPtrTy, "data")])                      [CL.PARAM([], worldPtrTy, "wrld"), CL.PARAM([], nrrdPtrTy, "data")])
111                  ]                  ]
112            val placeholders = [            val placeholders = [
# Line 130  Line 130 
130              case rt of SOME rt => prFrag rt | _ => ();              case rt of SOME rt => prFrag rt | _ => ();
131              prFrag LibInterfaceBodyFrag.text;              prFrag LibInterfaceBodyFrag.text;
132              PrC.output (outS, CL.D_Verbatim ["\n/**** Getters for output values ****/\n"]);              PrC.output (outS, CL.D_Verbatim ["\n/**** Getters for output values ****/\n"]);
133              List.app (fn output => prDecls (mkGetDecl output)) outputs;              if (#snapshot tgt)
134                  then List.app (fn output => prDecls (mkGetDecl true output)) outputs
135                  else ();
136                List.app (fn output => prDecls (mkGetDecl false output)) outputs;
137              prFrag LibInterfaceFootFrag.text;              prFrag LibInterfaceFootFrag.text;
138              PrC.close outS;              PrC.close outS;
139              TextIO.closeOut outStrm              TextIO.closeOut outStrm

Legend:
Removed from v.1911  
changed lines
  Added in v.1912

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