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 2837, Wed Nov 19 23:42:17 2014 UTC revision 2838, Tue Nov 25 03:40:24 2014 UTC
# Line 91  Line 91 
91      fun vecftoi n = concat["vec", Int.toString n, "rtoi"]      fun vecftoi n = concat["vec", Int.toString n, "rtoi"]
92       val mkRealArr= "Diderot_real_t"       val mkRealArr= "Diderot_real_t"
93    
94        fun normalize n =concat["normalize",Int.toString n]
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]
# Line 113  Line 114 
114    
115    
116      (*Name for tensors in load and store*)      (*Name for tensors in load and store*)
117      fun LocalTy  [n] = concat["Diderot_vec", Int.toString n, "_t"]      fun LocalTy  [1] = mkReal
118          | LocalTy  [n] = concat["Diderot_vec", Int.toString n, "_t"]
119        | LocalTy  [n,m] = concat["Diderot_Mat", Int.toString n,"x",Int.toString m, "_t"]        | LocalTy  [n,m] = concat["Diderot_Mat", Int.toString n,"x",Int.toString m, "_t"]
120    
121    
# Line 136  Line 138 
138    
139    
140    
141           fun size n=foldl (fn (a,b) => b*a) 1 n
142    
143      fun NameLdArr(A,nSize,oSize)=      fun NameLdArr(A,nSize,oSize)=
144          if (nSize>oSize)          if (nSize>oSize)
145          then String.concat["load",isAligned A,iTos oSize,"to",iTos nSize]          then String.concat["load",isAligned A,iTos oSize,"to",iTos nSize]
146          else String.concat["load",isAligned A,iTos nSize]          else String.concat["load",isAligned A,iTos nSize]
147    
148      val NameMux = String.concat["Mux"]      fun NameMux n = String.concat["Mux",iTos n]
149      fun NameSumV d= String.concat["sumVec" ,iTos d]      fun NameSumV d= String.concat["sumVec" ,iTos d]
150      fun NameFloorV d= String.concat["floorVec" ,iTos d]      fun NameFloorV d= String.concat["floorVec" ,iTos d]
151        val NameFloor= String.concat["FLOOR"]
152      fun NameScaV d="E"^scale d      fun NameScaV d="E"^scale d
153      fun unionTy d= String.concat["Diderot_union",iTos d,"_t"]      fun unionTy d= String.concat["Diderot_union",iTos d,"_t"]
154      fun NameProj n = String.concat["Proj", iTos n]      fun NameProj n = String.concat["Proj", iTos n]
155      fun NameClampV n = String.concat["Clamp", iTos n]      fun NameClampV n = String.concat["Clamp", iTos n]
156      fun NameLerpV n = String.concat["Lerp", iTos n]      fun NameLerpV n = String.concat["Lerp", iTos n]
157        fun NameZeroV ty = concat["Zero", Int.toString (size ty)]
158    
159          (*copy arrays*)          (*copy arrays*)
160      fun NameCopyTensor [n] = concat["copyArr", Int.toString n]      fun NameCopyTensor [n] = concat["copyArr", Int.toString n]

Legend:
Removed from v.2837  
changed lines
  Added in v.2838

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