> On 28 Jul 2017, at 18:21, Vasco Alexandre da Silva Costa 
> <vasco.co...@gmail.com> wrote:
> 
> On Fri, Jul 28, 2017 at 3:44 PM, Marco Domingues <marcodomingue...@gmail.com 
> <mailto:marcodomingue...@gmail.com>> wrote:
> My CPU is the Intel Core i5-4690k 
> (https://ark.intel.com/products/80811/Intel-Core-i5-4690K-Processor-6M-Cache-up-to-3_90-GHz
>  
> <https://ark.intel.com/products/80811/Intel-Core-i5-4690K-Processor-6M-Cache-up-to-3_90-GHz>).
> 
> Haswell core I believe. So it should be able to do 16 FLOPS/cycle I think. 
> i.e. 8x more FLOPS with vector than scalar.
>  
> I did some testing over the trunk code, to compare the performance between 
> the bool_eval() function there and the version in the OpenCL branch. I added 
> the column with the results to my previous table, which I attach with this 
> email. It looks like the version in the trunk is faster, and the difference 
> becomes quite noticeable once the model complexity grows. 
> 
> Figures. It would be too good to be true otherwise. We will have to prototype 
> a new tree storage structure and bool_eval() in ANSI C. 
> Then port that over to OpenCL. This is a chance to make a contribution to the 
> state of the art. We'll precompute all the jumps and store them in the tree.
> 
> Yes, apart from the optimization of skipping partitions in the shading 
> process that you suggested, I think that the handling of overlaps can still 
> be further optimized, by storing the index of the first region during boolean 
> evaluation, which would avoid having to look for it in the overlap handler 
> function. And also counting the set bits while we resolve overlaps, instead 
> of doing this after the call to the overlap handler, which should avoid a 
> n_regions/32 iteration per partition. 
> 
> Ok. But please make a patch for the changes you've made to speed up 
> build_regiontable(). I have changed the material regions code on SVN so the 
> materials should now match the proper regions. So you will need to 'svn 
> update' and likely have to resolve some merge conflicts before you can make a 
> patch.
> 
> Afterwards you can work on the optimization of skipping partitions and then 
> on the overlap optimizations.
> 
> I'll try to improve the lights so the shade results will be more similar to 
> the ANSI C version.
> 
> Also you really need to change your text editor configuration. Your editor 
> uses tabs with 4 spaces and it's messing up the code formatting as it is not 
> according to the code standards. You should use tabs with 8 spaces and indent 
> with 4 spaces. Which text editor are you using?

I’m using Visual Studio Code, which wasn’t configured properly! Well after 
configuring it I could see how bad I was indenting the code, so I would like to 
apology for that!

I’ve uploaded the patch with the regiontable optimization, and from now on the 
patches should be indented accordingly to the code standards! Sorry again!

Regards, 
Marco

>  
> As soon as I finish these optimizations I will start implementing the memory 
> optimizations!
> 
> <time_comparison.png>
> 
> Well the simplified bool_eval() is actually less bad than I expected. Still 
> we'll need to improve this as havoc clearly shows.
> 
> Regards,
> 
> -- 
> Vasco Alexandre da Silva Costa
> PhD in Computer Engineering (Computer Graphics)
> Instituto Superior Técnico/University of Lisbon, Portugal
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! 
> http://sdm.link/slashdot_______________________________________________
> BRL-CAD Developer mailing list
> brlcad-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/brlcad-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to