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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/mid-il/mid-il-types.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/mid-il/mid-il-types.sml

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

revision 2614, Fri May 9 19:23:07 2014 UTC revision 2615, Wed May 14 00:22:49 2014 UTC
# Line 20  Line 20 
20    | KernelTy    | KernelTy
21    | indexTy of int list (*Specific index *)    | indexTy of int list (*Specific index *)
22    | imgIndex of int list (*Image Index V_0 or V_1, [] for scalars*)    | imgIndex of int list (*Image Index V_0 or V_1, [] for scalars*)
23          | vectorLength of int list
24    
25    
26    
# Line 44  Line 45 
45        | same (AddrTy info1, AddrTy info2) = ImageInfo.same(info1, info2)        | same (AddrTy info1, AddrTy info2) = ImageInfo.same(info1, info2)
46        | same (ImageTy info1, ImageTy info2) = ImageInfo.same(info1, info2)        | same (ImageTy info1, ImageTy info2) = ImageInfo.same(info1, info2)
47        | same (KernelTy, KernelTy) = true        | same (KernelTy, KernelTy) = true
   
   
 (*FIx HERE*)  
48        | same (TensorTy [],intTy)=true        | same (TensorTy [],intTy)=true
49        | same (intTy,TensorTy [])=true        | same (intTy,TensorTy [])=true
   
50        | same(indexTy dd1, indexTy dd2)=(dd1=dd2)        | same(indexTy dd1, indexTy dd2)=(dd1=dd2)
51        | same (imgIndex dd1, imgIndex dd2) = (dd1=dd2)        | same (imgIndex dd1, imgIndex dd2) = (dd1=dd2)
52          | same (vectorLength dd1, vectorLength  dd2) = (dd1=dd2)
53        | same _ = false        | same _ = false
54    
55      fun hash BoolTy = 0w1      fun hash BoolTy = 0w1
# Line 65  Line 63 
63        | hash KernelTy = 0w17        | hash KernelTy = 0w17
64        | hash (imgIndex _ )=0w19        | hash (imgIndex _ )=0w19
65        | hash (indexTy _)= 0w23        | hash (indexTy _)= 0w23
66          | hash (vectorLength _)=0w29
67    
68    
69      fun toString BoolTy = "bool"      fun toString BoolTy = "bool"
70        | toString StringTy = "string"        | toString StringTy = "string"
71        | toString IntTy = "int"        | toString IntTy = "int"
72        | toString (TensorTy[]) = "real"        | toString (TensorTy[]) = "real"
73       (*) | toString (TensorTy[d]) = "real " ^ Int.toString d^"--"*)        | toString (TensorTy dd) = String.concat["tensor[", String.concatWith "," (List.map Int.toString dd), "]"  ]
74        | toString (TensorTy dd) = String.concat[        | toString (TupleTy tys) = String.concat[ "(", String.concatWith " * " (List.map toString tys), ")"]
             "tensor[", String.concatWith "," (List.map Int.toString dd), "]"  
           ]  
       | toString (TupleTy tys) = String.concat[  
             "(", String.concatWith " * " (List.map toString tys), ")"  
           ]  
75        | toString (SeqTy(ty, n)) = concat[toString ty, "{", Int.toString n, "}"]        | toString (SeqTy(ty, n)) = concat[toString ty, "{", Int.toString n, "}"]
76        | toString (AddrTy info) = concat["addr(", ImageInfo.toString info, ")"]        | toString (AddrTy info) = concat["addr(", ImageInfo.toString info, ")"]
77        | toString (ImageTy info) = concat["image(", ImageInfo.toString info, ")"]        | toString (ImageTy info) = concat["image(", ImageInfo.toString info, ")"]
# Line 85  Line 79 
79        | toString(indexTy [])="-"        | toString(indexTy [])="-"
80        | toString(indexTy dd)=String.concat["Specific Index:[", String.concatWith "," (List.map Int.toString dd), "]"]        | toString(indexTy dd)=String.concat["Specific Index:[", String.concatWith "," (List.map Int.toString dd), "]"]
81  | toString(imgIndex dd)=String.concat["ImgSpecificIndex:[", String.concatWith "," (List.map Int.toString dd), "]"]  | toString(imgIndex dd)=String.concat["ImgSpecificIndex:[", String.concatWith "," (List.map Int.toString dd), "]"]
82          | toString(vectorLength dd)=String.concat["ImgSpecificIndex:[", String.concatWith "," (List.map Int.toString dd), "]"]
83    
84    
85    end    end

Legend:
Removed from v.2614  
changed lines
  Added in v.2615

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