# specification of operators for HighIL version of the IR. Each line (other than comments) # specifies an operator using five fields, which are separated by ":". The fields are # name # argument type (optional) # result arity # arity # comment (optional) # # type-indexed arithmetic operations Add : ty : 1 : 2 : Sub : ty : 1 : 2 : Mul : ty : 1 : 2 : Div : ty : 1 : 2 : Neg : ty : 1 : 1 : Abs : ty : 1 : 1 : LT : ty : 1 : 2 : LTE : ty : 1 : 2 : EQ : ty : 1 : 2 : NEQ : ty : 1 : 2 : GT : ty : 1 : 2 : GTE : ty : 1 : 2 : Power : : 1 : 2 : raise real to integer power Not : : 1 : 1 : boolean negation Max : : 1 : 2 : Min : : 1 : 2 : # Clamp(lo, hi, x) -- clamps x to the range lo..hi Clamp : ty : 1 : 3 : clamp argument to range # Lerp(a, b, t) -- computes a + t*(b-a) Lerp : ty : 1 : 3 : linear interpolation between 0 and 1 # # tensor/vector operations # Dot : ty : 1 : 2 : MulVecMat : ty : 1 : 2 : vector times matrix multiplication (type is matrix type) MulMatVec : ty : 1 : 2 : matrix times vector multiplication (type is matrix type) MulMatMat : ty * ty : 1 : 2 : matrix times matrix multiplication MulVecTen3 : ty : 1 : 2 : vector times 3rd-order tensor multiplication (type is tensor type) MulTen3Vec : ty : 1 : 2 : 3rd-order tensor times vector multiplication (type is tensor type) # ColonMul(T1, T2) -- computes T1:T2, where T1 (resp. T2) has type ty1 (resp. ty2) ColonMul : ty * ty : 1 : 2 : colon product Cross : : 1 : 2 : Outer : ty : 1 : 2 : vector outer product (type is result type) # Norm(x) -- returns the norm of the tensor x, which has type ty Norm : ty : 1 : 1 : Normalize : ty : 1 : 1 : Scale : ty : 1 : 2 : scalar*tensor multiplication PrincipleEvec : ty : 1 : 2 : principle eigenvector; ty is result vector type Eigen2x2 : : 1 : 1 : Eigenvector and values for 2x2 matrix Eigen3x3 : : 1 : 1 : Eigenvector and values for 3x3 matrix # Identity() -- nxn identity matrix Identity : int : 1 : 0 : identity matrix # Zero() -- zero tensor Zero : ty : 1 : 0 : identity matrix # Trace(m) -- computes trace of matrix m; ty is type of matrix Trace : ty : 1 : 1 : compute trace of matrix Slice : ty * mask : 1 : 1 : tensor slice; type is tensor argument type TensorSub : ty : 1 : * : tensor subscript (special case of slice) # # tuple and sequence operations Select : ty * int : 1 : 1 : select field from tuple value SeqSub : ty : 1 : 2 : index a sequence MkDynamic : ty * int : 1 : 1 : make a fixed-length sequence dynamic Append : ty : 2 : 1 : append an element onto a dynamic sequence Prepend : ty : 2 : 1 : prepend an element onto a dynamic sequence Concat : ty : 2 : 1 : concatenate two dynamic sequences # Length -- return the length of a sequence with type ty{} Length : ty : 1 : 1 : return the length of a dynamic sequence # # conversions IntToReal : : 1 : 1 : TruncToInt : : 1 : 1 : RoundToInt : : 1 : 1 : CeilToInt : : 1 : 1 : FloorToInt : : 1 : 1 : # # image/field operations Kernel : Kernel.kernel * int : 1 : 0 : Kernel, where h is the kernel and k is level of differentiation Inside : int : 1 : 2 : args are position, field Field : int : 1 : 2 : Field is d-dimension reconstructed field; args are image, kernel Probe : ty * ty : 1 : 2 : Probe(fld, pos) probes fld at pos. AddField : : 1 : 2 : field addition SubField : : 1 : 2 : field subtraction ScaleField : : 1 : 2 : field scaling NegField : : 1 : 1 : field negation DiffField : : 1 : 1 : field differentiation # # nrrd file loading LoadSeq : ty * string : 1 : 0 : load sequence from nrrd file LoadImage : ty * string * ImageInfo.info : 1 : 0 : load image from nrrd file # # inputs Input : input : 0 : 0 : program input # # printing support for debugging Print : tys : 0 : * : print strings
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: input : 0 : 0 : program input # # printing support for debugging Print : tys : 0 : * : print strings