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

SCM Repository

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

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

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

revision 1789, Tue Apr 3 14:19:50 2012 UTC revision 1793, Thu Apr 5 09:53:28 2012 UTC
# Line 39  Line 39 
39              | Ty.TensorTy[] => CL.T_Named(RN.shadowRealTy ())              | Ty.TensorTy[] => CL.T_Named(RN.shadowRealTy ())
40              | Ty.TensorTy[n] => CL.T_Named(RN.shadowVecTy n)              | Ty.TensorTy[n] => CL.T_Named(RN.shadowVecTy n)
41              | Ty.TensorTy[n, m] => CL.T_Named(RN.shadowMatTy(n,m))              | Ty.TensorTy[n, m] => CL.T_Named(RN.shadowMatTy(n,m))
42              | Ty.ImageTy(ImageInfo.ImgInfo{dim, ...}) => CL.T_Named(RN.shadowImageTy dim)              | Ty.ImageTy info => CL.T_Named(RN.shadowImageTy(ImageInfo.dim info))
43              | _ => raise Fail(concat["TreeToC.trType(", Ty.toString ty, ")"])              | _ => raise Fail(concat["TreeToC.trType(", Ty.toString ty, ")"])
44            (* end case *))            (* end case *))
45    
# Line 55  Line 55 
55                    CL.mkUnOp(CL.%&, CL.mkSelect(CL.mkVar RN.shadowGlaobalsName, name)),                    CL.mkUnOp(CL.%&, CL.mkSelect(CL.mkVar RN.shadowGlaobalsName, name)),
56                    CL.mkIndirect(CL.mkVar RN.globalsVarName, name)                    CL.mkIndirect(CL.mkVar RN.globalsVarName, name)
57                  ])                  ])
58              | Ty.ImageTy(ImageInfo.ImgInfo{dim, ...}) => CL.mkCall(RN.shadowImageFunc dim, [              | Ty.ImageTy info => CL.mkCall(RN.shadowImageFunc(ImageInfo.dim info), [
59                    CL.mkVar "context",                    CL.mkVar "context",
60                    CL.mkUnOp(CL.%&, CL.mkSelect(CL.mkVar RN.shadowGlaobalsName, name)),                    CL.mkUnOp(CL.%&, CL.mkSelect(CL.mkVar RN.shadowGlaobalsName, name)),
61                    CL.mkIndirect(CL.mkVar RN.globalsVarName, name)                    CL.mkIndirect(CL.mkVar RN.globalsVarName, name)
# Line 241  Line 241 
241          fun name (ToCL.V(_, name)) = name          fun name (ToCL.V(_, name)) = name
242          fun global (Prog{globals, imgGlobals, ...}, name, ty) = let          fun global (Prog{globals, imgGlobals, ...}, name, ty) = let
243                val x = mirror (ty, name, GLOBAL_SHADOW)                val x = mirror (ty, name, GLOBAL_SHADOW)
244                fun isImgGlobal (Ty.ImageTy(ImageInfo.ImgInfo{dim, ...}), name) =                fun isImgGlobal (Ty.ImageTy info, name) =
245                      imgGlobals  := (name,dim) :: !imgGlobals                      imgGlobals  := (name, ImageInfo.dim info) :: !imgGlobals
246                  | isImgGlobal _ =  ()                  | isImgGlobal _ =  ()
247                in                in
248                  globals := x :: !globals;                  globals := x :: !globals;

Legend:
Removed from v.1789  
changed lines
  Added in v.1793

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