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

SCM Repository

[diderot] View of /branches/vis15/src/compiler/c-util/runtime-names.sml
ViewVC logotype

View of /branches/vis15/src/compiler/c-util/runtime-names.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3810 - (download) (annotate)
Tue May 3 23:26:44 2016 UTC (3 years ago) by jhr
File size: 1282 byte(s)
  Working on merge
(* runtime-names.sml
 *
 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
 *
 * COPYRIGHT (c) 2016 The University of Chicago
 * All rights reserved.
 *)

structure RuntimeNames =
  struct

  (* Run-time system functions for images *)
    fun setImage dim = concat["Diderot::SetImage", Int.toString dim, "D"]
    fun loadImage dim = concat["Diderot::LoadImage", Int.toString dim, "D"]
    fun freeImage dim = concat["Diderot::FreeImage", Int.toString dim, "D"]

  (* Run-time system functions for dynamic sequences *)
(* FIXME: should these be DynSeqLoad<ty>? *)
    fun loadDynSeq ty = (case ty
           of APITypes.BoolTy => "Diderot::DynSeqLoadBool"
            | APITypes.IntTy => "Diderot::DynSeqLoadInt"
            | APITypes.TensorTy _ => "Diderot::DynSeqLoadReal"
            | ty => raise Fail("unsupported sequence type " ^ APITypes.toString ty)
          (* end case *))

    fun loadDynSeqFromFile ty = (case ty
           of APITypes.BoolTy => "Diderot::DynSeqLoadBoolFromFile"
            | APITypes.IntTy => "Diderot::DynSeqLoadIntFromFile"
            | APITypes.TensorTy _ => "Diderot::DynSeqLoadRealFromFile"
            | ty => raise Fail("unsupported sequence type " ^ APITypes.toString ty)
          (* end case *))

  end

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