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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/c-util/tree-to-c-fn.sml
ViewVC logotype

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

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

revision 1524, Mon Oct 10 18:29:43 2011 UTC revision 1525, Thu Oct 13 15:57:40 2011 UTC
# Line 164  Line 164 
164                    then CL.E_Apply(N.mulMatMat(m,n,p), args)                    then CL.E_Apply(N.mulMatMat(m,n,p), args)
165                    else raise Fail "unsupported matrix-matrix multiply"                    else raise Fail "unsupported matrix-matrix multiply"
166              | (Op.Cross, args) => CL.E_Apply(N.cross(), args)              | (Op.Cross, args) => CL.E_Apply(N.cross(), args)
             | (Op.Select(Ty.SeqTy(Ty.IntTy, n), i), [a]) => ivecIndex (a, n, i)  
             | (Op.Select(Ty.TensorTy[n], i), [a]) => vecIndex (a, n, i)  
167              | (Op.Norm(Ty.TensorTy[n]), args) => CL.E_Apply(N.length n, args)              | (Op.Norm(Ty.TensorTy[n]), args) => CL.E_Apply(N.length n, args)
168              | (Op.Norm(Ty.TensorTy[m,n]), args) => CL.E_Apply(N.norm(m,n), args)              | (Op.Norm(Ty.TensorTy[m,n]), args) => CL.E_Apply(N.norm(m,n), args)
169              | (Op.Normalize d, args) => CL.E_Apply(N.normalize d, args)              | (Op.Normalize d, args) => CL.E_Apply(N.normalize d, args)
170              | (Op.Scale(Ty.TensorTy[n]), args) => CL.E_Apply(N.scale n, args)              | (Op.Scale(Ty.TensorTy[n]), args) => CL.E_Apply(N.scale n, args)
171              | (Op.PrincipleEvec ty, _) => raise Fail "PrincipleEvec unimplemented"              | (Op.PrincipleEvec ty, _) => raise Fail "PrincipleEvec unimplemented"
172                | (Op.Select(Ty.TupleTy tys, i), [a]) => raise Fail "Select unimplemented"
173                | (Op.Index(Ty.SeqTy(Ty.IntTy, n), i), [a]) => ivecIndex (a, n, i)
174                | (Op.Index(Ty.TensorTy[n], i), [a]) => vecIndex (a, n, i)
175              | (Op.Subscript(Ty.SeqTy(Ty.IntTy, n)), [v, ix]) => let              | (Op.Subscript(Ty.SeqTy(Ty.IntTy, n)), [v, ix]) => let
176                  val unionTy = CL.T_Named(concat["union", Int.toString n, !N.gIntSuffix, "_t"])                  val unionTy = CL.T_Named(concat["union", Int.toString n, !N.gIntSuffix, "_t"])
177                  val vecExp = CL.mkSelect(CL.mkCast(unionTy, v), "i")                  val vecExp = CL.mkSelect(CL.mkCast(unionTy, v), "i")

Legend:
Removed from v.1524  
changed lines
  Added in v.1525

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