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

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/high-il/check-high-il.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/high-il/check-high-il.sml

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

revision 1955, Sun Jul 8 09:13:35 2012 UTC revision 1956, Sun Jul 8 12:17:56 2012 UTC
# Line 51  Line 51 
51                  (Ty.TensorTy[d2, d3], [Ty.TensorTy[d1], ty])                  (Ty.TensorTy[d2, d3], [Ty.TensorTy[d1], ty])
52              | Op.MulTen3Vec(ty as Ty.TensorTy[d1, d2, d3]) =>              | Op.MulTen3Vec(ty as Ty.TensorTy[d1, d2, d3]) =>
53                  (Ty.TensorTy[d1, d2], [ty, Ty.TensorTy[d3]])                  (Ty.TensorTy[d1, d2], [ty, Ty.TensorTy[d3]])
54                | Op.ColonMul(ty1 as Ty.TensorTy dd1, ty2 as Ty.TensorTy(d21::d22::dd2)) => let
55                    fun last2 ([d1, d2], prefix) = (prefix, d1, d2)
56                      | last2 (d::dd, prefix) = last2(dd, d::prefix)
57                      | last2 _ = raise Fail("sigOf: invalid operator " ^ Op.toString rator)
58                    val (prefix, d11, d12) = last2 (dd1, [])
59                    in
60                      if (d11 <> d21) orelse (d12 <> d22)
61                        then raise Fail("sigOf: invalid operator " ^ Op.toString rator)
62                        else (Ty.TensorTy(List.revAppend(prefix, dd2)), [ty1, ty2])
63                    end
64              | Op.Cross => (Ty.vec3Ty, [Ty.vec3Ty, Ty.vec3Ty])              | Op.Cross => (Ty.vec3Ty, [Ty.vec3Ty, Ty.vec3Ty])
65              | Op.Outer(ty as Ty.TensorTy[d1, d2]) => (ty, [Ty.TensorTy[d1], Ty.TensorTy[d2]])              | Op.Outer(ty as Ty.TensorTy[d1, d2]) => (ty, [Ty.TensorTy[d1], Ty.TensorTy[d2]])
66              | Op.Norm ty => (Ty.realTy, [ty])              | Op.Norm ty => (Ty.realTy, [ty])

Legend:
Removed from v.1955  
changed lines
  Added in v.1956

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