GSoC Wrap up

It’s almost August 23rd and that signals the end of GSoC ’16. For the final review I’m required to summarize my work during the past 4 or so months. I figured a blog post was the perfect place for this.

For GSoC this year I’ve worked to improve OpenCL support for BRL-CAD. I started off by accelerating a few of the primitives used for CSG (Constructive Solid Geometry).

This basically meant writing kernel code for the shoot algorithms for various primitives. I had accelerated EPA just before GSoC began. This was followed up with ETO and then PART. PART in particular had a few changes since it had goto statements.

All of these contains images depicting the primitives generated in OpenCL mode. They have been accepted onto the BRL-CAD code base. There are still a few primitives left to be accelerated. In my opinion, this is the perfect place for a new person to start contributing (I started here as well).

Then I moved on to incorporate boolean evaluation on the GPU side so that complex figures can be generated. We decided that it was a good idea to first have an interface to call the serial boolweave() and boolfinal() functions using GPU generated segments as inputs. By doing so, we  could compare results and note the performance increase achieved. However, this yielded mixed results.

I’m pretty confident weaving happened correctly, but the final boolean evaluation failed. This was sort of confirmed by PGM files generated (showing number of segments and partitions for each pixel). To make this clearer, head over this post a few weeks ago.

Next I worked on writing kernel code to implement boolean weaving. The dynamic linked list of partitions proved to be tricky, but this was expected. I decided 2*Number of primitives could work as an upperbound for the segments. This allowed me to use the same head pointer as segs (indexing partitions of an individual pixel as parts[h[2*i]] for corresponding segment segs[h[i]]).

All the compile time errors have been fixed. I can’t really test this however, because boolean evaluation needs to be performed before any visible results can be seen. Unfortunately, I ran out of time and was unable to implement evaluation on the GPU.

That’s the first thing that needs to be done after GSoC. An attempt to restructure bool_eval() was started by Sean and then Vasco too and can be viewed here.

That brings to an end an exciting and highly educative few months. Contributing to BRL-CAD was awesome and I will continue to do so. Lastly, I’ve added a link to a folder containing a couple of patches, depicting my work towards the interface to call CPU bool functions and the boolean weaving in OpenCL. My development logs can be found here at WordPress itself. Fingers crossed for the evaluations.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s