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

SCM Repository

[diderot] Annotation of /branches/vis15/src/compiler/cxx-util/cxx-names.sml
ViewVC logotype

Annotation of /branches/vis15/src/compiler/cxx-util/cxx-names.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3888 - (view) (download)
Original Path: branches/vis15/src/compiler/cxx-util/runtime-names.sml

1 : jhr 3810 (* runtime-names.sml
2 :     *
3 :     * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
4 :     *
5 :     * COPYRIGHT (c) 2016 The University of Chicago
6 :     * All rights reserved.
7 :     *)
8 :    
9 :     structure RuntimeNames =
10 :     struct
11 :    
12 :     (* Run-time system functions for images *)
13 :     fun setImage dim = concat["Diderot::SetImage", Int.toString dim, "D"]
14 :     fun loadImage dim = concat["Diderot::LoadImage", Int.toString dim, "D"]
15 :     fun freeImage dim = concat["Diderot::FreeImage", Int.toString dim, "D"]
16 :    
17 :     (* Run-time system functions for dynamic sequences *)
18 :     (* FIXME: should these be DynSeqLoad<ty>? *)
19 :     fun loadDynSeq ty = (case ty
20 :     of APITypes.BoolTy => "Diderot::DynSeqLoadBool"
21 :     | APITypes.IntTy => "Diderot::DynSeqLoadInt"
22 :     | APITypes.TensorTy _ => "Diderot::DynSeqLoadReal"
23 :     | ty => raise Fail("unsupported sequence type " ^ APITypes.toString ty)
24 :     (* end case *))
25 :    
26 :     fun loadDynSeqFromFile ty = (case ty
27 :     of APITypes.BoolTy => "Diderot::DynSeqLoadBoolFromFile"
28 :     | APITypes.IntTy => "Diderot::DynSeqLoadIntFromFile"
29 :     | APITypes.TensorTy _ => "Diderot::DynSeqLoadRealFromFile"
30 :     | ty => raise Fail("unsupported sequence type " ^ APITypes.toString ty)
31 :     (* end case *))
32 :    
33 :     end

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