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

SCM Repository

[diderot] Annotation of /trunk/src/compiler/basis/basis-names.sml
ViewVC logotype

Annotation of /trunk/src/compiler/basis/basis-names.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3349 - (view) (download)

1 : jhr 47 (* basis-names.sml
2 :     *
3 : jhr 3349 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
4 :     *
5 :     * COPYRIGHT (c) 2015 The University of Chicago
6 : jhr 47 * All rights reserved.
7 :     *
8 :     * Builtin names used for Basis functions.
9 :     *)
10 :    
11 :     structure BasisNames =
12 :     struct
13 :    
14 : jhr 1116 (* binary operators (in precedence order) *)
15 : jhr 47 val op_lt = Atom.atom "<"
16 :     val op_lte = Atom.atom "<="
17 : jhr 79 val op_equ = Atom.atom "=="
18 : jhr 47 val op_neq = Atom.atom "!="
19 :     val op_gte = Atom.atom ">="
20 :     val op_gt = Atom.atom ">"
21 : jhr 1116 val op_add = Atom.atom "+"
22 :     val op_sub = Atom.atom "-"
23 :     val op_mul = Atom.atom "*"
24 :     val op_dot = Atom.atom "•" (* u2022 *)
25 :     val op_cross = Atom.atom "×" (* u00d7 *)
26 :     val op_convolve = Atom.atom "⊛" (* u229b *)
27 :     val op_outer = Atom.atom "⊗" (* u2297 *)
28 : jhr 2356 val op_colon = Atom.atom ":"
29 : jhr 1116 val op_div = Atom.atom "/"
30 :     val op_exp = Atom.atom "^"
31 : jhr 1296 val op_at = Atom.atom "@" (* obsolete *)
32 : jhr 79
33 : jhr 1296 (* assignment operators *)
34 :     val asgn_add = Atom.atom "+="
35 :     val asgn_sub = Atom.atom "-="
36 :     val asgn_mul = Atom.atom "*="
37 :     val asgn_div = Atom.atom "/="
38 :     (* QUESTION: do we want ^= ? *)
39 :    
40 : jhr 79 (* unary operators *)
41 :     val op_neg = Atom.atom "unary -"
42 :     val op_not = Atom.atom "!"
43 : jhr 1116 val op_D = Atom.atom "∇" (* u2207 *)
44 :     val op_Ddot = Atom.atom "∇•" (* u2207, u2022 *)
45 :     val op_Dotimes = Atom.atom "∇⊗" (* u2207, u2297 *)
46 : jhr 2356 val op_curl = Atom.atom "∇×" (* u2207, u00d7 *)
47 : jhr 47 val op_norm = Atom.atom "|()|"
48 :    
49 :     (* function names *)
50 : jhr 1116 val fn_abs = Atom.atom "abs"
51 : jhr 1295 val fn_clamp = Atom.atom "clamp"
52 : jhr 1116 val fn_evecs = Atom.atom "evecs"
53 :     val fn_evals = Atom.atom "evals"
54 : jhr 2474 val fn_image = Atom.atom "image"
55 : jhr 47 val fn_inside = Atom.atom "inside"
56 : jhr 1116 val fn_lerp = Atom.atom "lerp"
57 : jhr 47 val fn_load = Atom.atom "load"
58 : jhr 143 val fn_max = Atom.atom "max"
59 :     val fn_min = Atom.atom "min"
60 : jhr 83 val fn_modulate = Atom.atom "modulate"
61 : jhr 1116 val fn_normalize = Atom.atom "normalize"
62 : jhr 57 val fn_principleEvec = Atom.atom "principleEvec"
63 : jhr 1116 val fn_trace = Atom.atom "trace"
64 : jhr 2356 val fn_transpose = Atom.atom "transpose"
65 : jhr 3082 val fn_det = Atom.atom "det"
66 : jhr 47
67 :     (* kernel names *)
68 :     val kn_bspln3 = Atom.atom "bspln3"
69 : jhr 169 val kn_bspln5 = Atom.atom "bspln5"
70 : jhr 2356 val kn_c4hexic = Atom.atom "c4hexic"
71 : jhr 169 val kn_ctmr = Atom.atom "ctmr"
72 : glk 53 val kn_tent = Atom.atom "tent"
73 : jhr 1116 val kn_c1tent = Atom.atom "c1tent" (* fake version of tent for demo purposes *)
74 :     val kn_c2ctmr = Atom.atom "c2ctmr" (* fake version of ctmr for demo purposes *)
75 : jhr 47
76 :     end

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