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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/ein/mkoperators.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/ein/mkoperators.sml

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

revision 2509, Tue Nov 12 21:24:35 2013 UTC revision 2510, Thu Nov 14 20:33:18 2013 UTC
# Line 256  Line 256 
256          fun hessian(dim,alpha)= let          fun hessian(dim,alpha)= let
257               val n=length(alpha)               val n=length(alpha)
258               fun expIndex(n,inc)=List.tabulate(n, (fn(x)=>E.V (x+inc)))               fun expIndex(n,inc)=List.tabulate(n, (fn(x)=>E.V (x+inc)))
259               val i'=expIndex(n,0)               val i'=expIndex(n,1)
260    
261              in              in
262              E.EIN{              E.EIN{
263              params = [E.FLD(dim)],              params = [E.FLD(dim)],
264              index =alpha@[dim,dim],              index =[dim]@alpha,
265              body = E.Apply(E.Partial [E.V (0+n), E.V (1+n)] ,E.Field(0,i'))              body = E.Apply(E.Partial [E.V (0)] ,E.Field(0,i'))
266              }              }
267              end              end
268    
# Line 287  Line 287 
287          end          end
288    
289      (* Probe: <F(x)>_{\alpha}   *)      (* Probe: <F(x)>_{\alpha}   *)
290      fun probe(alpha,dim,shape) = let      fun probe(alpha,dim) = let
291          val (indexT, expindexT)= specialize(alpha,0)          val (indexT, expindexT)= specialize(alpha,0)
292          val (indexF, expindexF)= specialize(shape,length(alpha))  
293          in E.EIN{          in E.EIN{
294              params = [E.TEN,E.FLD(dim)],              params = [E.FLD(dim),E.TEN],
295              index= (indexT@indexF),              index= indexT,
296              body= E.Probe(E.Field(1, expindexF), E.Tensor(0,expindexT))              body= E.Probe(E.Field(0, expindexT), E.Tensor(1,[]))
297          }          }
298          end          end
299    

Legend:
Removed from v.2509  
changed lines
  Added in v.2510

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