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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 352 - (download) (annotate)
Fri Sep 24 07:21:51 2010 UTC (10 years ago) by jhr
File size: 822 byte(s)
  Debugging probe.sml
(* test.sml
 *
 * COPYRIGHT (c) 2010 The Diderot Project (http://diderot.cs.uchicago.edu)
 * All rights reserved.
 *
 * Test driver to the generation of probe code
 *)

structure Test =
  struct

    structure II = ImageInfo
    structure FD = FieldDef
    structure K = Kernel
    structure DstIL = MidIL

    structure PP = SSAPPFn(DstIL)

    fun expand fld = let
	  val code = Probe.expand (DstIL.Var.new "result", fld, DstIL.Var.new "pos")
	  in
	    print(concat["expand (", FD.toString fld, "):\n"]);
	    List.app (fn s => print("\t" ^ PP.assignToString s ^ "\n")) code
	  end

  (* fake 3D image info *)
    val img3d = II.ImgInfo{
	    id = OS.FileSys.fileId "/dev/null",
	    dim = 3,
	    ty = ([], RawTypes.RT_Float),
	    origin = [],
	    sizes = []
	  }

    val fld1 = FD.convolve(img3d, K.bspln3)

  end

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