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 1322, Sun Jun 12 17:13:33 2011 UTC revision 1328, Sun Jun 12 21:14:54 2011 UTC
# Line 380  Line 380 
380                val globalBuffer = CL.mkAssign(CL.mkVar(concat[RN.globalsVarName,"_cl"]),                val globalBuffer = CL.mkAssign(CL.mkVar(concat[RN.globalsVarName,"_cl"]),
381                      CL.mkApply("clCreateBuffer", [                      CL.mkApply("clCreateBuffer", [
382                          CL.mkVar contextVar,                          CL.mkVar contextVar,
383                          CL.mkVar "CL_MEM_COPY_HOST_PTR",                          CL.mkVar "CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR",
384                          CL.mkApply("sizeof",[CL.mkVar RN.globalsTy]),                          CL.mkApply("sizeof",[CL.mkVar RN.globalsTy]),
385                          CL.mkVar RN.globalsVarName,                          CL.mkVar RN.globalsVarName,
386                          CL.mkUnOp(CL.%&,CL.mkVar errVar)                          CL.mkUnOp(CL.%&,CL.mkVar errVar)
# Line 469  Line 469 
469    
470        (* generate the data and global parameters *)        (* generate the data and global parameters *)
471          fun genKeneralGlobalParams ((name,tyname)::rest) =          fun genKeneralGlobalParams ((name,tyname)::rest) =
               CL.PARAM([], CL.T_Ptr(CL.T_Named RN.globalsTy), concat[RN.globalsVarName]) ::  
472                CL.PARAM([], CL.T_Ptr(CL.T_Named (RN.imageTy tyname)),RN.addBufferSuffix name) ::                CL.PARAM([], CL.T_Ptr(CL.T_Named (RN.imageTy tyname)),RN.addBufferSuffix name) ::
473                CL.PARAM([], CL.T_Ptr(CL.voidTy),RN.addBufferSuffixData name) ::                CL.PARAM([], CL.T_Ptr(CL.voidTy),RN.addBufferSuffixData name) ::
474                genKeneralGlobalParams rest                genKeneralGlobalParams rest
# Line 492  Line 491 
491                val params = [                val params = [
492                        CL.PARAM(["__global"], CL.T_Ptr(CL.T_Named tyName), "selfIn"),                        CL.PARAM(["__global"], CL.T_Ptr(CL.T_Named tyName), "selfIn"),
493                        CL.PARAM(["__global"], CL.T_Ptr(CL.T_Named tyName), "selfOut"),                        CL.PARAM(["__global"], CL.T_Ptr(CL.T_Named tyName), "selfOut"),
494                        CL.PARAM(["__global"], CL.intTy, "width")                        CL.PARAM(["__global"], CL.intTy, "width"),
495                                                             CL.PARAM([], CL.T_Ptr(CL.T_Named RN.globalsTy),
496                            concat[RN.globalsVarName])
497                      ] @ genKeneralGlobalParams(!imgGlobals)                      ] @ genKeneralGlobalParams(!imgGlobals)
498                val thread_ids = if nDims = 1                val thread_ids = if nDims = 1
499                      then [                      then [

Legend:
Removed from v.1322  
changed lines
  Added in v.1328

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