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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/c-util/c-names.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/c-util/c-names.sml

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

revision 2667, Thu Jun 5 18:54:12 2014 UTC revision 2668, Thu Jun 12 03:29:04 2014 UTC
# Line 1  Line 1 
1    
2  (* c-names.sml  (* c-names.sml
3   *   *WQE
4   * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)   * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
5   * All rights reserved.   * All rights reserved.
6   *)   *)
# Line 58  Line 59 
59      fun coords [i]=Int.toString i      fun coords [i]=Int.toString i
60      | coords (e1::es)= concat[Int.toString e1, "x", coords es]      | coords (e1::es)= concat[Int.toString e1, "x", coords es]
61    
     (*fun vecTy n = concat["vec", Int.toString n, !gRealSuffix, "_t"]*)  
     fun ivecTy n = concat["vec", Int.toString n, !gIntSuffix, "_t"]  
     fun vecTy  n = concat["Diderot_vec", Int.toString n, "_t"]  
62    
63        fun ivecTy n = concat["vec", Int.toString n, !gIntSuffix, "_t"]
64    
65      fun unionTy n = concat["union", Int.toString n, !gRealSuffix, "_t"]      fun unionTy n = concat["union", Int.toString n, !gRealSuffix, "_t"]
66      fun iunionTy n = concat["union", Int.toString n, !gIntSuffix, "_t"]      fun iunionTy n = concat["union", Int.toString n, !gIntSuffix, "_t"]
# Line 96  Line 95 
95    (* matrix operations *)    (* matrix operations *)
96      fun zeroVec n = concat["zero", Int.toString n]      fun zeroVec n = concat["zero", Int.toString n]
97      fun zeroMat (n, m) = concat["zero", Int.toString n, "x", Int.toString m]      fun zeroMat (n, m) = concat["zero", Int.toString n, "x", Int.toString m]
     fun normMat (n, m) = concat["norm", Int.toString n, "x", Int.toString m]  
98      fun copyMat (n, m) = concat["copy", Int.toString n, "x", Int.toString m]      fun copyMat (n, m) = concat["copy", Int.toString n, "x", Int.toString m]
99    
100    
101    
102    (* 3rd-order tensor operations *)    (* 3rd-order tensor operations *)
103      fun copyTen3 (n, m, l) = F.format "copyTen%dx%dx%d" [F.INT n, F.INT m, F.INT l]      fun copyTen3 (n, m, l) = F.format "copyTen%dx%dx%d" [F.INT n, F.INT m, F.INT l]
104      fun normTen3 (n, m, p) = concat["normTen", Int.toString n, "x", Int.toString m, "x", Int.toString p]      (*Vector operators *)
105        fun q e=Int.toString e
106    
107    
108        (*Name for Tensors elsewhere*)
109        (*For program use*)
110        val  tprog = mkReal
111    
112      (*Vector operators *)  
113      fun q e=Int.toString e  
114        (*Name for tensors in load and store*)
115        fun OvecTy  n = concat["Diderot_vec", Int.toString n, "_t"]
116    
117        (*For internal use*)
118    
119    
120      (*-------------- Function Names:String ---------------*)      (*-------------- Function Names:String ---------------*)
121      fun NameConsVec d="E"^mkVec d      fun NameConsArray d="consArr"^q d
122      fun NameLdVec(tyN,tyO)= String.concat["ldVec",q tyO,"to",q tyN]      fun NameConsVec d="consVec"^q d
123      fun NameMkVec d= String.concat["storeVec" ,q d]      fun NameMkVec(false,d,orig)= String.concat["storeVec" ,q d,"to",q orig]
124      fun NameLdVecA(tyN,tyO)= String.concat["ldVecAligned",q tyO,"to",q tyN]        | NameMkVec(true,d,_)= String.concat["storeVecAligned" ,q d]
125      fun NameMkVecA d= String.concat["storeVecAligned" ,q d]  
126        fun NameLdVec (true,tyN,tyO)= String.concat["loadVecAligned",q tyN]
127          | NameLdVec(false,tyN,tyO)= String.concat["loadVec",q tyO,"to",q tyN]
128    
129      fun NameSumV d= String.concat["sumVec" ,q d]      fun NameSumV d= String.concat["sumVec" ,q d]
130      fun NameScaV d="E"^scale d      fun NameScaV d="E"^scale d
131    

Legend:
Removed from v.2667  
changed lines
  Added in v.2668

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