TBB Convex Hull Example Input Data Set

I ended my last post with a promise to provide some graphics that would illustrate the type of data that is created as the input for the Threading Building Blocks Convex Hull example problem.

I modified the program to print the data points created by the call to initialize_buf() in main() in the convex_hull_sample.cpp file, then ran my new program, sending the output to a text file.

I then read the 5000000 points using R (the R-Project for statistical computing), and made a simple plot of the data. Here's the plot:


As we can see, the density of points at the edges is indeed lower than elsewhere. But, clearly the formula in util::GenerateRNDPoint() creates some artifacts in the data.

Not that this should have any effect on whether or not the code will accurately compute the convex hull solution. I just find it interesting to actually see what's really going into the computations.

I'm still very much at work, studying and working with the convex_hull_sample.cpp code. I'll go further into the code in my next post.

Kevin Farnham
O'Reilly Media
TBB Open Source Community
Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.