Volumes Of Fun http://www.volumesoffun.com/phpBB3/ |
|
Big, breaking changes to PolyVox (merging RLE/Paging work) http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=188 |
Page 1 of 2 |
Author: | David Williams [ Tue Apr 05, 2011 10:08 pm ] |
Post subject: | Big, breaking changes to PolyVox (merging RLE/Paging work) |
Those of you who who follow PolyVox development closely will know that we have been working for the last couple of months on improving the Volume class in PolyVox. There are primarily two new features:
I have just finished merging this work from it's own branch back into the trunk, so you will get it when you update SVN. Before you do this however, there are a number of breaking changes which you will need to be aware of. In no particular order:
I have also updated some documentation. In particular: You may also find useful information in the development threads: The download page has been updated with a snapshot of the new version, and I'm also leaving up the previous shapshot for those who have difficulties with the new system. Good luck porting to the new system, post here with any problems you encounter. |
Author: | ape [ Wed Apr 06, 2011 6:35 am ] |
Post subject: | Re: Big, breaking changes to PolyVox (merging RLE/Paging wor |
I've been waiting for this stuff to come to fruition to update the C# bindings, I'll try and get on that soon. Great work, guys. |
Author: | David Williams [ Wed Apr 06, 2011 8:52 pm ] |
Post subject: | Re: Big, breaking changes to PolyVox (merging RLE/Paging wor |
Great, but be aware that I commented out the bindings line in one of the CMakeLists.txt files, so youll need to put that back in before you can build them. I think the biggest challenge will be the use of std::function (for the paging) but hopefully you can find a way to bind to that. |
Author: | milliams [ Thu Apr 07, 2011 5:10 pm ] |
Post subject: | Re: Big, breaking changes to PolyVox (merging RLE/Paging wor |
It's great that this is finally merged and especially that you've found time to update the documentation. I'm currently preparing for the conversion to Git so it shouldn't be too long before it's ready. I do however see one of the tests are now failing (http://my.cdash.org/testDetails.php?test=5629657&build=175711). Given that it's the VolumeSizeTest I can believe that this is a consequence of the code changes and so it may be the test that's wrong but I don't know for sure Code: ********* Start testing of TestVolume ********* This reminds me that I really should get the nightly builds working again (I submitted this failing test using make Experimental -- anyone can do that if they have a compilation error or a failing test).
Config: Using QTest library 4.7.3, Qt 4.7.3 PASS : TestVolume::initTestCase() testvolume: /home/matt/PolyVox/library/PolyVoxCore/include/Volume.inl:312: bool PolyVox::Volume<VoxelType>::setVoxelAt(int32_t, int32_t, int32_t, VoxelType) [with VoxelType = unsigned char, int32_t = int]: Assertion `m_regValidRegion.containsPoint(Vector3DInt32(uXPos, uYPos, uZPos))' failed. |
Author: | David Williams [ Thu Apr 07, 2011 5:54 pm ] |
Post subject: | Re: Big, breaking changes to PolyVox (merging RLE/Paging wor |
It would indeed be nice to get the CDash stuff working again. I think we can fix the failing test after the Git merge though. As you say, I imagine it just needs updating, and I would like to add some more tests anyway. |
Author: | DefiniteIntegral [ Sat Apr 09, 2011 12:41 pm ] |
Post subject: | Re: Big, breaking changes to PolyVox (merging RLE/Paging wor |
By the way on the download page you listed version 1440 as March 05, but it's actually April 05 ![]() |
Author: | Zoxc [ Sat Apr 09, 2011 2:14 pm ] |
Post subject: | Re: Big, breaking changes to PolyVox (merging RLE/Paging wor |
cstdlib should be included in Volume.inl because it now uses abort. |
Author: | David Williams [ Sun Apr 10, 2011 6:31 pm ] |
Post subject: | Re: Big, breaking changes to PolyVox (merging RLE/Paging wor |
DefiniteIntegral wrote: By the way on the download page you listed version 1440 as March 05, but it's actually April 05 ![]() Thanks, I've fixed it. Zoxc wrote: cstdlib should be included in Volume.inl because it now uses abort. Also fixed (in Git, but not in SVN). |
Author: | kattle87 [ Thu Apr 14, 2011 8:24 am ] |
Post subject: | Re: Big, breaking changes to PolyVox (merging RLE/Paging wor |
This looks like some awesome work! Congratulation to everyone ![]() Just one question: how much difficult would it be to make polyvox thread-safe when using OpenMP? OpenMP is a compiler-directive based API for shared-memory parallelism. Just to give you an idea, parallelizing a for-loop requires ONE #pragma line, and the compiler will take care of doing everything else. No libraries nor anything else needed (just a compiler directive and a flag while compiling!) Having a section marked as "critical" (meaning it can be accessed only by one thread at a time) also requires just one line of code alike. (see https://secure.wikimedia.org/wikipedia/ ... C.2B.2B.29 there's the "critical" clause). I only took a look at the new doc but the functions that manage the block cache could probably get some critical sections and be ready to be used with OpenMP. Possible objections: -we don't need parallelism -we don't like parallelism -we want the users being able to choose and tweak the library with their own parallel paradigm, we can't make such choices for them. I'm doing some heavy computations, and I can't say how much of parallelism I will need (surely it will help). But for sure this is something a some people would like. (EG: extracting different surfaces at the same time might be nice for some people!). |
Author: | David Williams [ Thu Apr 14, 2011 8:29 pm ] |
Post subject: | Re: Big, breaking changes to PolyVox (merging RLE/Paging wor |
I think in general we would like to see (parts of) PolyVox become thread-safe. The main reason it has not happened is that I believe it is a lot of work, and to be honest I don't have significant experience in this area. Of course I've written code which takes advantage of threading, but I think that actually designing thread-safe data structures (while keeping them efficient) is a lot more difficult. If we do eventually go down this path then OpenMP may well be an option - it seems pretty well supported. The new C++0X standard also includes threading primitives so this is a strong candidate too (in the spirit of avoiding dependancies). However, at the moment PolyVox is storing its blocks in an std::map, and while a threading library may make it easy to ensure that only one thread can access the map at a time, this in itself will not give performance benefits. We would instead want to replace the std::map with a structure which allows concurrent access from different threads. I think initially the most likely outcome would be a new volume class which sits along side the existing one. Perhaps we could have PagedVolume and SimpleVolume, someting like that. SimpleVolume could just store raw data and so be made thread safe much more easily, but would not handle large amounts of data (perhaps up to 1Gb). Then maybe add some utility classes to copy data between them. I have no immediate plans to do this though. |
Page 1 of 2 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |