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 3474, Wed Dec 2 18:26:40 2015 UTC revision 3480, Fri Dec 4 18:30:36 2015 UTC
# Line 9  Line 9 
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  # type-indexed arithmetic operations
12  Add : ty : 1 : 2 :  IAdd : : 1 : 2 : integer addition
13  Sub : ty : 1 : 2 :  ISub : : 1 : 2 :
14  Mul : ty : 1 : 2 :  IMul : : 1 : 2 :
15  Div : ty : 1 : 2 :  IDiv : : 1 : 2 :
16  Mod : : 1 : 2 : integer modulo  IMod : : 1 : 2 : integer modulo
17  Neg : ty : 1 : 1 :  INeg : : 1 : 1 :
18  Abs : ty : 1 : 1 :  Abs : ty : 1 : 1 :
19  LT : ty : 1 : 2 :  LT : ty : 1 : 2 :
20  LTE : ty : 1 : 2 :  LTE : 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
 # Dot<n>(u, v)  -- computes dot product of u and v; n specifies u and v's arity  
 Dot : int : 1 : 2 :  
 # MulVecMat<m,n>(v, M) -- computes v*M, where M is an mxn-matrix and v is an m-vector  
 MulVecMat : int * int : 1 : 2 : vector times matrix multiplication  
 # MulMatVec<m,n>(M, v) -- computes M*v, where M is an mxn-matrix and v is a n-vector  
 MulMatVec : int * int : 1 : 2 : matrix times vector multiplication (type is matrix type)  
 # MulMatMat<m,n,p>(M, N) -- computes M*N, where M is an mxn-matrix and N is an nxp-matrix  
 MulMatMat : int * int * int : 1 : 2 : matrix times matrix multiplication  
 # MulVecTen3<m,n,p>(v, T) -- computes v*T, where T is an mxnxp-tensor and v is an m-vector  
 MulVecTen3 : int * int * int : 1 : 2 : vector times 3rd-order tensor multiplication  
 # MulTen3Vec<m,n,p>(v, T) -- computes T*v, where T is an mxnxp-tensor and v is a p-vector  
 MulTen3Vec : int * int * int : 1 : 2 : 3rd-order tensor times vector multiplication  
 # ColonMul<ty1,ty2>(T1, T2) -- computes T1:T2, where T1 (resp. T2) has type ty1 (resp. ty2)  
 ColonMul : ty * ty : 1 : 2 : colon product  
 # Cross(u, v)   -- computes cross product of u and v  
 Cross : : 1 : 2 :  
 # Norm<ty>(x) -- returns the norm of the tensor x, which has type ty  
 Norm : ty : 1 : 1 :  
34  # Normalize<n>(v)   -- returns the unit vector in direction u; n is the length ov u  # Normalize<n>(v)   -- returns the unit vector in direction u; n is the length ov u
35  Normalize : int : 1 : 1 :  Normalize : int : 1 : 1 :
 # Scale<ty>(s,u) -- multiply scalar s time tensor u; ty specifies u's type  
 Scale : ty : 1 : 2 : scalar*tensor multiplication  
36  PrincipleEvec : ty : 1 : 2 : principle eigenvector; ty is result vector type  PrincipleEvec : ty : 1 : 2 : principle eigenvector; ty is result vector type
37  EigenVecs2x2 : : 1 : 1 : Eigen vectors and values for 2x2 matrix  EigenVecs2x2 : : 1 : 1 : Eigen vectors and values for 2x2 matrix
38  EigenVecs3x3 : : 1 : 1 : Eigen vectors and values for 3x3 matrix  EigenVecs3x3 : : 1 : 1 : Eigen vectors and values for 3x3 matrix
39  EigenVals2x2 : : 1 : 1 : Eigen values for 2x2 matrix  EigenVals2x2 : : 1 : 1 : Eigen values for 2x2 matrix
40  EigenVals3x3 : : 1 : 1 : Eigen values for 3x3 matrix  EigenVals3x3 : : 1 : 1 : Eigen values for 3x3 matrix
 # Identity<n>() -- nxn identity matrix  
 Identity : int : 1 : 0 : identity matrix  
41  # Zero<ty>() -- zero tensor  # Zero<ty>() -- zero tensor
42  Zero : ty : 1 : 0 : identity matrix  Zero : ty : 1 : 0 : identity matrix
 # Trace<n>(M) -- computes trace of nxn matrix M  
 Trace : int : 1 : 1 : compute trace of matrix  
 # Transpose<n,m>(M) -- computes transpose of nxm matrix  
 Transpose : int * int : 1 : 1 : compute transpose of matrix  
 Slice : ty * mask : 1 : 1 : tensor slice; type is tensor argument type  
 #  
43  # operations on sequences  # operations on sequences
44  # Select<ty,i>(u)  -- select ith element of tuple; ty is tuple type  # Select<ty,i>(u)  -- select ith element of tuple; ty is tuple type
45  Select : ty * int : 1 : 1 :  Select : ty * int : 1 : 1 :
# Line 95  Line 67 
67  #  #
68  ### image/kernel operations  ### image/kernel operations
69  #  #
70    Kernel     : Kernel.kernel * int  : 1 : 0 : Kernel<h, k>, where h is the kernel and k is level of differentiation
71    Transform : ImageInfo.info : 1 : 1 : Pulls transformation matrix from image.
72    Translate : ImageInfo.info : 1 : 1 : Pulls translation vector from image.
73    #
74    # EvalKernel<i,h,k>(u) -- computes (D^k h)(u), where i is the size of vector u.
75    EvalKernel : int * Kernel.kernel * int : 1 : 1 : apply a kernel function to a scalar or vector of arguments
76    #
77  # 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, ...
78  # for non-scalar images, the offset specifies which sample and I specifies the stride.  # for non-scalar images, the offset specifies which sample and I specifies the stride.
79  VoxelAddress : ImageInfo.info * int : 1 : * : compute the address of a voxel  VoxelAddress : ImageInfo.info * int : 1 : * : compute the address of a voxel
# Line 107  Line 86 
86  # LoadVoxels<I,n>(a) -- load a vector of n voxels from the address a  # LoadVoxels<I,n>(a) -- load a vector of n voxels from the address a
87  LoadVoxels : ImageInfo.info * int : 1 : 1 : load a vector of voxel values from an address  LoadVoxels : ImageInfo.info * int : 1 : 1 : load a vector of voxel values from an address
88  #  #
 # PosToImgSpace<I>(V,u) -- transforms the world-space position u into the image-space specified by V.  
 PosToImgSpace : ImageInfo.info : 1 : 2 : transform a world-space position to image-space  
 #  
 # TensorToWorldSpace<I,ty>(V,u) -- transforms the image-space tensor u to from V's image space to world space  
 TensorToWorldSpace : ImageInfo.info * ty : 1 : 2 : transform an image-space gradient to world-space  
 #  
 # 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  
 #  
89  # Inside<I,s>(u,V) -- tests to see if image-space position u is inside the volume  # Inside<I,s>(u,V) -- tests to see if image-space position u is inside the volume
90  # occupied by the image V.  I is the image info and s is the border width  # occupied by the image V.  I is the image info and s is the border width
91  Inside : ImageInfo.info * int : 1 : 2 :  Inside : ImageInfo.info * int : 1 : 2 :

Legend:
Removed from v.3474  
changed lines
  Added in v.3480

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