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

SCM Repository

[diderot] Annotation of /trunk/src/compiler/high-to-mid/test.sml
ViewVC logotype

Annotation of /trunk/src/compiler/high-to-mid/test.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 352 - (view) (download)

1 : jhr 351 (* test.sml
2 :     *
3 :     * COPYRIGHT (c) 2010 The Diderot Project (http://diderot.cs.uchicago.edu)
4 :     * All rights reserved.
5 :     *
6 :     * Test driver to the generation of probe code
7 :     *)
8 :    
9 :     structure Test =
10 :     struct
11 :    
12 :     structure II = ImageInfo
13 :     structure FD = FieldDef
14 :     structure K = Kernel
15 :     structure DstIL = MidIL
16 :    
17 :     structure PP = SSAPPFn(DstIL)
18 :    
19 :     fun expand fld = let
20 :     val code = Probe.expand (DstIL.Var.new "result", fld, DstIL.Var.new "pos")
21 :     in
22 :     print(concat["expand (", FD.toString fld, "):\n"]);
23 :     List.app (fn s => print("\t" ^ PP.assignToString s ^ "\n")) code
24 :     end
25 :    
26 : jhr 352 (* fake 3D image info *)
27 :     val img3d = II.ImgInfo{
28 :     id = OS.FileSys.fileId "/dev/null",
29 :     dim = 3,
30 :     ty = ([], RawTypes.RT_Float),
31 :     origin = [],
32 :     sizes = []
33 :     }
34 :    
35 :     val fld1 = FD.convolve(img3d, K.bspln3)
36 :    
37 : jhr 351 end

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