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

SCM Repository

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

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

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

revision 393, Thu Oct 14 15:45:01 2010 UTC revision 395, Thu Oct 14 16:52:15 2010 UTC
# Line 7  Line 7 
7  structure HighILTypes =  structure HighILTypes =
8    struct    struct
9    
10      datatype ty = BoolTy | StringTy | IntTy | TensorTy of int list      datatype ty
11          = BoolTy | StringTy | IntTy
12          | TensorTy of int list
13          | KernelTy | ImageTy | FieldTy
14    
15      fun same (ty1 : ty, ty2) = (ty1 = ty2)      fun same (ty1 : ty, ty2) = (ty1 = ty2)
16    
# Line 15  Line 18 
18        | hash StringTy = 0w2        | hash StringTy = 0w2
19        | hash IntTy = 0w3        | hash IntTy = 0w3
20        | hash (TensorTy dd) = List.foldl (fn (d, s) => Word.fromInt d + s) 0w4 dd        | hash (TensorTy dd) = List.foldl (fn (d, s) => Word.fromInt d + s) 0w4 dd
21          | hash KernelTy = 0w5
22          | hash ImageTy = 0w6
23          | hash FieldTy = 0w7
24    
25      fun toString BoolTy = "bool"      fun toString BoolTy = "bool"
26        | toString StringTy = "string"        | toString StringTy = "string"
# Line 23  Line 29 
29        | toString (TensorTy dd) = String.concat[        | toString (TensorTy dd) = String.concat[
30              "tensor[", String.concatWith "," (List.map Int.toString dd), "]"              "tensor[", String.concatWith "," (List.map Int.toString dd), "]"
31            ]            ]
32          | toString KernelTy = "kernel"
33          | toString ImageTy = "image"
34          | toString FieldTy = "field"
35    
36    end    end

Legend:
Removed from v.393  
changed lines
  Added in v.395

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