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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1677 - (download) (annotate)
Fri Dec 16 22:17:33 2011 UTC (8 years, 10 months ago) by jhr
File size: 694 byte(s)
  Working on CUDA target
(* 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 => CUDABackEnd.generate
	  (* end case *))

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

  end

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