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/runtime-names.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/cl-target/runtime-names.sml

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

revision 1357, Tue Jun 21 03:55:10 2011 UTC revision 1358, Tue Jun 21 17:38:56 2011 UTC
# Line 16  Line 16 
16     * when the program object is created.     * when the program object is created.
17     *)     *)
18      val doublePrecision = ref false      val doublePrecision = ref false
     val gVectorWid = ref 4  
19      val gIntTy = ref CLang.int32      val gIntTy = ref CLang.int32
20      val gRealTy = ref CLang.float      val gRealTy = ref CLang.float
21      val gRealStem = ref "?"      val gRealStem = ref "?"
# Line 29  Line 28 
28            doublePrecision := double;            doublePrecision := double;
29            if double            if double
30              then (              then (
               gVectorWid := 2;  
31                gIntTy := CLang.int64;                gIntTy := CLang.int64;
32                gRealTy := CLang.double;                gRealTy := CLang.double;
33                gRealStem := "double";                gRealStem := "double";
# Line 37  Line 35 
35                gIntSuffix := "l";                gIntSuffix := "l";
36                gIntFormat := "%ld")                gIntFormat := "%ld")
37              else (              else (
               gVectorWid := 4;  
38                gIntTy := CLang.int32;                gIntTy := CLang.int32;
39                gRealTy := CLang.float;                gRealTy := CLang.float;
40                gRealStem := "float";                gRealStem := "float";
# Line 45  Line 42 
42                gIntSuffix := "i";                gIntSuffix := "i";
43                gIntFormat := "%d"))                gIntFormat := "%d"))
44    
   
45      fun addRealSuffix stem = stem ^ !gRealSuffix      fun addRealSuffix stem = stem ^ !gRealSuffix
46      fun addVecSuffix stem n = concat[stem, Int.toString n, !gRealSuffix]      fun addVecSuffix stem n = concat[stem, Int.toString n, !gRealSuffix]
47      fun addIVecSuffix stem n = concat[stem, Int.toString n, !gIntSuffix]      fun addIVecSuffix stem n = concat[stem, Int.toString n, !gIntSuffix]
# Line 60  Line 56 
56      fun imageTy n = concat["Diderot_image", Int.toString n, "D_t"]      fun imageTy n = concat["Diderot_image", Int.toString n, "D_t"]
57      fun matTy (n, m) = concat["Diderot_Mat", Int.toString n, "x", Int.toString m, "_t"]      fun matTy (n, m) = concat["Diderot_Mat", Int.toString n, "x", Int.toString m, "_t"]
58    
59      (* host-side names for OpenCL types *)
60        fun shadowIntTy () = "cl_int"       (* QUESTION: should this be precision dependent? *)
61        fun shadowRealTy () = "Shadow_real_t"
62        fun shadowVecTy n = F.format "Shadow_vec%d_t" [F.INT n]
63        fun shadowMatTy (m, n) = F.format "Shadow_Mat%dx%d_t" [F.INT m, F.INT n]
64        fun shadowImageTy d = concat["Shadow_image", Int.toString d, "D_t"]
65        val shadowGlobalsTy = "Shadow_Globals_t"
66    
67    (* names of generated tyes, functions, and globals *)    (* names of generated tyes, functions, and globals *)
68      val initGlobals = "Diderot_InitGlobals"     (* function for initializing program globals *)      val initGlobals = "Diderot_InitGlobals"     (* function for initializing program globals *)
69      val initGlobalsHelper = "Diderot_InitGlobalsHelper" (* function for initializing program globals *)      val initGlobalsHelper = "Diderot_InitGlobalsHelper" (* function for initializing program globals *)

Legend:
Removed from v.1357  
changed lines
  Added in v.1358

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