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

SCM Repository

[diderot] View of /branches/vis15/src/compiler/options/target-options.sml
ViewVC logotype

View of /branches/vis15/src/compiler/options/target-options.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3812 - (download) (annotate)
Wed May 4 13:16:31 2016 UTC (3 years ago) by jhr
File size: 1661 byte(s)
  working on merge
(* target-options.sml
 *
 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
 *
 * COPYRIGHT (c) 2015 The University of Chicago
 * All rights reserved.
 *
 * Utility support for target selection, etc.
 *)

structure TargetOptions =
  struct

    datatype platform
      = SEQUENTIAL	(* sequential code for the CPU *)
      | PARALLEL	(* parallel code for the CPU *)
      | OPENCL		(* OpenCL *)
      | CUDA		(* CUDA *)

  (* the target descriptor collects together the information specified on the Diderot
   * compiler's command-line.
   *)
    type t = {
        srcFile : string,               (* source filename *)
        outDir : string,                (* directory to put output *)
        outBase : string,               (* basename for output or name of executable *)
        exec : bool,                    (* generate standalone executable? *)
        snapshot : bool,                (* generate functions to get snapshot *)
        platform : platform,            (* target platform *)
        namespace : string,             (* optional namespace prefix *)
        double : bool,                  (* true for double-precision candidates *)
        longint : bool,                 (* true for 64-bit integers (not currently used) *)
        debug : bool,                   (* true if debugging of the target is enabled *)
        bsp : bool                      (* true if BSP style execution should always be used *)
      }

    fun platformToString SEQUENTIAL = "SEQUENTIAL"
      | platformToString PARALLEL = "PARALLEL"
      | platformToString OPENCL = "OPENCL"
      | platformToString CUDA = "CUDA"

  end

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