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

SCM Repository

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

Diff of /trunk/src/compiler/cl-target/cl-target.sml

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

revision 2635, Mon May 26 14:06:39 2014 UTC revision 2636, Tue May 27 16:18:36 2014 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 250  Line 250 
250          fun name (ToCL.V(_, name)) = name          fun name (ToCL.V(_, name)) = name
251          fun global (Prog{globals, imgGlobals, ...}, name, ty) = let          fun global (Prog{globals, imgGlobals, ...}, name, ty) = let
252                val x = mirror (ty, name, GLOBAL_SHADOW)                val x = mirror (ty, name, GLOBAL_SHADOW)
253                fun isImgGlobal (Ty.ImageTy(ImageInfo.ImgInfo{dim, ...}), name) =                fun isImgGlobal (Ty.ImageTy info, name) =
254                      imgGlobals  := (name,dim) :: !imgGlobals                      imgGlobals  := (name, ImageInfo.dim info) :: !imgGlobals
255                  | isImgGlobal _ =  ()                  | isImgGlobal _ =  ()
256                in                in
257                  globals := x :: !globals;                  globals := x :: !globals;

Legend:
Removed from v.2635  
changed lines
  Added in v.2636

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