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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3529, Tue Dec 22 18:25:22 2015 UTC revision 4349, Tue Aug 2 18:14:48 2016 UTC
# Line 15  Line 15 
15  IDiv : : 1 : 2 : integer division  IDiv : : 1 : 2 : integer division
16  IMod : : 1 : 2 : integer modulo  IMod : : 1 : 2 : integer modulo
17  INeg : : 1 : 1 : integer negation  INeg : : 1 : 1 : integer negation
18    #
19    # comparisons (integer and scalar)
20  LT : ty : 1 : 2 :  LT : ty : 1 : 2 :
21  LTE : ty : 1 : 2 :  LTE : ty : 1 : 2 :
22  EQ : ty : 1 : 2 :  EQ : ty : 1 : 2 :
# Line 25  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 tensor 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  ### vector operations  ### 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
45  #  #
46  # Dist<ty>(T1,T2) -- computes the distance between T1 and T2.  (to be moved to Ein)  EigenVecs2x2 : : 2 : 1 : Eigen vectors and values for 2x2 matrix
47  Dist : ty : 1: 2 :  EigenVecs3x3 : : 2 : 1 : Eigen vectors and values for 3x3 matrix
 # Normalize<n>(v)   -- returns the unit vector in direction u; n is the length ov u  
 Normalize : int : 1 : 1 :  
 PrincipleEvec : ty : 1 : 2 : principle eigenvector; ty is result vector type  
 EigenVecs2x2 : : 1 : 1 : Eigen vectors and values for 2x2 matrix  
 EigenVecs3x3 : : 1 : 1 : Eigen vectors and values for 3x3 matrix  
48  EigenVals2x2 : : 1 : 1 : Eigen values for 2x2 matrix  EigenVals2x2 : : 1 : 1 : Eigen values for 2x2 matrix
49  EigenVals3x3 : : 1 : 1 : Eigen values for 3x3 matrix  EigenVals3x3 : : 1 : 1 : Eigen values for 3x3 matrix
50  # Zero<ty>() -- zero tensor  # Zero<ty>() -- zero tensor
# Line 51  Line 57 
57  #  #
58  ### operations on sequences  ### operations on sequences
59  #  #
 # Index<ty,i>(u)  -- select ith element of sequence; 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  #  #
72  # SphereQuery<posType,seqTy>(??)  # SphereQuery<dim,seqTy>(pos, radius)
73  SphereQuery : ty * ty : 1 : 2 : find strands within  SphereQuery : int * ty : 1 : 2 : find strands within a sphere
74  #  #
75  # compute integral parts of reals  # compute integral parts of reals
76  Ceiling : int : 1 : 1 : compute real ceiling of a vector  Ceiling : int : 1 : 1 : compute real ceiling of a vector
# Line 76  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  ### Strand operations
86  R_All      : ty : 1 : 3 :  #
87  R_Exists   : ty : 1 : 3 :  # StrandStatus<ty,S>(s) -- test if the strand s is in the strand set S
88  R_Max      : ty : 1 : 3 :  StrandStatus : ty * StrandSets.t : 1 : 1 : Test the status of a strand
 R_Min      : ty : 1 : 3 :  
 R_Sum      : ty : 1 : 3 :  
 R_Product  : ty : 1 : 3 :  
 R_Mean     : ty : 1 : 3 :  
 R_Variance : ty : 1 : 4 :  
89  #  #
90  ### image/kernel operations  ### image/kernel operations
91  #  #
92  Kernel     : Kernel.kernel * int  : 1 : 0 : Kernel<h, k>, where h is the kernel and k is level of differentiation  # BuildPos<s>(x) -- builds a vector of 2s kernel arguments at positions [x-s, .., x+(s-1)]
93  Transform  : ImageInfo.info : 1 : 1 : Pulls transformation matrix from image.  BuildPos : int : 1 : 1 : compute vector of kernel arguments
 Translate  : ImageInfo.info : 1 : 1 : Pulls translation vector from image.  
94  #  #
95  # EvalKernel<i,h,k>(u) -- computes (D^k h)(u), where i 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.
96  EvalKernel : int * Kernel.kernel * int : 1 : 1 : apply a kernel function to a scalar or vector of arguments  EvalKernel : int * Kernel.t * int : 1 : 1 : evaluate a kernel function application
97  #  #
98  # VoxelAddress<I,offset>(V, i, j, ...) -- compute the address of the voxel data indexed by i, j, ...  # Kernel<h,k>() -- represents the k'th derivative of the kernel h.
99  # for non-scalar images, the offset specifies which sample and I specifies the stride.  Kernel    : Kernel.t * int  : 1 : 0 :
 VoxelAddress : ImageInfo.info * int : 1 : * : compute the address of a voxel  
 #  
 # VoxelAddressWithCtl<I,offset,ctl>(V, i, j, ...) -- compute the address of the voxel  
 # indexed by i, j, ... using the index control ctl. For non-scalar images, the offset  
 # specifies which sample and I specifies the stride.  
 VoxelAddressWithCtl : ImageInfo.info * int * idxctl : 1 : * : compute the address of a voxel  
100  #  #
101  # LoadVoxels<I,n>(a) -- load a vector of n voxels from the address a  Transform  : ImageInfo.info : 1 : 1 : Pulls transformation matrix from image.
102  LoadVoxels : ImageInfo.info * int : 1 : 1 : load a vector of voxel values from an address  Translate  : ImageInfo.info : 1 : 1 : Pulls translation vector from image.
103    #
104    # LoadVoxels<I,s>(V,n) -- loads a tensor of voxels from the image V, where I is the
105    # image info for V, s is size of the sample (i.e., twice the kernel support), and
106    # n is a sequence of integer indices that specifies the corner of the loaded tensor.
107    # If V has the type "image(d)[shp]", then n has type "int[n]" and the resulting tensor
108    # has the type "tensor[shp,s^d]".
109    LoadVoxels : ImageInfo.info * int : 1 : 2 : load a cube of voxels
110    #
111    # LoadVoxelsWithCtl<I,s,ctl>(V,n) -- like LoadVoxels, but it also uses the specified
112    # index control to deal with out-of-bounds indices.
113    LoadVoxelsWithCtl : ImageInfo.info * int * idxctl : 1 : 2 : load a cube of voxels
114  #  #
115  # Inside<I,s>(u,V) -- tests to see if image-space position u is inside the volume  # Inside<I,s>(x,V) -- tests to see if the image-space position x is inside the domain of V.
116  # occupied by the image V.  I is the image info and s is the border width  # I is the image info for V, s is the size of the sample to be loaded (see LoadVoxels)
117  Inside : ImageInfo.info * int : 1 : 2 :  Inside : ImageInfo.info * int : 1 : 2 :
118  #  #
119    # IndexInside<I,s>(n,V) -- tests to see if the index sequence n is inside the domain of V.
120    # I is the image info for V, s is the size of the sample to be loaded (see LoadVoxels)
121    IndexInside : ImageInfo.info * int : 1 : 2 :
122    #
123  # ImageDim<I,i>(V) -- returns the i'th dimension of the image  # ImageDim<I,i>(V) -- returns the i'th dimension of the image
124  ImageDim : ImageInfo.info * int : 1 : 1 :  ImageDim : ImageInfo.info * int : 1 : 1 :
125  #  #
126    # BorderCtlDefault<I>(V,t) -- wrap the image V with the border control that returns a default value t
127    BorderCtlDefault : ImageInfo.info : 1 : 2 :
128    # BorderCtlClamp<I>(V) -- wrap the image V with the border control that clamps the index
129    BorderCtlClamp : ImageInfo.info : 1 : 1 :
130    # BorderCtlMirror<I>(V) -- wrap the image V with the border control that mirrors the index
131    BorderCtlMirror : ImageInfo.info : 1 : 1 :
132    # BorderCtlWrap<I>(V) -- wrap the image V with the border control that wraps the index
133    BorderCtlWrap : ImageInfo.info : 1 : 1 :
134    #
135  # nrrd file loading  # nrrd file loading
136  LoadSeq   : ty * string : 1 : 0 : load sequence from nrrd file  LoadSeq   : ty * string : 1 : 0 : load sequence from nrrd file
137  LoadImage : ty * string : 1 : 0 : load image from nrrd file  LoadImage : ty * string : 1 : 0 : load image from nrrd file
138  #  #
139  # printing support for debugging  # printing support for debugging
140  !Print : tys : 0 : * : print strings  !Print : tys : 0 : * : print strings
141    #
142    # unlifted math functions
143    MathFn : MathFns.t : 1 : * : math function

Legend:
Removed from v.3529  
changed lines
  Added in v.4349

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