David's final changes: more profiler features, fixes.
Merge branch terrible and branch awful scr.Present was in wrong place Merging sucks Everything sucks GPUs suck fglrx sucks professionalism sucks I hope no one looking to hire me ever reads these. Conflicts: src/main.h
About to break everything with a merge
Added a profiler, which outputs time taken and calls to various functions. Disable by defining PROFILER_SILENT You can add a zone with PROFILE_SCOPE(name); (which will profile until the scope is exited) or with g_profiler.BeginZone(name); and g_profiler.EndZone();
FPS measurement in debugscript, more python analysis
Really hacky python performance scripts! DebugScript can be controlled by stdin Python subprocess lets us control IPDF without having to make DebugScript turing complete.
Mostly features added to DebugScript Also got MPFR C++ reals to work Should allow for a quantitative comparison between Rationals and Arbitrary Precision Floats Just... overwhelming amounts of results that it would be nice to get, so I don't know where to start...
Quadtree addition to root node now functions (w/out Qt) Apologies, etc.
Add MinGW Win32 Cross Compiling Not tested with Qt4 yet, but works with QUADTREE_DISABLED Build procedure: 1. Put source for GMP and SDL2 in ipdf/code/contrib/ Do 2. and 3. for both 2. Run `./configure --host=i686-w64-mingw32 --prefix="ipdf/code/contrib/win32"` 3. `make; make install` 4. In ipdf/code/src, run `make ARCH=win32 CONTROLPANEL=disabled` 5. Download SDL2.dll for the binary Will try and get Qt4 support in the morning I guess. I am doing this because I want it to be easy for marker(s) to run the software. So I will make a precompiled ipdf.exe for windows in addition to the linux binary. Tested under wine, seems to work. ALSO Why the hell is there a goto in document.cpp
More turtles Also we can't take logarithms of negative numbers, dur
Totally FITH everything I'm trying to get it so that Path and View can use a different number representation to Bezier. It's not going well.
Define for Transformations on Path only, also fixed segfault due to GraphicsBuffer The "invalidated" is used to recycle memory in the GraphicsBuffer, but that can only be done if there is actually enough memory. This was causing a segfault if the document was initially empty and had things added to it. Can now remove the hack in main.cpp where documents started with a {0,0,0,0} RECT in them. We can now (ab)use the Path for transformations. The idea was that Arbitrary precision stuff might be faster if we only care about the bounds of the paths. Unfortunately the way Real was used everywhere will make it a bit difficult to actually use this. We need Beziers and their bounds to be stored with floats, but the Path bounds to be stored with GMPrat or some other arbitrary type. It probably won't help that much, but evaluating those Beziers with GMPrat really slows down the CPU renderer. It's also a giant hack because I still use BezierRenderer for GPU rendering but I now use PathRenderer for CPU rendering of Beziers. Le sigh. We can now store Bezier bounds relative to Path bounds and apply transformations only to the Path bounds.
Initial support for scripting actions.
Add #define to transform Object bounds on the fly View model: Object bounds are fixed, transforming view transforms the View bounds, Object bounds transformed to coordinates in View bounds before rendering. Mutable Objects model (?) : Object bounds are transformed by operations, no transformation to View bounds necessary The equivelant view bounds are still printed for comparison, but it is effectively (0,0,1,1) First approach requires one transformation when altering view and then a *lot* during rendering Second approach requires a lot of transformations when altering view and then <not as many> during rendering Second approach also means we don't need a dedicated CPU renderer. Coordinates within bounds can be expressed as floats. ALSO - Added cat and panda test images - Fixed segfault due to empty paths in cat.svg ... by not including empty paths... - ipdf will now run if the window can't be created so I can run it on the bus without X - Not much you can actually do without X though... - ParanoidNumbers got considerably more #defines for debugging and trying to make them less generally shit - Fixed some bugs in PN not revealed by realops tester - There are still bugs in PN that aren't revealed by anything - Despite it basically being exactly equivelant to doubles at the moment :S - Having bugs in basic mathematics operations is actually really really really hard to fix - Want to fix all the bugs so I can make PN faster - They are slow, they spend about 30% of their time doing std::vector stuff - And that's when the std::vector is *empty* ALSO - The new approach to rendering means that the loss of precision is nowhere near as bad - This means we need to make new tests to demonstrate that there is in fact still a point to using arbitrary precision - Because floats are actually quite amazingly good if you aren't a moron about how you apply operations. - Really panicking now ALSO - I'm sure I did something else but I forgot what it was.
All of the things and none of the sleep GMPrat is a type that works (un)surprisingly well, until you start changing the view. ParanoidNumbers explode more dramatically but actually simplify for certain things. Simplify seems to end up adding operations that don't cancel twice, eg: debug: TestRandomisedOps (tests/paranoidtester.cpp:152) - Test 1000*1 randomised ops (max digits = 4) ERROR: TestRandomisedOps (tests/paranoidtester.cpp:208) - {7+(7/10)} *= {119} ERROR: TestRandomisedOps (tests/paranoidtester.cpp:209) - {7*119+(99127/10)} ERROR: TestRandomisedOps (tests/paranoidtester.cpp:210) - double Yields: 916.2999773025512695312500000000000000000000 ERROR: TestRandomisedOps (tests/paranoidtester.cpp:211) - PN Yields: 10745.7001953125000000000000000000000000000000 FATAL: int)() (tests/paranoidtester.cpp:212) - Failed on case 102 Note 7*119 * 119 = 99127, so the *119 is being applied extra times Probably because of reasons that hopefully the cold light of morning will reveal.
Animation of precision_vs_zoom
Some sort of vague ipython analysis Should probably be split into .py files and just use ipython to do the plots. Should probably see if we can get Jenkins to run things... oh what am I saying.
Change to things to make performance testing easier - Saving of CPU and GPU BMPs - OverlayBMP doesn't overlay a BMP which is good because we don't want it to... - SVG loads in centre of view - This will break the Quad tree, probably - tests/bmpdiff allows us to quantitatively compare output bmp images. - I didn't say it was a good metric, there's just a metric now. - Arguments to set rendering and transform type, argument to set maximum number of frames to render, argument to turn off the lazy rendering. Will make some kind of ipython notebook next I guess.
Paranoia is setting in Paranoid Numbers are hard to simplify properly. But they work. Kind of...
Add MPFRC++ mpreal type It's slow but less slow than Rationals. Project complete. Haha I wish.