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

SCM Repository

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

Diff of /branches/vis15/src/compiler/target-cpu/gen-outputs.sml

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

revision 4504, Sat Sep 3 21:57:49 2016 UTC revision 4505, Sun Sep 4 14:14:14 2016 UTC
# Line 90  Line 90 
90      val DIDEROT_STABLE = CL.mkVar "diderot::kStable"      val DIDEROT_STABLE = CL.mkVar "diderot::kStable"
91      val NRRD = CL.mkVar "NRRD"      val NRRD = CL.mkVar "NRRD"
92    
93      val strandsExp = CL.mkIndirect(wrldV, "_strands")      fun strandMeth (f, args) = CL.mkDispatch(CL.mkIndirect(wrldV, "_strands"), f, args)
   
     fun strandMeth (f, args) = CL.mkDispatch(strandsExp, f, args)  
94    
95    (* dymanic sequence operations *)    (* dymanic sequence operations *)
96      fun seqLength seq = CL.mkDispatch(seq, "length", [])      fun seqLength seq = CL.mkDispatch(seq, "length", [])
# Line 111  Line 109 
109          wrld->state[i].name          wrld->state[i].name
110     *)     *)
111      fun stateVar spec = let      fun stateVar spec = let
112            fun singleV _ name = CL.mkIndirect(            fun singleV _ name = CL.mkIndirect(strandMeth("strand", [iV]), "sv_"^name)
113                  CL.mkDispatch(CL.mkIndirect(wrldV, "_strands"), "strand", [iV]),            fun dualV U.Shared name = CL.mkIndirect(strandMeth("out__state", [iV]), "sv_"^name)
114                  "sv_"^name)              | dualV _ name = CL.mkIndirect(strandMeth("local_state", [iV]), "sv_"^name)
           fun dualV U.Shared name = CL.mkIndirect(  
                 CL.mkDispatch(CL.mkIndirect(wrldV, "_strands"), "out__state", [iV]),  
                 "sv_"^name)  
             | dualV _ name = CL.mkIndirect(  
                 CL.mkDispatch(CL.mkIndirect(wrldV, "_strands"), "local_state", [iV]),  
                 "sv_"^name)  
115            in            in
116              if TargetSpec.dualState spec then dualV else singleV              if TargetSpec.dualState spec then dualV else singleV
117            end            end

Legend:
Removed from v.4504  
changed lines
  Added in v.4505

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