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

SCM Repository

[diderot] Diff of /branches/ein16/src/compiler/low-il/helper.sml
ViewVC logotype

Diff of /branches/ein16/src/compiler/low-il/helper.sml

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

revision 4409, Fri Aug 12 17:46:21 2016 UTC revision 4410, Fri Aug 12 18:28:32 2016 UTC
# Line 141  Line 141 
141      fun indexTensor(opset,_,(lhs,params,args,id, []  ,ty)) = (opset,List.nth(args,id),[])      fun indexTensor(opset,_,(lhs,params,args,id, []  ,ty)) = (opset,List.nth(args,id),[])
142        | indexTensor(_,_,(lhs,params,args,id, [_,_,_],DstTy.TensorTy [_,_,_,_] )) = raise Fail "uneven"        | indexTensor(_,_,(lhs,params,args,id, [_,_,_],DstTy.TensorTy [_,_,_,_] )) = raise Fail "uneven"
143        | indexTensor(opset,mapp,(lhs,params,args,id,ix,ty))= let        | indexTensor(opset,mapp,(lhs,params,args,id,ix,ty))= let
144    
145          val nU=List.nth(args,id)          val nU=List.nth(args,id)
146          val ixx=(List.map (fn (e1)=> mapIndex(e1,mapp)) ix)          val ixx=(List.map (fn (e1)=>(mapIndex(e1,mapp))) ix)
147          val ix'= ixx          val ix'= ixx
148          val argTy=getTensorTy(params,id)          val argTy=getTensorTy(params,id)
149          val opp=DstOp.IndexTensor(id,ix',argTy)          val opp=DstOp.IndexTensor(id,ix',argTy)
150          val name=String.concat["Indx_",iToss ixx,"_"]          val name=String.concat["Indx_",iToss ixx,"_"]
151           (* val _ = print(name)*)
152          in          in
153              assignOP(opset,opp,[nU],name,ty)              assignOP(opset,opp,[nU],name,ty)
154          end          end

Legend:
Removed from v.4409  
changed lines
  Added in v.4410

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