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/gen-inputs.sml
ViewVC logotype

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

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

revision 3124, Tue Mar 24 09:59:45 2015 UTC revision 3125, Tue Mar 24 11:30:03 2015 UTC
# Line 68  Line 68 
68      fun getBuffersAndKernels inputs = let      fun getBuffersAndKernels inputs = let
69            fun get ([], bufs, kerns) = (List.rev bufs, List.rev kerns)            fun get ([], bufs, kerns) = (List.rev bufs, List.rev kerns)
70              | get ((gv, name, _, _)::inps, bufs, kerns) = (case GVar.ty gv              | get ((gv, name, _, _)::inps, bufs, kerns) = (case GVar.ty gv
71                   of Ty.ImageTy _ => get (inps, (name ^ "Buf") :: bufs, (name ^ "Kern") :: kerns)                   of Ty.ImageTy _ => get (inps, (name ^ "Buf") :: bufs, OCLNames.imageInitKern name :: kerns)
72                    | _ => get (inps, bufs, kerns)                    | _ => get (inps, bufs, kerns)
73                  (* end case *))                  (* end case *))
74            in            in
# Line 87  Line 87 
87                                CLUtil.globalParam(CL.voidPtr, "data")                                CLUtil.globalParam(CL.voidPtr, "data")
88                              ]                              ]
89                        val stm = CL.mkAssign(CL.mkIndirect(CL.mkIndirect(globV, "gv_" ^ name), "data"), CL.mkVar "data")                        val stm = CL.mkAssign(CL.mkIndirect(CL.mkIndirect(globV, "gv_" ^ name), "data"), CL.mkVar "data")
90                        val kern = CLUtil.mkTaskKernel(name ^ "Kern", params, stm)                        val kern = CLUtil.mkTaskKernel(OCLNames.imageInitKern name, params, stm)
91                        in                        in
92                          gen (inps, kern::kerns)                          gen (inps, kern::kerns)
93                        end                        end
# Line 125  Line 125 
125                                  CL.mkCast(CL.T_Ptr(CL.T_Named "OCLWorldPrefix_t"), CL.mkVar "wrld"),                                  CL.mkCast(CL.T_Ptr(CL.T_Named "OCLWorldPrefix_t"), CL.mkVar "wrld"),
126                                  CL.mkIndirect(wrldV, "globalsBuf"),                                  CL.mkIndirect(wrldV, "globalsBuf"),
127                                  CL.mkIndirect(inpV, "gv_" ^ name),                                  CL.mkIndirect(inpV, "gv_" ^ name),
128                                  CL.mkIndirect(wrldV, name ^ "Kern"),                                  CL.mkIndirect(wrldV, OCLNames.imageInitKern name),
129                                  CL.mkAddrOf(CL.mkIndirect(wrldV, name ^ "Buf"))                                  CL.mkAddrOf(CL.mkIndirect(wrldV, name ^ "Buf"))
130                                ]),                                ]),
131                              CL.mkReturn(SOME(CL.mkVar "true")))                              CL.mkReturn(SOME(CL.mkVar "true")))

Legend:
Removed from v.3124  
changed lines
  Added in v.3125

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