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

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/inputs/inputs.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/inputs/inputs.sml

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

revision 2813, Sat Nov 8 21:48:17 2014 UTC revision 2814, Sat Nov 8 21:55:25 2014 UTC
# Line 8  Line 8 
8    
9  structure Inputs : sig  structure Inputs : sig
10    
 (*  
     datatype initialization  
       = String of string  
       | Bool of bool  
       | Int of IntInf.int  
       | Real of FloatLit.float  
       | Tensor of int list * FloatLit.float vector  
       | Seq of initialization list  
 *)  
11      datatype init_from_nrrd      datatype init_from_nrrd
12        = DynSeq of string        = DynSeq of string
13        | Proxy of string * ImageInfo.info                (* input image specified by proxy *)        | Proxy of string * ImageInfo.info                (* input image specified by proxy *)
# Line 44  Line 35 
35    
36    end = struct    end = struct
37    
 (*  
     datatype initialization  
       = String of string  
       | Bool of bool  
       | Int of IntInf.int  
       | Real of FloatLit.float  
       | Tensor of int list * FloatLit.float vector  
       | Seq of initialization list  
 *)  
38      datatype init_from_nrrd      datatype init_from_nrrd
39        = DynSeq of string        = DynSeq of string
40        | Proxy of string * ImageInfo.info                (* input image specified by proxy *)        | Proxy of string * ImageInfo.info                (* input image specified by proxy *)
# Line 69  Line 51 
51    
52      fun hash (INP{name, ...}) = HashString.hashString name      fun hash (INP{name, ...}) = HashString.hashString name
53    
 (*  
     fun initToString (String s) = String.concat["\"", String.toString s, "\""]  
       | initToString (Bool b) = Bool.toString b  
       | initToString (Int n) = if (n < 0) then "-" ^ IntInf.toString(~n) else IntInf.toString n  
       | initToString (Real f) = FloatLit.toString f  
       | initToString (Tensor(dims, vals)) = "[...]"  
       | initToString (Seq vs) = String.concat["{", String.concatWith "," (List.map initToString vs), "}"]  
       | initToString (DynSeq name) = String.concat["load(\"", name, "\")"]  
       | initToString (Proxy(name, _)) = String.concat["image(\"", name, "\")"]  
       | initToString (Image info) = ImageInfo.toString info  
 *)  
54      fun initToString (DynSeq name) = String.concat["load(\"", name, "\")"]      fun initToString (DynSeq name) = String.concat["load(\"", name, "\")"]
55        | initToString (Proxy(name, _)) = String.concat["image(\"", name, "\")"]        | initToString (Proxy(name, _)) = String.concat["image(\"", name, "\")"]
56        | initToString (Image info) = ImageInfo.toString info        | initToString (Image info) = ImageInfo.toString info

Legend:
Removed from v.2813  
changed lines
  Added in v.2814

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