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

SCM Repository

[diderot] Annotation of /trunk/src/compiler/driver/backend.sml
ViewVC logotype

Annotation of /trunk/src/compiler/driver/backend.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2486 - (view) (download)

1 : jhr 1232 (* backend.sml
2 :     *
3 :     * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
4 :     * All rights reserved.
5 :     *)
6 :    
7 :     structure BackEnd : sig
8 :    
9 : jhr 2486 (* generic interface to backend codegenerators. The first argument specifies the
10 :     * target
11 :     *)
12 : jhr 1232 val generate : TargetUtil.target_desc -> string * LowIL.program -> unit
13 :    
14 :     end = struct
15 :    
16 :     fun pickBackend target = (case target
17 :     of TargetUtil.TARGET_C => CBackEnd.generate
18 : jhr 1671 | TargetUtil.TARGET_CL => CLBackEnd.generate
19 : jhr 1232 | TargetUtil.TARGET_CUDA => raise Fail "CUDA not supported yet"
20 :     (* end case *))
21 :    
22 :     fun generate {target, parallel, double, debug} = let
23 :     val gen = pickBackend target
24 :     in
25 :     fn (basename, prog) => gen {
26 :     basename=basename, double=double, parallel=parallel, debug=debug, prog=prog
27 :     }
28 :     end
29 :    
30 :     end

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