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

SCM Repository

[diderot] View of /branches/charisee/src/compiler/gen/il/high-il.spec
ViewVC logotype

View of /branches/charisee/src/compiler/gen/il/high-il.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1444 - (download) (annotate)
Mon Jul 11 12:11:53 2011 UTC (8 years, 2 months ago) by jhr
Original Path: trunk/src/compiler/IL/gen/high-il.spec
File size: 2606 byte(s)
  Merging in changes from pure-cfg branch: removed CL, expanded trace, and added method name
  datatype.
# specification of operators for HighIL version of the IR.  Each line (other than comments)
# specifies an operator using four fields, which are separated by ":".  The fields are
#	name
#	argument type		(optional)
#	arity
#	comment			(optional)
#
# type-indexed arithmetic operations
Add : ty : 2 :
Sub : ty : 2 :
Mul : ty : 2 :
Div : ty : 2 :
Neg : ty : 1 :
Abs : ty : 1 :
LT : ty : 2 :
LTE : ty : 2 :
EQ : ty : 2 :
NEQ : ty : 2 :
GT : ty : 2 :
GTE : ty : 2 :
Power : : 2 : raise real to integer power
Not : : 1 : boolean negation
Max : : 2 :
Min : : 2 :
# Clamp<ty>(lo, hi, x) -- clamps x to the range lo..hi
Clamp : ty : 3 : clamp argument to range
# Lerp<ty>(a, b, t) -- computes a + t*(b-a)
Lerp : ty : 3 : linear interpolation between 0 and 1
#
# tensor/vector operations
#
Dot : ty : 2 :
MulVecMat : ty : 2 : vector times matrix multiplication (type is matrix type)
MulMatVec : ty : 2 : matrix times vector multiplication (type is matrix type)
MulMatMat : ty * ty : 2 : matrix times matrix multiplication
Cross : : 2 :
Outer : ty : 2 : vector outer product (type is result type)
# Norm<ty>(x) -- returns the norm of the tensor x, which has type ty
Norm : ty : 1 :
Normalize : ty : 1 :
Scale : ty : 2 : scalar*tensor multiplication
PrincipleEvec : ty : 2 : principle eigenvector; ty is result vector type
# Identity<n>() -- nxn identity matrix
Identity : int : 0 : identity matrix
# Zero<ty>() -- zero tensor
Zero : ty : 0 : identity matrix
# Trace<ty>(m) -- computes trace of matrix m; ty is type of matrix
Trace : ty : 1 : compute trace of matrix
Slice : ty * mask : 1 : tensor slice; type is tensor argument type
Subscript : ty : * : tensor subscript (special case of slice)
#
# conversions
IntToReal : : 1 :
TruncToInt : : 1 :
RoundToInt : : 1 :
CeilToInt : : 1 :
FloorToInt : : 1 :
#
# image/field operations
Kernel     : Kernel.kernel * int  : 0 : Kernel<h, k>, where h is the kernel and k is level of differentiation
LoadImage  : ImageInfo.info	  : 1 : image-file loading
Inside     : int		  : 2 : args are position, field
Field	   : int		  : 2 : Field<d> is d-dimension reconstructed field; args are image, kernel
Probe      : ty * ty              : 2 : Probe<domTy, rngTy>(fld, pos) probes fld at pos.
AddField   :                      : 2 : field addition
SubField   :                      : 2 : field subtraction
ScaleField :                      : 2 : field scaling
NegField   :                      : 1 : field negation
DiffField  :                      : 1 : field differentiation
#
# inputs
Input            : ty * string * string  : 0 :
InputWithDefault : ty * string * string  : 1 :

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