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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/cl-target/cl-target.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/cl-target/cl-target.sml

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

revision 1320, Sun Jun 12 01:41:27 2011 UTC revision 1321, Sun Jun 12 14:50:26 2011 UTC
# Line 115  Line 115 
115          fun fragment (ENV{info, vMap, scope}, blk) = let          fun fragment (ENV{info, vMap, scope}, blk) = let
116                val (vMap, stms) = (case scope                val (vMap, stms) = (case scope
117                       of GlobalScope => ToC.trFragment (vMap, blk)                       of GlobalScope => ToC.trFragment (vMap, blk)
118    (* NOTE: if we move strand initialization to the GPU, then we'll have to change the following code! *)
119                        | InitiallyScope => ToC.trFragment (vMap, blk)                        | InitiallyScope => ToC.trFragment (vMap, blk)
120                        | _ => ToCL.trFragment (vMap, blk)                        | _ => ToCL.trFragment (vMap, blk)
121                      (* end case *))                      (* end case *))
# Line 482  Line 483 
483               initGlobalImages rest               initGlobalImages rest
484            | initGlobalImages [] = []            | initGlobalImages [] = []
485    
   
486          (* generate the main kernel function for the .cl file *)          (* generate the main kernel function for the .cl file *)
487          fun genKernelFun (strand, nDims, globals, imgGlobals) = let          fun genKernelFun (strand, nDims, globals, imgGlobals) = let
488                val Strand{name, tyName, state, output, code,...} = strand                val Strand{name, tyName, state, output, code,...} = strand
# Line 623  Line 623 
623                    ]));                    ]));
624                  cppDecl (CL.D_Var(["static"], CL.charPtr, "ProgramName",                  cppDecl (CL.D_Var(["static"], CL.charPtr, "ProgramName",
625                    SOME(CL.I_Exp(CL.mkStr progName))));                    SOME(CL.I_Exp(CL.mkStr progName))));
   
626                  cppDecl (genGlobalStruct (#hostTy, !globals));                  cppDecl (genGlobalStruct (#hostTy, !globals));
627                  cppDecl (CL.D_Var(["static"], CL.T_Ptr(CL.T_Named RN.globalsTy), RN.globalsVarName, NONE));                  cppDecl (CL.D_Var(["static"], CL.T_Ptr(CL.T_Named RN.globalsTy), RN.globalsVarName, NONE));
628                  cppDecl (genStrandTyDef (#hostTy, strand));                  cppDecl (genStrandTyDef (#hostTy, strand));

Legend:
Removed from v.1320  
changed lines
  Added in v.1321

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