SCM Repository
Annotation of /trunk/src/compiler/IL/gen/mid-il.spec
Parent Directory
|
Revision Log
Revision 457 - (view) (download)
1 : | jhr | 266 | # specification of operators for MidIL version of the IR. Each line (other than comments) |
2 : | # specifies an operator using four fields, which are separated by ":". The fields are | ||
3 : | # name | ||
4 : | # argument type (optional) | ||
5 : | # arity | ||
6 : | # comment (optional) | ||
7 : | # | ||
8 : | # type-indexed arithmetic operations | ||
9 : | Add : ty : 2 : | ||
10 : | Sub : ty : 2 : | ||
11 : | Mul : ty : 2 : | ||
12 : | Div : ty : 2 : | ||
13 : | Neg : ty : 1 : | ||
14 : | LT : ty : 2 : | ||
15 : | LTE : ty : 2 : | ||
16 : | EQ : ty : 2 : | ||
17 : | NEQ : ty : 2 : | ||
18 : | GT : ty : 2 : | ||
19 : | GTE : ty : 2 : | ||
20 : | jhr | 333 | Not : : 1 : boolean negation |
21 : | Max : : 2 : | ||
22 : | Min : : 2 : | ||
23 : | Sin : : 1 : | ||
24 : | Cos : : 1 : | ||
25 : | Pow : : 2 : | ||
26 : | jhr | 304 | # |
27 : | jhr | 343 | ### vector operations |
28 : | jhr | 349 | # Dot<n>(u, v) -- computes dot product of u and v; n specifies u and v's arity |
29 : | Dot : int : 2 : | ||
30 : | jhr | 343 | # Cross(u, v) -- computes cross product of u and v |
31 : | jhr | 266 | Cross : : 2 : |
32 : | jhr | 420 | # Select<ty,i>(u) -- select ith element of vector u; ty specifies u's type (IVec or Vec) |
33 : | Select : ty * int : 1 : | ||
34 : | jhr | 349 | # Norm<n>(u) -- computes length of vector u; n specifies u's arity |
35 : | Norm : int : 1 : | ||
36 : | # Scale<n>(s,u) -- multiply scalar s time vector u; n specifies u's arity | ||
37 : | Scale : int : 2 : scalar*vector multiplication | ||
38 : | # InvScale<n>(s,u) -- divide vector u by scalar s; n specifies u's arity | ||
39 : | InvScale : int : 2 : vector/scalar division | ||
40 : | jhr | 266 | CL : : 1 : linear anisotropy measures |
41 : | PrincipleEvec : ty : 2 : principle eigenvector; ty is result vector type | ||
42 : | Subscript : ty : 2 : | ||
43 : | jhr | 333 | Floor : int : 1 : compute real floor of a vector |
44 : | jhr | 266 | # |
45 : | jhr | 420 | ### conversions; the real to int forms are vector ops |
46 : | jhr | 266 | IntToReal : : 1 : |
47 : | jhr | 333 | TruncToInt : int : 1 : |
48 : | RoundToInt : int : 1 : | ||
49 : | CeilToInt : int : 1 : | ||
50 : | FloorToInt : int : 1 : | ||
51 : | jhr | 266 | # |
52 : | jhr | 343 | ### image/kernel operations |
53 : | jhr | 349 | # VoxelAddress<V>(i, j, ...) -- compute the address of the voxel data indexed by i, j, ... |
54 : | jhr | 282 | VoxelAddress : ImageInfo.info : * : compute the address of a voxel |
55 : | LoadVoxels : RawTypes.ty * int : 1 : load a vector of voxel values from an address | ||
56 : | jhr | 450 | # PosToImgSpace<V>(u) -- transforms the world-space position u into the image-space specified by V. |
57 : | PosToImgSpace : ImageInfo.info : 1 : transform a world-space position to image-space | ||
58 : | # GradToWorldSpace<V>(u) -- transforms the image-space gradient vector u to world space | ||
59 : | GradToWorldSpace : ImageInfo.info : 1 : transform an image-space gradient to world-space | ||
60 : | jhr | 349 | # EvalKernel<i,h,k>(u) -- computes (D^k h)(u), where i is the size of vector u. |
61 : | jhr | 328 | EvalKernel : int * Kernel.kernel * int : 1 : apply a kernel function to a scalar or vector of arguments |
62 : | jhr | 266 | LoadImage : ImageInfo.info : 0 : image-file loading |
63 : | jhr | 457 | # Inside<V>(u) -- tests to see if image-space position u is inside the volume occupied by the image V. |
64 : | jhr | 349 | Inside : ImageInfo.info : 1 : |
65 : | jhr | 266 | # |
66 : | # inputs | ||
67 : | jhr | 420 | Input : ty * string : 0 : |
68 : | InputWithDefault : ty * string : 1 : |
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |