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

SCM Repository

[diderot] View of /branches/pure-cfg/src/compiler/IL/gen/mid-il.spec
ViewVC logotype

View of /branches/pure-cfg/src/compiler/IL/gen/mid-il.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 695 - (download) (annotate)
Fri Mar 25 17:52:54 2011 UTC (8 years, 6 months ago) by jhr
File size: 2970 byte(s)
  Added mechanism for supporting "black box" functions (e.g., sin and sqrt).
  Also added atan2, sqrt, and tan functions to Basis
# specification of operators for MidIL 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 :
LT : ty : 2 :
LTE : ty : 2 :
EQ : ty : 2 :
NEQ : ty : 2 :
GT : ty : 2 :
GTE : ty : 2 :
Not : : 1 : boolean negation
Max : : 2 :
Min : : 2 :
#
### vector operations
# Dot<n>(u, v)	-- computes dot product of u and v; n specifies u and v's arity
Dot : int : 2 :
# Cross(u, v)	-- computes cross product of u and v
Cross : : 2 :
# Select<ty,i>(u)  -- select ith element of vector u; ty specifies u's type (IVec or Vec)
Select : ty * int : 1 :
# Norm<n>(u)   -- computes length of vector u; n specifies u's arity
Norm : int : 1 :
# Scale<n>(s,u) -- multiply scalar s time vector u; n specifies u's arity
Scale : int : 2 : scalar*vector multiplication
# InvScale<n>(s,u) -- divide vector u by scalar s; n specifies u's arity
InvScale : int : 2 : vector/scalar division
CL : : 1 : linear anisotropy measures
PrincipleEvec : ty : 2 : principle eigenvector; ty is result vector type
# Trace<n>(m) -- computes trace of nxn matrix m
Trace : int : 1 : compute trace of matrix
Subscript : ty : 2 : 
#
# compute integral parts of reals
Ceiling : int : 1 : compute real ceiling of a vector
Floor : int : 1 : compute real floor of a vector
Round : int : 1 : compute real rounding to nearest integral real of a vector
Trunc : int : 1 : compute real truncation to integral real of a vector
#
### conversions; the real to int forms are vector ops
IntToReal : : 1 :
RealToInt : int : 1 : cast real vector to int vector
#
### image/kernel operations
# VoxelAddress<I>(V, i, j, ...) -- compute the address of the voxel data indexed by i, j, ...
VoxelAddress : ImageInfo.info : * : compute the address of a voxel
# LoadVoxels<I,n>(a) -- load a vector of n voxels from the address a
LoadVoxels : ImageInfo.info * int : 1 : load a vector of voxel values from an address
# PosToImgSpace<I>(V,u) -- transforms the world-space position u into the image-space specified by V.
PosToImgSpace : ImageInfo.info : 2 : transform a world-space position to image-space
# GradToWorldSpace<I>(V,u) -- transforms the image-space gradient vector u to world space
GradToWorldSpace : ImageInfo.info : 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 : apply a kernel function to a scalar or vector of arguments
LoadImage : ImageInfo.info : 1 : image-file loading
# Inside<I,s>(u,V) -- tests to see if image-space position u is inside the volume
# occupied by the image V.  I is the image info and s is the border width
Inside : ImageInfo.info * int : 2 :
#
# inputs
Input : ty * string : 0 :
InputWithDefault : ty * string : 1 :

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