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

SCM Repository

[diderot] View of /branches/vis15/src/compiler/low-to-tree/low-to-tree.sml
ViewVC logotype

View of /branches/vis15/src/compiler/low-to-tree/low-to-tree.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3828 - (download) (annotate)
Thu May 5 19:55:46 2016 UTC (3 years, 1 month ago) by jhr
File size: 2479 byte(s)
  Working on merge
(* low-to-tree.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 LowToTree : sig

    type vector_layout = int -> TreeTypes.t

    val translate : LowIR.program * vector_layout -> TreeIR.program

  end = struct

    structure SrcIR = LowIR
    structure DstIR = TreeIR

    fun trOp () = (case rator
	   of SrcOp.IAdd
	    | SrcOp.ISub
	    | SrcOp.IMul
	    | SrcOp.IDiv
	    | SrcOp.IMod
	    | SrcOp.INeg
	    | SrcOp.RAdd
	    | SrcOp.RSub
	    | SrcOp.RMul
	    | SrcOp.RDiv
	    | SrcOp.RNeg
	    | SrcOp.LT ty =>
	    | SrcOp.LTE ty =>
	    | SrcOp.EQ ty =>
	    | SrcOp.NEQ ty =>
	    | SrcOp.GT ty =>
	    | SrcOp.GTE ty =>
	    | SrcOp.Not
	    | SrcOp.Abs ty =>
	    | SrcOp.Max ty =>
	    | SrcOp.Min ty =>
	    | SrcOp.Clamp ty =>
	    | SrcOp.Lerp ty =>
	    | SrcOp.VAdd of int
	    | SrcOp.VSub of int
	    | SrcOp.VScale of int
	    | SrcOp.VMul of int
	    | SrcOp.VNeg of int
	    | SrcOp.VSum of int
	    | SrcOp.VProj of int * int
	    | SrcOp.TensorIndex of ty * shape
	    | SrcOp.ProjectLast of ty * shape
	    | SrcOp.EigenVecs2x2
	    | SrcOp.EigenVecs3x3
	    | SrcOp.EigenVals2x2
	    | SrcOp.EigenVals3x3
	    | SrcOp.Zero ty =>
	    | SrcOp.Select of ty * int
	    | SrcOp.Subscript ty =>
	    | SrcOp.MkDynamic of ty * int
	    | SrcOp.Append ty =>
	    | SrcOp.Prepend ty =>
	    | SrcOp.Concat ty =>
	    | SrcOp.Range
	    | SrcOp.Length ty =>
	    | SrcOp.SphereQuery of ty * ty
	    | SrcOp.Sqrt
	    | SrcOp.Cos
	    | SrcOp.ArcCos
	    | SrcOp.Sin
	    | SrcOp.ArcSin
	    | SrcOp.Tan
	    | SrcOp.ArcTan
	    | SrcOp.Ceiling of int
	    | SrcOp.Floor of int
	    | SrcOp.Round of int
	    | SrcOp.Trunc of int
	    | SrcOp.IntToReal
	    | SrcOp.RealToInt of int
	    | SrcOp.R_All ty =>
	    | SrcOp.R_Exists ty =>
	    | SrcOp.R_Max ty =>
	    | SrcOp.R_Min ty =>
	    | SrcOp.R_Sum ty =>
	    | SrcOp.R_Product ty =>
	    | SrcOp.R_Mean ty =>
	    | SrcOp.R_Variance ty =>
	    | SrcOp.Transform of ImageInfo.info
	    | SrcOp.Translate of ImageInfo.info
	    | SrcOp.ControlIndex of ImageInfo.info * idxctl * int
	    | SrcOp.LoadVoxel of ImageInfo.info
	    | SrcOp.Inside of ImageInfo.info * int
	    | SrcOp.ImageDim of ImageInfo.info * int
	    | SrcOp.LoadSeq of ty * string
	    | SrcOp.LoadImage of ty * string
	    | SrcOp.Print of tys
	    | SrcOp.MathFn of MathFns.t
	  (* end case *))

  end

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