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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/mid-to-low/gen-ein.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/mid-to-low/gen-ein.sml

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

revision 2610, Fri May 2 18:31:56 2014 UTC revision 2611, Mon May 5 21:21:12 2014 UTC
# Line 94  Line 94 
94    
95          | E.Const c=> gHelper.mkC(c)          | E.Const c=> gHelper.mkC(c)
96          | E.Tensor(id,[])=>  gHelper.mkSca(empty,(id,[],args))          | E.Tensor(id,[])=>  gHelper.mkSca(empty,(id,[],args))
97          | E.Tensor(id,ix)=>  gHelper.mkSca(getMapp(1),(id,ix,args))  | E.Tensor(id,ix)=>  (gHelper.mkSca(getMapp(1),(id,ix,args)))
98    
99          | E.Delta(i,j)=> gHelper.evalDelta2(i,j,getMapp(1))          | E.Delta(i,j)=> gHelper.evalDelta2(i,j,getMapp(1))
100          | E.Epsilon(i,j,k)=> let          | E.Epsilon(i,j,k)=> let
# Line 202  Line 202 
202              end)              end)
203    
204          | E.Sum(sumx, e)=> let          | E.Sum(sumx, e)=> let
   
205              fun sumloop(mapsum)= (jx:=mapsum; let              fun sumloop(mapsum)= (jx:=mapsum; let
206    
207                  val(vA,A)=gen e                  val(vA,A)=gen e
# Line 242  Line 241 
241    
242              (*end case*))              (*end case*))
243    
244          in gen body end  in (gen body) end
245    
246  (*Below functions are used to check for vectorization*)  (*Below functions are used to check for vectorization*)
247  (*Check Addition expression *)  (*Check Addition expression *)
# Line 401  Line 400 
400      val  sx= ref[]      val  sx= ref[]
401      val n=length index      val n=length index
402      val args=(a,params)      val args=(a,params)
403        val _=print "\n in genfn "
404    
405     fun gen b=(case b     fun gen b=(case b
406          of  E.Field _ =>raise Fail(concat["Invalid Field here "]   )          of  E.Field _ =>raise Fail(concat["Invalid Field here "]   )
# Line 450  Line 449 
449              end              end
450    
451          | E.Sum(sx', e)=> (let          | E.Sum(sx', e)=> (let
452                val _=print "\n in summation"
453              val ref x=sx              val ref x=sx
454    
455              in   sx:=x@sx' end ;gen e)              in   sx:=x@sx' end ;gen e)
456          | _ => prodIter(index,index,generalfn,(body,[],origargs, args))  | _ => (print "other summation";prodIter(index,index,generalfn,(body,[],origargs, args)))
457          (*end case*))          (*end case*))
458    
459      (*Scalars only, not vectorization potential*)      (*Scalars only, not vectorization potential*)

Legend:
Removed from v.2610  
changed lines
  Added in v.2611

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