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

SCM Repository

[diderot] View of /branches/vis12/src/compiler/basis/basis-names.sml
ViewVC logotype

View of /branches/vis12/src/compiler/basis/basis-names.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1925 - (download) (annotate)
Sat Jun 23 14:16:09 2012 UTC (7 years, 4 months ago) by jhr
File size: 2307 byte(s)
  Added length function on dynamic sequences
(* basis-names.sml
 *
 * COPYRIGHT (c) 2010 The Diderot Project (http://diderot-language.cs.uchicago.edu)
 * All rights reserved.
 *
 * Builtin names used for Basis functions.
 *)

structure BasisNames =
  struct

  (* binary operators (in precedence order) *)
    val op_lt = Atom.atom "<"
    val op_lte = Atom.atom "<="
    val op_equ = Atom.atom "=="
    val op_neq = Atom.atom "!="
    val op_gte = Atom.atom ">="
    val op_gt = Atom.atom ">"
    val op_add = Atom.atom "+"
    val op_sub = Atom.atom "-"
    val op_mul = Atom.atom "*"
    val op_dot = Atom.atom "•"			(* u2022 *)
    val op_cross = Atom.atom "×"		(* u00d7 *)
    val op_convolve = Atom.atom "⊛"		(* u229b *)
    val op_outer = Atom.atom "⊗"		(* u2297 *)
    val op_div = Atom.atom "/"
    val op_exp = Atom.atom "^"
    val op_at = Atom.atom "@"

  (* assignment operators *)
    val asgn_add = Atom.atom "+="
    val asgn_sub = Atom.atom "-="
    val asgn_mul = Atom.atom "*="
    val asgn_div = Atom.atom "/="
(* QUESTION: do we want ^= ? *)

  (* unary operators *)
    val op_neg = Atom.atom "unary -"
    val op_not = Atom.atom "!"
    val op_D = Atom.atom "∇"			(* u2207 *)
    val op_Ddot = Atom.atom "∇•"		(* u2207, u2022 *)
    val op_Dotimes = Atom.atom "∇⊗"		(* u2207, u2297 *)
    val op_Dtimes = Atom.atom "∇×"		(* u2207, u00d7 *)
    val op_norm = Atom.atom "|()|"

  (* function names *)
    val fn_abs = Atom.atom "abs"
    val fn_clamp = Atom.atom "clamp"
    val fn_D = Atom.atom "D"
    val fn_evecs = Atom.atom "evecs"
    val fn_evals = Atom.atom "evals"
    val fn_inside = Atom.atom "inside"
    val fn_length = Atom.atom "length"
    val fn_lerp = Atom.atom "lerp"
    val fn_load = Atom.atom "load"
    val fn_max = Atom.atom "max"
    val fn_min = Atom.atom "min"
    val fn_modulate = Atom.atom "modulate"
    val fn_normalize = Atom.atom "normalize"
    val fn_principleEvec = Atom.atom "principleEvec"
    val fn_trace = Atom.atom "trace"

  (* kernel names *)
    val kn_bspln3 = Atom.atom "bspln3"
    val kn_bspln5 = Atom.atom "bspln5"
    val kn_ctmr = Atom.atom "ctmr"
    val kn_tent = Atom.atom "tent"
    val kn_c1tent = Atom.atom "c1tent"	(* fake version of tent for demo purposes *)
    val kn_c2ctmr = Atom.atom "c2ctmr"	(* fake version of ctmr for demo purposes *)

  end

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