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

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/nrrd/nrrd-enums.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/nrrd/nrrd-enums.sml

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

revision 1789, Tue Apr 3 14:19:50 2012 UTC revision 1790, Tue Apr 3 14:40:55 2012 UTC
# Line 111  Line 111 
111            (* end case *))            (* end case *))
112    
113    (* convert a nrrd type to its nrrd enum constant *)    (* convert a nrrd type to its nrrd enum constant *)
114      fun tyToEnum k = (case k      fun tyToEnum ty = (case ty
115             of TypeChar => "nrrdTypeChar"             of TypeChar => "nrrdTypeChar"
116              | TypeUChar => "nrrdTypeUChar"              | TypeUChar => "nrrdTypeUChar"
117              | TypeShort => "nrrdTypeShort"              | TypeShort => "nrrdTypeShort"
# Line 124  Line 124 
124              | TypeDouble => "nrrdTypeDouble"              | TypeDouble => "nrrdTypeDouble"
125            (* end case *))            (* end case *))
126    
127      (* convert a nrrd type to a RawType.ty *)
128        fun tyToRaw ty = (case ty
129               of TypeChar => RawTypes.RT_Int8
130                | TypeUChar => RawTypes.RT_UInt8
131                | TypeShort => RawTypes.RT_Int16
132                | TypeUShort => RawTypes.RT_UInt16
133                | TypeInt => RawTypes.RT_Int32
134                | TypeUInt => RawTypes.RT_UInt32
135                | TypeLLong => RawTypes.RT_Int64
136                | TypeULLong => RawTypes.RT_UInt64
137                | TypeFloat => RawTypes.RT_Float
138                | TypeDouble => RawTypes.RT_Double
139              (* end case *))
140    
141        fun rawToTy rty = (case rty
142               of RawTypes.RT_Int8 => TypeChar
143                | RawTypes.RT_UInt8 => TypeUChar
144                | RawTypes.RT_Int16 => TypeShort
145                | RawTypes.RT_UInt16 => TypeUShort
146                | RawTypes.RT_Int32 => TypeInt
147                | RawTypes.RT_UInt32 => TypeUInt
148                | RawTypes.RT_Int64 => TypeLLong
149                | RawTypes.RT_UInt64 => TypeULLong
150                | RawTypes.RT_Float => TypeFloat
151                | RawTypes.RT_Double => TypeDouble
152              (* end case *))
153    
154    end    end

Legend:
Removed from v.1789  
changed lines
  Added in v.1790

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