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

SCM Repository

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

Diff of /branches/vis12-cl/src/compiler/cl-target/cl-target.sml

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

revision 3158, Sat Mar 28 07:17:20 2015 UTC revision 3159, Sat Mar 28 09:40:50 2015 UTC
# Line 503  Line 503 
503         * of strands.         * of strands.
504         *)         *)
505          fun genGlobalStruct (props, iterDim, globals) = let          fun genGlobalStruct (props, iterDim, globals) = let
506                fun genField (projTy : global_var -> CL.ty) gv = (projTy gv, #name gv)                fun genField {cTy, oclTy, name} = (oclTy, name)
507                val intArrTy = CL.T_Array(CL.intTy, SOME iterDim)                val intArrTy = CL.T_Array(CL.intTy, SOME iterDim)
508                val fields = (intArrTy, "initiallyLo") ::                val fields = (intArrTy, "initiallyLo") ::
509                      (intArrTy, "initiallyHi") ::                      (intArrTy, "initiallyHi") ::
510                      List.map (genField #oclTy) globals                      List.map genField globals
511                in                in
512                  CL.D_StructDef(NONE, fields, SOME(ON.globalsTyName props))                  CL.D_StructDef(NONE, fields, SOME(ON.globalsTyName props))
513                end                end
# Line 539  Line 539 
539                        CL.mkApply("CheckOCLStatus", [wrldV, stsV, CL.mkStr("binding "^k)]),                        CL.mkApply("CheckOCLStatus", [wrldV, stsV, CL.mkStr("binding "^k)]),
540                        CL.mkReturn(SOME(CL.mkVar "true"))) ::                        CL.mkReturn(SOME(CL.mkVar "true"))) ::
541                      stms                      stms
 (* FIXME: need to include image initialization kernels *)  
542                val stms = List.foldr bindKern [CL.mkReturn(SOME(CL.mkVar "false"))] kernels                val stms = List.foldr bindKern [CL.mkReturn(SOME(CL.mkVar "false"))] kernels
543                val stms = CL.mkDecl(CL.T_Named "cl_int", "sts", NONE) :: stms                val stms = CL.mkDecl(CL.T_Named "cl_int", "sts", NONE) :: stms
544                val body = CL.mkBlock stms                val body = CL.mkBlock stms

Legend:
Removed from v.3158  
changed lines
  Added in v.3159

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