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

SCM Repository

[diderot] View of /branches/vis12/src/compiler/driver/backend.sml
ViewVC logotype

View of /branches/vis12/src/compiler/driver/backend.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1704 - (download) (annotate)
Tue Mar 6 15:44:37 2012 UTC (8 years, 7 months ago) by jhr
File size: 730 byte(s)
  Working on adding library support to compiler
(* backend.sml
 *
 * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
 * All rights reserved.
 *)

structure BackEnd : sig

    val generate : TargetUtil.target_desc -> string * LowIL.program -> unit

  end = struct

    fun pickBackend target = (case target
	   of TargetUtil.TARGET_C => CBackEnd.generate
	    | TargetUtil.TARGET_CL => CLBackEnd.generate 
	    | TargetUtil.TARGET_CUDA => raise Fail "CUDA not supported yet"
	  (* end case *))

    fun generate {exec, target, parallel, double, debug} = let
	  val gen = pickBackend target
	  in
	    fn (basename, prog) => gen {
		basename=basename, exec=exec,
		double=double, parallel=parallel, debug=debug,
		prog=prog
	      }
	  end

  end

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