# specification of operators for HighIR 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) # # Operations with effects are denoted by a "!" as the first character of the line. # # integer operations IAdd : : 1 : 2 : integer addition ISub : : 1 : 2 : integer subtraction IMul : : 1 : 2 : integer multiplication IDiv : : 1 : 2 : integer division IMod : : 1 : 2 : integer modulo INeg : : 1 : 1 : integer negation 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 Abs : ty : 1 : 1 : Max : ty : 1 : 2 : Min : ty : 1 : 2 : # Clamp(lo, hi, x) -- clamps x to the range lo..hi, where lo and hi are scalars and x # has type ty Clamp : ty : 1 : 3 : clamp argument to range # MapClamp(lo, hi, x) -- clamps x[alpha] to the range lo[alpha]..hi[alpha], where # x, lo, and hi all have type ty (which is a non-scalar tensor type). MapClamp : ty : 1 : 3 : clamp argument to range # Lerp(a, b, t) -- computes a + t*(b-a), where a and b have type ty and t has type real Lerp : ty : 1 : 3 : linear interpolation between 0 and 1 # ### vector operations # Eigen2x2 : : 1 : 1 : Eigenvector and values for 2x2 matrix Eigen3x3 : : 1 : 1 : Eigenvector and values for 3x3 matrix # Zero() -- zero tensor Zero : ty : 1 : 0 : all zeros tensor TensorSlice : ty * mask : 1 : 1 : tensor slice; type is tensor argument type TensorIndex : ty * shape : 1 : 1 : tensor index (special case of slice) # ### tuple operations # # Select(u) -- select ith element of tuple; ty is tuple type Select : ty * int : 1 : 1 : # ### operations on sequences # # Subscript(u,i) -- select ith element of sequence; ty is type of sequence Subscript : ty : 1 : 2 : # MkDynamic -- make a sequence with type ty[n] into a dynamic 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 # Range(lo,hi) -- create a sequence with values [lo, lo+1, ..., hi] Range : : 2 : 1 : create a range sequence # Length -- return the length of a sequence with type ty[] Length : ty : 1 : 1 : return the length of a dynamic sequence # # SphereQuery(??) SphereQuery : ty * ty : 1 : 2 : find strands within # # conversions IntToReal : : 1 : 1 : TruncToInt : : 1 : 1 : RoundToInt : : 1 : 1 : CeilToInt : : 1 : 1 : FloorToInt : : 1 : 1 : # # reduction operations R_All : ty : 1 : 3 : R_Exists : ty : 1 : 3 : R_Max : ty : 1 : 3 : 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 : # # 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 # ImageDim(V) -- returns the i'th dimension of the image ImageDim : ImageInfo.info * int : 1 : 1 : # BorderCtlDefault(V,t) -- wrap the image V with the border control that returns a default value t BorderCtlDefault : ImageInfo.info : 1 : 2 : # BorderCtlClamp(V) -- wrap the image V with the border control that clamps the index BorderCtlClamp : ImageInfo.info : 1 : 1 : # BorderCtlMirror(V) -- wrap the image V with the border control that mirrors the index BorderCtlMirror : ImageInfo.info : 1 : 1 : # BorderCtlWrap(V) -- wrap the image V with the border control that wraps the index BorderCtlWrap : ImageInfo.info : 1 : 1 : # # nrrd file loading LoadSeq : ty * string : 1 : 0 : load sequence from nrrd file LoadImage : ty * string : 1 : 0 : load image from nrrd file # # printing support for debugging !Print : tys : 0 : * : print strings # # unlifted math functions MathFn : MathFns.t : 1 : * : math function
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: : tys : 0 : * : print strings # # unlifted math functions MathFn : MathFns.t : 1 : * : math function