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

SCM Repository

[diderot] Diff of /branches/lamont/src/compiler/c-target/c-target.sml
ViewVC logotype

Diff of /branches/lamont/src/compiler/c-target/c-target.sml

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

revision 2200, Sun Feb 24 15:16:01 2013 UTC revision 2201, Sun Feb 24 16:02:12 2013 UTC
# Line 371  Line 371 
371    
372        (* create the target-specific substitution list *)        (* create the target-specific substitution list *)
373          fun mkSubs (tgt : target_desc, hasCom, hasReduce, gridIs2D,Strand{name, tyName, ...}) = let          fun mkSubs (tgt : target_desc, hasCom, hasReduce, gridIs2D,Strand{name, tyName, ...}) = let
374          val buidGrid=  "\nbuildGrid2D(wrld->inState,wrld->gridCtx);\n"          val d =  if gridIs2D then 2 else 3
375            val buildGrid =  concat["\n",N.gridBuildFun d, "(wrld->inState,wrld->gridCtx);\n"]
376          val queryInit = concat["\nwrld->", N.queryPoolName,"  = ", N.queryAllocFun, "();"]          val queryInit = concat["\nwrld->", N.queryPoolName,"  = ", N.queryAllocFun, "();"]
377          val gridInit = concat["wrld->", N.gridCxtName,"= ", N.gridAllocFun, "(&glob->qGridDim,",          val gridInit = concat["wrld->", N.gridCxtName,"= ", N.gridAllocFun d, "(&glob->qGridDim,",
378                                "wrld->numStrands,",                                "wrld->numStrands,",
379                                "&glob->qCellDim,",                                "&glob->qCellDim,",
380                                "&glob->qWinDim);\n"]                                "&glob->qWinDim);\n"]
# Line 391  Line 392 
392          ("QUERY_POOL_ALLOCATION", if hasCom then queryInit else ""),          ("QUERY_POOL_ALLOCATION", if hasCom then queryInit else ""),
393          ("GLOBAL_REDUCE", if hasReduce then globalReduce else ""),          ("GLOBAL_REDUCE", if hasReduce then globalReduce else ""),
394          ("GRID_D", if gridIs2D then "2" else "3"),          ("GRID_D", if gridIs2D then "2" else "3"),
395          ("BUILD_GRID", if hasCom then buidGrid else ""),          ("BUILD_GRID", if hasCom then buildGrid else ""),
396          ("GRID_INIT", if hasCom then gridInit else ""),          ("GRID_INIT", if hasCom then gridInit else ""),
397          ("PASS_GRID",  if hasCom then ",wrld->inState,wrld->gridCtx,wrld->queryPool" else ""),          ("PASS_GRID",  if hasCom then ",wrld->inState,wrld->gridCtx,wrld->queryPool" else ""),
398                  ("STRANDTY",    tyName)                  ("STRANDTY",    tyName)
# Line 527  Line 528 
528                      ();                      ();
529    
530        if(hasCom)        if(hasCom)
531                then (ppDecl(CL.verbatim [QueryPool.text] substitutions); if(gridIs2D)then ppDecl (CL.verbatim [Grid2DFrag.text] substitutions)                then (ppDecl(CL.verbatim [QueryPoolFrag.text] substitutions);
532                        ppDecl(CL.verbatim [GridFrag.text] substitutions);
533                        if(gridIs2D)then ppDecl (CL.verbatim [Grid2DFrag.text] substitutions)
534                                  else ppDecl (CL.verbatim [Grid3DFrag.text] substitutions))                                  else ppDecl (CL.verbatim [Grid3DFrag.text] substitutions))
535                else ();                else ();
536  List.app ppDecl outputs;  List.app ppDecl outputs;
# Line 610  Line 613 
613                      ();                      ();
614    
615        if(hasCom)        if(hasCom)
616                then (ppDecl(CL.verbatim [QueryPool.text] substitutions); if(gridIs2D)then ppDecl (CL.verbatim [Grid2DFrag.text] substitutions)                then (ppDecl(CL.verbatim [QueryPoolFrag.text] substitutions);
617                        ppDecl(CL.verbatim [GridFrag.text] substitutions);
618                        if(gridIs2D)then ppDecl (CL.verbatim [Grid2DFrag.text] substitutions)
619                                  else ppDecl (CL.verbatim [Grid3DFrag.text] substitutions))                                  else ppDecl (CL.verbatim [Grid3DFrag.text] substitutions))
620                else ();                else ();
621                  List.app ppDecl outputs;                  List.app ppDecl outputs;

Legend:
Removed from v.2200  
changed lines
  Added in v.2201

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