Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/gen/ir/mid-ir.spec
 [diderot] / branches / vis15 / src / compiler / gen / ir / mid-ir.spec

# Diff of /branches/vis15/src/compiler/gen/ir/mid-ir.spec

revision 3775, Tue Apr 26 20:55:36 2016 UTC revision 4043, Sun Jun 26 14:00:38 2016 UTC
# Line 27  Line 27
27  Abs : ty : 1 : 1 :  Abs : ty : 1 : 1 :
28  Max : ty : 1 : 2 :  Max : ty : 1 : 2 :
29  Min : ty : 1 : 2 :  Min : ty : 1 : 2 :
30  # Clamp<ty>(lo, hi, x) -- clamps x to the range lo..hi  # Clamp<ty>(lo, hi, x) -- clamps x to the range lo..hi, where lo and hi are scalars and x
31    # has type ty
32  Clamp : ty : 1 : 3 : clamp argument to range  Clamp : ty : 1 : 3 : clamp argument to range
33  # Lerp<ty>(a, b, t) -- computes a + t*(b-a)  # MapClamp<ty>(lo, hi, x) -- clamps x[alpha] to the range lo[alpha]..hi[alpha], where
34    # x, lo, and hi all have type ty (which is a non-scalar tensor type).
35    MapClamp : ty : 1 : 3 : clamp argument to range
36    # Lerp<ty>(a, b, t) -- computes a + t*(b-a), where a and b have type ty and t has type real
37  Lerp : ty : 1 : 3 : linear interpolation between 0 and 1  Lerp : ty : 1 : 3 : linear interpolation between 0 and 1
38  #  #
39    ### tensor operations
40    #
41    # TensorIndex<ty,idxs>(T) returns the scalar T[idxs], where T has type ty
42    TensorIndex : ty * shape : 1 : 1 :
43    #
44  ### matrix operations  ### matrix operations
45  #  #
46  EigenVecs2x2 : : 1 : 1 : Eigen vectors and values for 2x2 matrix  EigenVecs2x2 : : 1 : 1 : Eigen vectors and values for 2x2 matrix
# Line 48  Line 57
57  #  #
58  ### operations on sequences  ### operations on sequences
59  #  #
# Index<ty,i>(u)  -- select ith element of tensor; ty is sequence type
Index : ty * int : 1 : 1 :
60  # Subscript<ty>(u,i) -- select ith element of sequence; ty is type of sequence  # Subscript<ty>(u,i) -- select ith element of sequence; ty is type of sequence
61  Subscript : ty : 1 : 2 :  Subscript : ty : 1 : 2 :
62  # MkDynamic<ty,n> -- make a sequence with type ty[n] into a dynamic sequence  # MkDynamic<ty,n> -- make a sequence with type ty[n] into a dynamic sequence
63  !MkDynamic : ty * int : 1 : 1 : make a fixed-length sequence dynamic  !MkDynamic : ty * int : 1 : 1 : make a fixed-length sequence dynamic
64  !Append : ty : 2 : 1 : append an element onto a dynamic sequence  !Append : ty : 1 : 2 : append an element onto a dynamic sequence
65  !Prepend : ty : 2 : 1 : prepend an element onto a dynamic sequence  !Prepend : ty : 1 : 2 : prepend an element onto a dynamic sequence
66  !Concat : ty : 2 : 1 : concatenate two dynamic sequences  !Concat : ty : 1 : 2 : concatenate two dynamic sequences
67  # Range(lo,hi) -- create a sequence with values [lo, lo+1, ..., hi]  # Range(lo,hi) -- create a sequence with values [lo, lo+1, ..., hi]
68  Range : : 2 : 1 : create a range sequence  Range : : 1 : 2 : create a range sequence
69  # Length<ty> -- return the length of a sequence with type ty[]  # Length<ty> -- return the length of a sequence with type ty[]
70  Length : ty : 1 : 1 : return the length of a dynamic sequence  Length : ty : 1 : 1 : return the length of a dynamic sequence
71  #  #
# Line 73  Line 80
80  #  #
81  ### conversions; the real to int forms are vector ops  ### conversions; the real to int forms are vector ops
82  IntToReal : : 1 : 1 :  IntToReal : : 1 : 1 :
83  RealToInt : int : 1 : 1 : cast real vector to int vector  RealToInt : int : 1 : 1 : cast reals to ints and vectors to int sequences
84  #  #
85  # reduction operations  # reduction operations
86  R_All      : ty : 1 : 3 :  R_All      : ty : 1 : 3 :
# Line 91  Line 98
98  BuildPos : int : 1 : 1 : compute vector of kernel arguments  BuildPos : int : 1 : 1 : compute vector of kernel arguments
99  #  #
100  # EvalKernel<d,h,k>(u) -- computes h^(k)(u_i) for 1<i<d, where d is the size of vector u.  # EvalKernel<d,h,k>(u) -- computes h^(k)(u_i) for 1<i<d, where d is the size of vector u.
101  EvalKernel : int * Kernel.kernel * int : 1 : 1 : evaluate a kernel function application  EvalKernel : int * Kernel.t * int : 1 : 1 : evaluate a kernel function application
102  #  #
103  # Kernel<h,k>() -- represents the k'th derivative of the kernel h.  # Kernel<h,k>() -- represents the k'th derivative of the kernel h.
104  Kernel    : Kernel.kernel * int  : 1 : 0 :  Kernel    : Kernel.t * int  : 1 : 0 :
105  #  #
106  Transform  : ImageInfo.info : 1 : 1 : Pulls transformation matrix from image.  Transform  : ImageInfo.info : 1 : 1 : Pulls transformation matrix from image.
107  Translate  : ImageInfo.info : 1 : 1 : Pulls translation vector from image.  Translate  : ImageInfo.info : 1 : 1 : Pulls translation vector from image.

Legend:
 Removed from v.3775 changed lines Added in v.4043