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 3508, Fri Dec 18 14:19:30 2015 UTC revision 3732, Thu Apr 7 20:56:16 2016 UTC
# Line 1  Line 1 
1  # specification of operators for MidIL version of the IR.  Each line (other than comments)  # specification of operators for MidIR version of the IR.  Each line (other than comments)
2  # specifies an operator using five fields, which are separated by ":".  The fields are  # specifies an operator using five fields, which are separated by ":".  The fields are
3  #       name  #       name
4  #       argument type           (optional)  #       argument type           (optional)
# Line 8  Line 8 
8  #  #
9  # Operations with effects are denoted by a "!" as the first character of the line.  # Operations with effects are denoted by a "!" as the first character of the line.
10  #  #
11  # type-indexed arithmetic operations  # integer operations
12  IAdd : : 1 : 2 : integer addition  IAdd : : 1 : 2 : integer addition
13  ISub : : 1 : 2 :  ISub : : 1 : 2 : integer subtraction
14  IMul : : 1 : 2 :  IMul : : 1 : 2 : integer multiplication
15  IDiv : : 1 : 2 :  IDiv : : 1 : 2 : integer division
16  IMod : : 1 : 2 : integer modulo  IMod : : 1 : 2 : integer modulo
17  INeg : : 1 : 1 :  INeg : : 1 : 1 : integer negation
18  LT : ty : 1 : 2 :  LT : ty : 1 : 2 :
19  LTE : ty : 1 : 2 :  LTE : ty : 1 : 2 :
20  EQ : ty : 1 : 2 :  EQ : ty : 1 : 2 :
# Line 31  Line 31 
31  Lerp : ty : 1 : 3 : linear interpolation between 0 and 1  Lerp : ty : 1 : 3 : linear interpolation between 0 and 1
32  #  #
33  ### vector operations  ### vector operations
34  # 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  
35  EigenVecs2x2 : : 1 : 1 : Eigen vectors and values for 2x2 matrix  EigenVecs2x2 : : 1 : 1 : Eigen vectors and values for 2x2 matrix
36  EigenVecs3x3 : : 1 : 1 : Eigen vectors and values for 3x3 matrix  EigenVecs3x3 : : 1 : 1 : Eigen vectors and values for 3x3 matrix
37  EigenVals2x2 : : 1 : 1 : Eigen values for 2x2 matrix  EigenVals2x2 : : 1 : 1 : Eigen values for 2x2 matrix
38  EigenVals3x3 : : 1 : 1 : Eigen values for 3x3 matrix  EigenVals3x3 : : 1 : 1 : Eigen values for 3x3 matrix
39  # Zero<ty>() -- zero tensor  # Zero<ty>() -- zero tensor
40  Zero : ty : 1 : 0 : identity matrix  Zero : ty : 1 : 0 : all zeros tensor
41  #  #
42  ### tuple operations  ### tuple operations
43  #  #
# Line 62  Line 60 
60  # Length<ty> -- return the length of a sequence with type ty[]  # Length<ty> -- return the length of a sequence with type ty[]
61  Length : ty : 1 : 1 : return the length of a dynamic sequence  Length : ty : 1 : 1 : return the length of a dynamic sequence
62  #  #
63    # SphereQuery<posType,seqTy>(??)
64    SphereQuery : ty * ty : 1 : 2 : find strands within a sphere
65    #
66  # compute integral parts of reals  # compute integral parts of reals
67  Ceiling : int : 1 : 1 : compute real ceiling of a vector  Ceiling : int : 1 : 1 : compute real ceiling of a vector
68  Floor : int : 1 : 1 : compute real floor of a vector  Floor : int : 1 : 1 : compute real floor of a vector
# Line 72  Line 73 
73  IntToReal : : 1 : 1 :  IntToReal : : 1 : 1 :
74  RealToInt : int : 1 : 1 : cast real vector to int vector  RealToInt : int : 1 : 1 : cast real vector to int vector
75  #  #
76    # reduction operations
77    R_All      : ty : 1 : 3 :
78    R_Exists   : ty : 1 : 3 :
79    R_Max      : ty : 1 : 3 :
80    R_Min      : ty : 1 : 3 :
81    R_Sum      : ty : 1 : 3 :
82    R_Product  : ty : 1 : 3 :
83    R_Mean     : ty : 1 : 3 :
84    R_Variance : ty : 1 : 4 :
85    #
86  ### image/kernel operations  ### image/kernel operations
87  #  #
88  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)]
89    BuildPos : int : 1 : 1 : compute vector of kernel arguments
90    #
91    # EvalKernel<d,h,k>(u) -- computes h^(k)(u_i) for 1<i<d, where d is the size of vector u.
92    EvalKernel : int * Kernel.kernel * int : 1 : 1 : evaluate a kernel function application
93    #
94    # Kernel<h,k>() -- represents the k'th derivative of the kernel h.
95    Kernel    : Kernel.kernel * int  : 1 : 0 :
96    #
97  Transform : ImageInfo.info : 1 : 1 : Pulls transformation matrix from image.  Transform : ImageInfo.info : 1 : 1 : Pulls transformation matrix from image.
98  Translate : ImageInfo.info : 1 : 1 : Pulls translation vector from image.  Translate : ImageInfo.info : 1 : 1 : Pulls translation vector from image.
99  #  #
 # EvalKernel<i,h,k>(u) -- computes (D^k h)(u), where i is the size of vector u.  
 EvalKernel : int * Kernel.kernel * int : 1 : 1 : apply a kernel function to a scalar or vector of arguments  
 #  
100  # VoxelAddress<I,offset>(V, i, j, ...) -- compute the address of the voxel data indexed by i, j, ...  # VoxelAddress<I,offset>(V, i, j, ...) -- compute the address of the voxel data indexed by i, j, ...
101  # for non-scalar images, the offset specifies which sample and I specifies the stride.  # for non-scalar images, the offset specifies which plane when the image has tensor values
102    # and the image info I specifies the stride.
103  VoxelAddress : ImageInfo.info * int : 1 : * : compute the address of a voxel  VoxelAddress : ImageInfo.info * int : 1 : * : compute the address of a voxel
104  #  #
105  # VoxelAddressWithCtl<I,offset,ctl>(V, i, j, ...) -- compute the address of the voxel  # VoxelAddressWithCtl<I,offset,ctl>(V, i, j, ...) -- compute the address of the voxel
# Line 100  Line 117 
117  # ImageDim<I,i>(V) -- returns the i'th dimension of the image  # ImageDim<I,i>(V) -- returns the i'th dimension of the image
118  ImageDim : ImageInfo.info * int : 1 : 1 :  ImageDim : ImageInfo.info * int : 1 : 1 :
119  #  #
120    # BorderCtlDefault<I>(V,t) -- wrap the image V with the border control that returns a default value t
121    BorderCtlDefault : ImageInfo.info : 1 : 2 :
122    # BorderCtlClamp<I>(V) -- wrap the image V with the border control that clamps the index
123    BorderCtlClamp : ImageInfo.info : 1 : 1 :
124    # BorderCtlMirror<I>(V) -- wrap the image V with the border control that mirrors the index
125    BorderCtlMirror : ImageInfo.info : 1 : 1 :
126    # BorderCtlWrap<I>(V) -- wrap the image V with the border control that wraps the index
127    BorderCtlWrap : ImageInfo.info : 1 : 1 :
128    #
129  # nrrd file loading  # nrrd file loading
130  LoadSeq   : ty * string : 1 : 0 : load sequence from nrrd file  LoadSeq   : ty * string : 1 : 0 : load sequence from nrrd file
131  LoadImage : ty * string : 1 : 0 : load image from nrrd file  LoadImage : ty * string : 1 : 0 : load image from nrrd file
132  #  #
133  # printing support for debugging  # printing support for debugging
134  !Print : tys : 0 : * : print strings  !Print : tys : 0 : * : print strings
135    #
136    # unlifted math functions
137    MathFn : MathFns.t : 1 : * : math function

Legend:
Removed from v.3508  
changed lines
  Added in v.3732

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