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

SCM Repository

[diderot] Diff of /branches/lamont/src/compiler/basis/basis-vars.sml
ViewVC logotype

Diff of /branches/lamont/src/compiler/basis/basis-vars.sml

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

revision 1686, Mon Jan 23 18:49:17 2012 UTC revision 1687, Wed Jan 25 13:02:32 2012 UTC
# Line 56  Line 56 
56     *    r  -- real (tensor[])     *    r  -- real (tensor[])
57     *    t  -- tensor[shape]     *    t  -- tensor[shape]
58     *    f  -- field#k(d)[shape]     *    f  -- field#k(d)[shape]
59       *    d  -- ty{}
60       *    T  -- ty
61     *)     *)
62    
63      (* concatenation of sequences *)
64        val at_dT = polyVar (N.op_at, all([TK],
65              fn [Ty.TYPE tv] => let
66                  val seqTyc = Ty.T_DynSequence(Ty.T_Var tv)
67                  in
68                    [seqTyc, Ty.T_Var tv] --> seqTyc
69                  end))
70        val at_Td = polyVar (N.op_at, all([TK],
71              fn [Ty.TYPE tv] => let
72                  val seqTyc = Ty.T_DynSequence(Ty.T_Var tv)
73                  in
74                    [Ty.T_Var tv, seqTyc] --> seqTyc
75                  end))
76        val at_dd = polyVar (N.op_at, all([TK],
77              fn [Ty.TYPE tv] => let
78                  val seqTyc = Ty.T_DynSequence(Ty.T_Var tv)
79                  in
80                    [seqTyc, seqTyc] --> seqTyc
81                  end))
82    
83      val add_ii = monoVar(N.op_add, [Ty.T_Int, Ty.T_Int] --> Ty.T_Int)      val add_ii = monoVar(N.op_add, [Ty.T_Int, Ty.T_Int] --> Ty.T_Int)
84      val add_tt = polyVar(N.op_add, all([SK], fn [Ty.SHAPE dd] => let      val add_tt = polyVar(N.op_add, all([SK], fn [Ty.SHAPE dd] => let
85              val t = Ty.T_Tensor(Ty.ShapeVar dd)              val t = Ty.T_Tensor(Ty.ShapeVar dd)
# Line 223  Line 245 
245    
246    (***** non-overloaded operators, etc. *****)    (***** non-overloaded operators, etc. *****)
247    
248      val op_at = polyVar (N.op_at, all([DK, NK, SK],    (* pseudo-operator for probing a field *)
249        val op_probe = polyVar (N.op_at, all([DK, NK, SK],
250            fn [Ty.DIFF k, Ty.DIM d, Ty.SHAPE dd] => let            fn [Ty.DIFF k, Ty.DIM d, Ty.SHAPE dd] => let
251                val k = Ty.DiffVar(k, 0)                val k = Ty.DiffVar(k, 0)
252                val d = Ty.DimVar d                val d = Ty.DimVar d

Legend:
Removed from v.1686  
changed lines
  Added in v.1687

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