Home My Page Projects Code Snippets Project Openings 3D graphics for Standard ML
Summary Activity SCM

SCM Repository

[sml3d] Log of /trunk/sml3d/src/particles/compiler/translate.sml
[sml3d] / trunk / sml3d / src / particles / compiler / translate.sml  
ViewVC logotype

Log of /trunk/sml3d/src/particles/compiler/translate.sml

Parent Directory Parent Directory


Links to HEAD: (view) (download) (annotate)
Sticky Revision:

Revision 1160 - (view) (download) (annotate) - [select for diffs]
Modified Sun May 22 21:55:20 2011 UTC (8 years, 6 months ago) by pavelk
File length: 48891 byte(s)
Diff to previous 1159 , to selected 1155
* Added a new primitive: ACOS. It's the arc cosine function.
* Fixed a bug where in generating points in a disc, if the vector to the center of the disc was parallel to the normal, the points would only be generated at the center.
* Added implementations for generating vectors within the remaining domains. Generating a vector within a plane results in an error due to the domain being unbounded.
* Removed the "blob" domain as it has no use outside of generating points, but this effect can be simulated by providing different random distributions to the generation routine. (Not implemented yet)
* Updated the README to reflect changes.


Revision 1159 - (view) (download) (annotate) - [select for diffs]
Modified Sat May 21 22:08:20 2011 UTC (8 years, 6 months ago) by pavelk
File length: 46158 byte(s)
Diff to previous 1158 , to selected 1155
Filled out a few more particle actions, and updated the README.

Revision 1158 - (view) (download) (annotate) - [select for diffs]
Modified Thu May 19 02:08:17 2011 UTC (8 years, 6 months ago) by pavelk
File length: 46717 byte(s)
Diff to previous 1155
Fix some hard to track bugs.

Revision 1155 - (view) (download) (annotate) - [selected]
Modified Tue May 10 04:56:42 2011 UTC (8 years, 7 months ago) by pavelk
File length: 46282 byte(s)
Diff to previous 1152
Fix a few more minor bugs.

Revision 1152 - (view) (download) (annotate) - [select for diffs]
Modified Sun May 8 08:55:38 2011 UTC (8 years, 7 months ago) by pavelk
File length: 46212 byte(s)
Diff to previous 1151 , to selected 1155
Remove some unnecessary output junk.

Revision 1151 - (view) (download) (annotate) - [select for diffs]
Modified Sun May 8 00:54:41 2011 UTC (8 years, 7 months ago) by pavelk
File length: 46304 byte(s)
Diff to previous 1150 , to selected 1155
Introduced the MAX, MIN, MIX, and CLAMP operations to the psys IR. Used these to optimize the norm-at-point for planes to avoid the branch.

Revision 1150 - (view) (download) (annotate) - [select for diffs]
Modified Sat May 7 23:19:46 2011 UTC (8 years, 7 months ago) by pavelk
File length: 46249 byte(s)
Diff to previous 1149 , to selected 1155
Fixed a few issues with UVE... we need to actually copy the vars when we do a goto, otherwise uselessness gets propagated incorrectly.

Revision 1149 - (view) (download) (annotate) - [select for diffs]
Modified Sat May 7 19:14:12 2011 UTC (8 years, 7 months ago) by pavelk
File length: 46074 byte(s)
Diff to previous 1148 , to selected 1155
Fix small typo.

Revision 1148 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 6 06:46:41 2011 UTC (8 years, 7 months ago) by pavelk
File length: 46078 byte(s)
Diff to previous 1147 , to selected 1155
Random point in disc generation requires you to take a sqrt not a square.

Revision 1147 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 6 06:39:09 2011 UTC (8 years, 7 months ago) by pavelk
File length: 46083 byte(s)
Diff to previous 1146 , to selected 1155
Changed the plane normal vector calculation. Also, got rid of the notion of particle state, and made it so that block parameters are passed through an environment that keeps track of particle state variable to IR variable mappings.

Revision 1146 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 4 21:06:27 2011 UTC (8 years, 7 months ago) by pavelk
File length: 47766 byte(s)
Diff to previous 1143 , to selected 1155
Changed the way we look for a normal at a given point. In trying to get rid of a branch, I realized that it created a potential divide by zero, so I just restructured it to use less instructions.

Revision 1143 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 4 03:50:40 2011 UTC (8 years, 7 months ago) by pavelk
File length: 47421 byte(s)
Diff to previous 1140 , to selected 1155
Fixed a few bugs in UVE. Made sure that all of the optimizations work. The next step is to debug the CPU runtime environment to make sure that everything still works.

Revision 1140 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 2 06:00:36 2011 UTC (8 years, 7 months ago) by pavelk
File length: 47603 byte(s)
Diff to previous 1138 , to selected 1155
Fixed a few bugs. Namely, figured out how to get state passed through expression translation. Also made unused variable optimization better by eliminating block arguments if we weren't using them.

Revision 1138 - (view) (download) (annotate) - [select for diffs]
Modified Sun May 1 21:41:34 2011 UTC (8 years, 7 months ago) by pavelk
File length: 46411 byte(s)
Diff to previous 1137 , to selected 1155
Whoops, quick bug.

Revision 1137 - (view) (download) (annotate) - [select for diffs]
Modified Sun May 1 20:39:30 2011 UTC (8 years, 7 months ago) by pavelk
File length: 46404 byte(s)
Diff to previous 1134 , to selected 1155
Got a preliminary version of let expressions working. There seems to be a bug in the optimizer that needs to be fixed.

Revision 1134 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 26 21:46:29 2011 UTC (8 years, 7 months ago) by pavelk
File length: 45150 byte(s)
Diff to previous 1133 , to selected 1155
Fixed a few more bugs. Need to figure out how to track liveness of variables between blocks and a solution for variable reuse that doesn\'t blow up our IR.

Revision 1133 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 26 19:40:15 2011 UTC (8 years, 7 months ago) by pavelk
File length: 44970 byte(s)
Diff to previous 1132 , to selected 1155
Small mistake.

Revision 1132 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 26 19:12:29 2011 UTC (8 years, 7 months ago) by pavelk
File length: 44977 byte(s)
Diff to previous 1131 , to selected 1155
Fixed a few bugs and aesthetics. Added implementations for plane and disc intersections.

Revision 1131 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 25 23:49:08 2011 UTC (8 years, 7 months ago) by pavelk
File length: 40948 byte(s)
Diff to previous 1130 , to selected 1155
Fixed a small bug in sphere point generation.

Revision 1130 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 25 19:12:54 2011 UTC (8 years, 7 months ago) by pavelk
File length: 48226 byte(s)
Diff to previous 1129 , to selected 1155
Fixed some small bugs.

Revision 1129 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 25 18:55:18 2011 UTC (8 years, 7 months ago) by pavelk
File length: 48171 byte(s)
Diff to previous 1122 , to selected 1155
Got it compiling, now we need to debug.

Revision 1122 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 19 23:01:52 2011 UTC (8 years, 7 months ago) by pavelk
File length: 48223 byte(s)
Diff to previous 1120 , to selected 1155
More work on getting everything to compile. Mostly runtime and rendering things left.

Revision 1120 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 13 05:25:17 2011 UTC (8 years, 8 months ago) by pavelk
File length: 48255 byte(s)
Diff to previous 1119 , to selected 1155
Finish up redoing translate.sml... Most of the compiler infrastructure stuff is done. Some of the utility functions (for intersection tests, etc) need to be fleshed out. I'm also not sure whether or not these changes will create sound IR code, but I guess that's what the checker is for anyway...

Revision 1119 - (view) (download) (annotate) - [select for diffs]
Modified Mon Apr 11 17:09:46 2011 UTC (8 years, 8 months ago) by pavelk
File length: 44842 byte(s)
Diff to previous 1110 , to selected 1155
Comment out the old action translations, I doubt we will use them again, but they are good to keep around for reference.

Revision 1110 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 7 21:30:21 2011 UTC (8 years, 8 months ago) by pavelk
File length: 44598 byte(s)
Diff to previous 1109 , to selected 1155
Added a poignant comment

Revision 1109 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 7 21:28:20 2011 UTC (8 years, 8 months ago) by pavelk
File length: 44531 byte(s)
Diff to previous 1108 , to selected 1155
More work on getting the compiler working.

Revision 1108 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 7 03:46:38 2011 UTC (8 years, 8 months ago) by pavelk
File length: 45073 byte(s)
Diff to previous 1107 , to selected 1155
More work on particle system....

Revision 1107 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 6 22:46:51 2011 UTC (8 years, 8 months ago) by pavelk
File length: 38067 byte(s)
Diff to previous 1091 , to selected 1155
Work on particle system stuff. Still a WIP, just checking it in so that I can work on it some more from home.

Revision 1091 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 14 20:49:21 2011 UTC (8 years, 10 months ago) by pavelk
File length: 39164 byte(s)
Diff to previous 1074 , to selected 1155
Implement an initial framework for supporting user defined state variables. There is no current interface to adding them to a particle system. In general, user defined state variables will be created by the emitter and will never be eliminated by UVE. Things to do are to add support for them on the CPU side (the GPU implementation should fall out of it), and to define actions in terms of which state variable they act upon. Then we will have a smaller set of core actions anyway.

Revision 1074 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 25 01:14:34 2011 UTC (8 years, 10 months ago) by pavelk
File length: 39906 byte(s)
Diff to previous 1060 , to selected 1155
Work on demo. Updated particle library with some action and domain implementations.

Revision 1060 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jan 21 23:24:43 2011 UTC (8 years, 10 months ago) by pavelk
File length: 35776 byte(s)
Diff to previous 1050 , to selected 1155
Added the ability to detect a particle within a cylinder. Touched up the demo animation to match the geometry.

Revision 1050 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jan 21 18:08:14 2011 UTC (8 years, 10 months ago) by jhr
File length: 33154 byte(s)
Diff to previous 1027 , to selected 1155
  Update to match signatures in the PADL paper

Revision 1027 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 19 23:29:04 2011 UTC (8 years, 10 months ago) by pavelk
File length: 33161 byte(s)
Diff to previous 1017 , to selected 1155
Added rotation state variable to particle systems.

Revision 1017 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 18 22:19:53 2011 UTC (8 years, 10 months ago) by pavelk
File length: 32830 byte(s)
Diff to previous 1008 , to selected 1155
Updated emitters to accept float domains with distributions in order to generate points. We use it to create smoke particles somewhat slower than we need to. We could improve upon the effect to add a quadratic filter along with the linear one.

Revision 1008 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jan 16 17:04:08 2011 UTC (8 years, 10 months ago) by pavelk
File length: 30532 byte(s)
Diff to previous 987 , to selected 1155
* Changed the domain type to be polymorphic. Added a new range domain which is basically the analog to a box in one dimension. I still haven't been able to figure out how to properly integrate this with the emitter due to the nature of how we deal with creating particles.
* Updated the README
* Hacked the particle size generation to only generate particles in the range [0.5, 1.0] instead of [0.0, 1.0]


Revision 987 - (view) (download) (annotate) - [select for diffs]
Modified Wed Dec 29 17:55:10 2010 UTC (8 years, 11 months ago) by pavelk
File length: 30304 byte(s)
Diff to previous 974 , to selected 1155
Changed the animation to fit more of a fountain-y style and fixed a few bugs that came with it.

Revision 974 - (view) (download) (annotate) - [select for diffs]
Modified Tue Aug 31 23:03:51 2010 UTC (9 years, 3 months ago) by jhr
File length: 29456 byte(s)
Diff to previous 972 , to selected 1155
  Changes to particle-system API

Revision 972 - (view) (download) (annotate) - [select for diffs]
Modified Thu Aug 26 18:42:09 2010 UTC (9 years, 3 months ago) by pavelk
File length: 29459 byte(s)
Diff to previous 918 , to selected 1155
Filter the global PSV variables from the PSV -> IR variables map when we do
the translation into IR. Then save off these variables in the definition of 
the psys program.

Revision 918 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 29 04:24:39 2010 UTC (9 years, 5 months ago) by pavelk
File length: 29196 byte(s)
Diff to previous 915 , to selected 1155
Fixed a few bugs. Also got the prelims ready for different rendering modes.

Revision 915 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 22 22:13:22 2010 UTC (9 years, 5 months ago) by pavelk
File length: 29196 byte(s)
Diff to previous 907 , to selected 1155
Change the isDead state variable to a TTL. This way we can encode a lot more information into it. I haven't actually tested whether or not it works (just that it compiles)...


Revision 907 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jun 5 18:51:46 2010 UTC (9 years, 6 months ago) by pavelk
File length: 29201 byte(s)
Diff to previous 906 , to selected 1155
CPU implementation is working, although it's a bit slower than I'd like...

Revision 906 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 2 21:13:39 2010 UTC (9 years, 6 months ago) by pavelk
File length: 29201 byte(s)
Diff to previous 905 , to selected 1155
Switched program representation to not be a list of blocks. Rather, we reference just one block and use the tree representation when doing our analysis. Hence we now have a much more robust system for error checking, etc. Hopefully this fixes the problem of having inconsistencies between our blocks.

Revision 905 - (view) (download) (annotate) - [select for diffs]
Modified Sun May 30 20:35:18 2010 UTC (9 years, 6 months ago) by pavelk
File length: 29161 byte(s)
Diff to previous 903 , to selected 1155
Working on CPU interpreter for particle system... weird bug.

Revision 903 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 28 21:16:39 2010 UTC (9 years, 6 months ago) by pavelk
File length: 29016 byte(s)
Diff to previous 902 , to selected 1155
Fixed a few issues with setting global variables for our CPU interpreter.

Revision 902 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 28 19:24:05 2010 UTC (9 years, 6 months ago) by pavelk
File length: 29141 byte(s)
Diff to previous 901 , to selected 1155
Ugh, for now figure out which variables are which based on a naming convention. There's probably (read: definitely) a better way to do this by tagging each RETURN statement with the state variables that it returns.

Revision 901 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 28 19:15:30 2010 UTC (9 years, 6 months ago) by pavelk
File length: 29143 byte(s)
Diff to previous 900 , to selected 1155
Fix the deal with having the proper full list of state variables sent as block parameters.

Revision 900 - (view) (download) (annotate) - [select for diffs]
Modified Fri May 28 19:02:43 2010 UTC (9 years, 6 months ago) by pavelk
File length: 29137 byte(s)
Diff to previous 873 , to selected 1155
More work on CPU interpreter for psys... few kinks to work out with global variables. Also, added secondary position state variable in case we want to do more complicated things...

Revision 873 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 5 20:18:00 2010 UTC (9 years, 7 months ago) by pavelk
File length: 28785 byte(s)
Diff to previous 870 , to selected 1155
Added a few primitives to handle a bit more lower level vector manipulation in order to expose a few more optimizations that we could perform in preparation for generating code for OpenCL. Most notably, we don't want to be doing things like calculating the dot product of basis vectors.

Also, added a new module for specialized optimizations on primitives which were made possible with the aforementioned newly added vector primitives.



Revision 870 - (view) (download) (annotate) - [select for diffs]
Modified Fri Apr 30 17:21:32 2010 UTC (9 years, 7 months ago) by pavelk
File length: 27303 byte(s)
Diff to previous 868 , to selected 1155
Fix some formatting in the checker. I don't know why it's so hard for me to standardize my editors... Also, repurpose DISCARD to mean killing a particle so that we can possibly make some smarter optimizations. We can track non-state changes by seeing whether or not the particles change between the invocation of a block and leaving it.

Revision 868 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 29 22:39:32 2010 UTC (9 years, 7 months ago) by pavelk
File length: 27325 byte(s)
Diff to previous 867 , to selected 1155
Fix some formatting and make the optimizer take a whole program instead of a block list as an argument. The next step is to separate each of the optimizations into their own modules.

Revision 867 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 29 21:06:21 2010 UTC (9 years, 7 months ago) by pavelk
File length: 26858 byte(s)
Diff to previous 866 , to selected 1155
Added a newline to our program output so that it looks a lot neater... Also, there was a bug with the way we were handling predicate combinators. We need to save off the continuation, and then handle the then/else statements separately, and finally come together in the end. This way we can prevent code from blowing up unnecessarily.

Revision 866 - (view) (download) (annotate) - [select for diffs]
Modified Thu Apr 29 20:16:27 2010 UTC (9 years, 7 months ago) by pavelk
File length: 26636 byte(s)
Diff to previous 864 , to selected 1155
IR translation now returns a program datatype, which has the emitter block separated from the physics block, and also keeps track of the rendering operation requested. Also, added property fields for variables and blocks in order to track for UVE.

Revision 864 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 28 17:21:18 2010 UTC (9 years, 7 months ago) by pavelk
File length: 26469 byte(s)
Diff to previous 863 , to selected 1155
Updated work on UVE. It now works the way I intended it to, although I think I may need to revisit my intentions.

Revision 863 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 27 23:09:18 2010 UTC (9 years, 7 months ago) by pavelk
File length: 26513 byte(s)
Diff to previous 862 , to selected 1155
UVE: work in progress...

Revision 862 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 27 01:27:39 2010 UTC (9 years, 7 months ago) by pavelk
File length: 26092 byte(s)
Diff to previous 770 , to selected 1155
Changed optimizations to run until they leave the program unchanged. Fleshed out UVE only to realize that I did it wrong, needs to be rethought. Fleshed out constant folding code, works pretty well.

Revision 770 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 22 00:17:15 2010 UTC (9 years, 9 months ago) by pavelk
File length: 26086 byte(s)
Diff to previous 769 , to selected 1155
Restructured some of the particles code to better fit the idea that we have for how it's supposed to work. Also, I moved the runtime code for the old psys into the new runtime module. Our example doesn't work properly anymore, since the old particle action system doesn't have a mechanism for specifying branches, so the particles never die.

Revision 769 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 15 22:52:36 2010 UTC (9 years, 9 months ago) by pavelk
File length: 25234 byte(s)
Diff to previous 758 , to selected 1155
Changed the way we define actions to be a list of combinators. This way we have support for if-then-else statements at a higher level and rendering operations (should we need them).

Revision 758 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 9 04:46:06 2010 UTC (9 years, 10 months ago) by pavelk
File length: 24396 byte(s)
Diff to previous 750 , to selected 1155
Optimized translation of SINK to avoid a branch. Changed reference counting in optimizer to go from top down rather than from the bottom up.

Revision 750 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 2 16:12:23 2010 UTC (9 years, 10 months ago) by jhr
File length: 24433 byte(s)
Diff to previous 747 , to selected 1155
  Added some comments

Revision 747 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 2 06:07:28 2010 UTC (9 years, 10 months ago) by pavelk
File length: 24347 byte(s)
Diff to previous 746 , to selected 1155
Implemented some simple optimizations: removing unused variables and constant folding. Also, realized that there's no need for the CONST stmt, since variables are either constants by construction or they get optimized into such.

Revision 746 - (view) (download) (annotate) - [select for diffs]
Added Mon Feb 1 04:51:45 2010 UTC (9 years, 10 months ago) by pavelk
File length: 24303 byte(s)
Diff to selected 1155
Moved syntax, type, and definitions checker into its own module, and they work over the whole program, not when the statements get created.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

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