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

SCM Repository

[diderot] Diff of /trunk/src/compiler/ast/types.sml
ViewVC logotype

Diff of /trunk/src/compiler/ast/types.sml

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

revision 74, Mon May 24 16:38:42 2010 UTC revision 75, Mon May 24 20:41:18 2010 UTC
# Line 29  Line 29 
29  *)  *)
30    
31      datatype ty      datatype ty
32        = T_Var of var        = T_Var of ty_var
33        | T_Bool        | T_Bool
34        | T_Int        | T_Int
35        | T_String        | T_String
# Line 64  Line 64 
64      and diff_var = DfV of {      and diff_var = DfV of {
65            id : Stamp.stamp,            id : Stamp.stamp,
66            bound : int ref,              (* lower bound of differentiation *)            bound : int ref,              (* lower bound of differentiation *)
67            bind : diff option ref            bind : diff option ref        (* unification binding *)
68          }          }
69    
70    (* tensor shapes *)    (* tensor shapes *)
71      and shape      and shape
72        = Shape of dim list        = Shape of dim list
73        | ShapeVar of shape_var        | ShapeVar of shape_var
74        | ShapeExt of shape * nat         (* extension of shape (i.e., for D operator) *)        | ShapeExt of shape * dim         (* extension of shape (i.e., for D operator) *)
75    
76      and shape_var = SV of {      and shape_var = SV of {
77            id : Stamp.stamp,            id : Stamp.stamp,
78            bind : shape option ref            bind : shape option ref       (* unification binding *)
79          }          }
80    
81    (* dimensions *)    (* dimensions *)
# Line 85  Line 85 
85    
86      and dim_var = DV of {      and dim_var = DV of {
87            id : Stamp.stamp,            id : Stamp.stamp,
88            bind : dim option ref            bind : dim option ref         (* unification binding *)
89          }          }
90    
91      type meta_var = (ty_var, diff_var, shape_var, dim_var) kind      type meta_var = (ty_var, diff_var, shape_var, dim_var) kind
# Line 95  Line 95 
95    
96    (* useful types *)    (* useful types *)
97      val realTy = T_Tensor(Shape[])      val realTy = T_Tensor(Shape[])
98      fun vecTy n = T_Tensor(Shape[NatConst n])      fun vecTy n = T_Tensor(Shape[DimConst n])
99      val vec2Ty = vecTy 2      val vec2Ty = vecTy 2
100      val vec3Ty = vecTy 3      val vec3Ty = vecTy 3
101      val vec4Ty = vecTy 4      val vec4Ty = vecTy 4

Legend:
Removed from v.74  
changed lines
  Added in v.75

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