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

SCM Repository

[diderot] Diff of /trunk/src/compiler/IL/high-il.sml
ViewVC logotype

Diff of /trunk/src/compiler/IL/high-il.sml

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

revision 166, Wed Jul 21 15:21:12 2010 UTC revision 184, Wed Jul 28 16:48:27 2010 UTC
# Line 9  Line 9 
9  structure HighOps =  structure HighOps =
10    struct    struct
11    
12      type ty = IntTy | TensorTy of int list      type ty = BoolTy | StringTy | IntTy | TensorTy of int list
13    
14      fun sameTy (ty1 : ty, ty2) = (ty1 = ty2)      fun sameTy (ty1 : ty, ty2) = (ty1 = ty2)
15    
# Line 17  Line 17 
17        = Add of ty | Sub of ty                   (* type-indexed arithmetic operations *)        = Add of ty | Sub of ty                   (* type-indexed arithmetic operations *)
18        | Mul of ty | Div of ty        | Mul of ty | Div of ty
19        | Neg of ty        | Neg of ty
20          | LT of ty | LTE of ty
21          | EQ of ty | NEQ of ty
22          | GT of ty | GTE of ty
23        | Dot of ty | Cross | Norm of ty          (* vector operations *)        | Dot of ty | Cross | Norm of ty          (* vector operations *)
24        | Scale of ty                             (* scalar/tensor multiplication *)        | Scale of ty                             (* scalar*tensor multiplication *)
25          | InvScale of ty                          (* tensor/scalar division *)
26        | CL                                      (* linear anisotropy measure *)        | CL                                      (* linear anisotropy measure *)
27        | PrincipleEvec                           (* principle eigenvector *)        | PrincipleEvec                           (* principle eigenvector *)
28        | Subscript of ty        | Subscript of ty
29        | Max | Min        | Max | Min
30        | Sin | Cos        | Sin | Cos
31        | Pow        | Pow
32          | Not                                     (* boolean negation *)
33      (* conversions *)      (* conversions *)
34        | IntToReal        | IntToReal
35        | TruncToInt        | TruncToInt
# Line 43  Line 48 
48        | arity (Mul _) = 2        | arity (Mul _) = 2
49        | arity (Div _) = 2        | arity (Div _) = 2
50        | arity (Neg _) = 1        | arity (Neg _) = 1
51          | arity (LT _) = 2
52          | arity (LTE _) = 2
53          | arity (EQ _) = 2
54          | arity (NEQ _) = 2
55          | arity (GT _) = 2
56          | arity (GTE _) = 2
57        | arity (Dot _) = 2        | arity (Dot _) = 2
58        | arity Cross = 2        | arity Cross = 2
59        | arity (Norm _) = 1        | arity (Norm _) = 1
# Line 55  Line 66 
66        | arity Sin = 1        | arity Sin = 1
67        | arity Cos = 1        | arity Cos = 1
68        | arity Pow = 2        | arity Pow = 2
69          | arity Not = 1
70        | arity IntToReal = 1        | arity IntToReal = 1
71        | arity TruncToInt = 1        | arity TruncToInt = 1
72        | arity RoundToInt = 1        | arity RoundToInt = 1
# Line 71  Line 83 
83        | same (Mul ty1, Mul ty2) = sameTy(ty1, ty2)        | same (Mul ty1, Mul ty2) = sameTy(ty1, ty2)
84        | same (Div ty1, Div ty2) = sameTy(ty1, ty2)        | same (Div ty1, Div ty2) = sameTy(ty1, ty2)
85        | same (Neg ty1, Neg ty2) = sameTy(ty1, ty2)        | same (Neg ty1, Neg ty2) = sameTy(ty1, ty2)
86          | same (LT ty1, LT ty2) = sameTy(ty1, ty2)
87          | same (LTE ty1, LTE ty2) = sameTy(ty1, ty2)
88          | same (EQ ty1, EQ ty2) = sameTy(ty1, ty2)
89          | same (NEQ ty1, NEQ ty2) = sameTy(ty1, ty2)
90          | same (GT ty1, GT ty2) = sameTy(ty1, ty2)
91          | same (GTE ty1, GTE ty2) = sameTy(ty1, ty2)
92        | same (Dot ty1, Dot ty2) = sameTy(ty1, ty2)        | same (Dot ty1, Dot ty2) = sameTy(ty1, ty2)
93        | same (Cross, Cross) = true        | same (Cross, Cross) = true
94        | same (Norm ty1, Norm ty2) = sameTy(ty1, ty2)        | same (Norm ty1, Norm ty2) = sameTy(ty1, ty2)
# Line 83  Line 101 
101        | same (Sin, Sin) = true        | same (Sin, Sin) = true
102        | same (Cos, Cos) = true        | same (Cos, Cos) = true
103        | same (Pow, Pow) = true        | same (Pow, Pow) = true
104          | same (Not, Not) = true
105        | same (IntToReal, IntToReal) = true        | same (IntToReal, IntToReal) = true
106        | same (TruncToInt, TruncToInt) = true        | same (TruncToInt, TruncToInt) = true
107        | same (RoundToInt, RoundToInt) = true        | same (RoundToInt, RoundToInt) = true

Legend:
Removed from v.166  
changed lines
  Added in v.184

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