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/tree-to-c-fn.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/c-util/tree-to-c-fn.sml

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

revision 2620, Thu May 15 15:14:58 2014 UTC revision 2623, Thu May 15 20:01:40 2014 UTC
# Line 134  Line 134 
134              | (Op.IDiv , [a, b]) => CL.mkBinOp(a, CL.#/, b)              | (Op.IDiv , [a, b]) => CL.mkBinOp(a, CL.#/, b)
135              | (Op.INeg , [a]) => CL.mkUnOp(CL.%-, a)              | (Op.INeg , [a]) => CL.mkUnOp(CL.%-, a)
136    
137              (*Scalars, but reals *)              (*Scalar operators*)
138              | (Op.addSca,[a,b])      => CL.mkBinOp(a, CL.#+, b)              | (Op.addSca,[a,b])      => CL.mkBinOp(a, CL.#+, b)
139              | (Op.subSca, [a, b])    => CL.mkBinOp(a, CL.#-, b)              | (Op.subSca, [a, b])    => CL.mkBinOp(a, CL.#-, b)
140              | (Op.prodSca, [a, b])   => CL.mkBinOp(a, CL.#*, b)              | (Op.prodSca, [a, b])   => CL.mkBinOp(a, CL.#*, b)
141              | (Op.divSca, [a, b])    => CL.mkBinOp(a, CL.#/, b)              | (Op.divSca, [a, b])    => CL.mkBinOp(a, CL.#/, b)
142    
143                (*Do the same here? *)
144                | (Op.subVec n ,[a,b]) =>  CL.mkBinOp(a, CL.#-, b)
145                (*| (Op.addVec(n,ty),[a,b])      => CL.mkBinOp(a, CL.#+, b)*)
146    
147                (*Vector operators*)
148                | (Op.prodVec 2, args)   => CL.E_Apply(N.prod 2, args)
149                | (Op.prodVec 3, args)   => CL.E_Apply(N.prod 3, args)
150                | (Op.prodVec 4, args)   => CL.E_Apply(N.prod 4, args)
151                | (Op.prodVec _, _)      => raise Fail"what do I do?"
152                | (Op.prodScaV 2,args)   => CL.E_Apply(N.scale 2, args)
153                | (Op.prodScaV 3,args)   => CL.E_Apply(N.scale 3, args)
154                | (Op.prodScaV 4,args)   => CL.E_Apply(N.scale 4, args)
155                | (Op.prodScaV _,_)      => raise Fail"what do I do?"
156                | (Op.sumVec 2,args)     => CL.E_Apply(N.sum 2, args)
157                | (Op.sumVec 3,args)     => CL.E_Apply(N.sum 3, args)
158                | (Op.sumVec 4,args)     => CL.E_Apply(N.sum 4, args)
159                | (Op.sumVec _,_)        => raise Fail"what do I do?"
160    
161   (*   (*
  | (Op.addVec(n,shape),[a,b]) => CL.E_Apply(N.dot d, args)  
162   | C of int   | C of int
163   | V of int * int * ty * ty   | V of int * int * ty * ty
164   | S of int * ty * ty   | S of int * ty * ty
165    
166   | (Op.cons(ty,n))=>   | (Op.cons(ty,n))=>
   
  | (Op.subVec dim, [a, b]) =>  
  | (Op.prodVec dim, [a, b]) => CL.E_Apply(N.dot d, args)  
  | (Op.prodScaV dim, [a, b]) =>  
  | (Op.sumVec dim,[a])=>  
167   | (Op.imgAddr of ImageInfo.info * ty * int   | (Op.imgAddr of ImageInfo.info * ty * int
168   | (Op.imgLoad of ImageInfo.info * int * int   | (Op.imgLoad of ImageInfo.info * int * int
169    

Legend:
Removed from v.2620  
changed lines
  Added in v.2623

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