Revision as of 13:37, 21 March 2014 by Michaljagielski (talk | contribs)

Personal Information

Name Michał Jagielski
Email Address
IRC(nick) drv
Time Zone UTC +0100

Brief Background

I'm second year student in Computer Science from University of Wroclaw. What's about my knowledge... I know Linux and other UNIX-like systems quite good. Mainly I write in C/C+ but I also like functional languages (Haskell, OCaml). Lately I'm interested primarily in GPGPU and I have some experience with it ( for example, I'm writing Rubik Cube optimal solver on CUDA). I preferred CUDA but I had also some practice with OpenCL.

Project Information

Project Title

OpenCL GPGPU Raytracing

Brief summary of Project

BRL-CAD objects are made from about two dozens of primitives. During work they are displayed only as some kind of net but there is moment, when we want get more precise and more realistic view of our project. Raytracing for most of primitives is implemented only on CPU. GPU is definetely better for this task, so in my project I will rewrite C code of raytracer to OpenCL. Also when GPU is not accessible on computer OpenCL will speed up raytracing, because it can be launched on multi-core CPU.

Project Description (Detailed)


I divided large primitives set in five categories. Some of them in one group can be very similar (for example ellipsoids), but there is also a lot of individual shapes (dsp, ars). I will divide whole task on subtasks in respect of shapes similarity.

Actual state of raytracing

In BRL-CAD each primitive have their own raytracing function. There exist only one example of OpenCL raytracer - in ellipsoids sph primitive raytracing is written in OpenCL. It will be my starting point (and it's great lesson of BRL-CAD coding style). So on first place I will write raytracer to ell (and next ellg, ell1, part), because it's more similar to sph than other primitive. Next category will be cylinders-like and cones-like primitives. Next will be torus-like (with one hole), polyhedra and last, most challenging in my opinion some of unique shapes.

I will work on branch available in there also is sph raytrace example: . After I complete a project every primitive should have file structure as sph.

===Algorithm===I think that there is no too much to talk about algorithm, I will try generally rewrite C algorithms in more efficient OpenCL algorithm. Algorithm for every primitive is described with desired amout of details in name_of_primitive.c almost on beginning. I think it's unnecessary to paste it here.

===Computing device===When all primitives have OpenCL raytracing during program execution I can check if GPU device is accessible and if not, lauch raytracer kernel on CPU.


As I realized in BRL-CAD is used doxygen system, so of course I will also document my work in this program.


Great speedup of scenes raytracing in BRL-CAD. For this moment it's very slow (I have quite fast computer but even for relatively simple scenes raytracing takes about second.)

Working Schedule

upto May 19 (Getting started)

  • Exploring the code.
  • Completing BRL-CAD tutorial for contributors.
  • Fixing at least 1-2 bugs to get familiar with devlopment system.
  • Deeper understanding of BRL-CAD usage (for example completing user tutorial)
  • First attemps of ell primitive OpenCL raytracing. I will get it done before main work start.

May 19 - August 4 (Development)

May 19 - June 2 [~2 Week]

  • Write raytracers to every primitive from ellipsoids group.
  • Test and benchmark these raytracers. Measure diffrence between CPU and GPU implementation.

June 2 - June 23 [~3 Week]

  • Implementation cylinders and cones raytracing. I plan three weeks because it's 9 primitives.
  • Writing simple program/script to generating more challenging projects.

June 23 - July 7 [~2 Week]

  • Raytracers for torus, ring and pipe should be done

July 7 - July 21 [~2 Week]

  • Polyhedra raytracing in OpenCL. It contains a lot of primitives, but they are wery similar to each other.

July 21 - August 4 [~2 Week]

  • Attempt to rest of primitives if I won't complete raytracer for any primitive I will end it after August 18 (but of course I will do my best to finish all raytracers befor August 4)

===August 4 - August 18 === (Finalising)

  • During these two weeks I will test once more raytracers and benchmark it on some real examples.
  • Final code submission with Google.

Time Availability

  • During summer holidays (after about 21st June) I will be completly free
  • I can devote up to 60 hrs/week. I can working in every time of day (or night)
  • In 16th June - 21st June I have final exams. It's possible that I have a little less time in this term, but I will make up for this time.
  • Befor 16th June I have university courses, but I specially take only three in this semester to participate in GSoC


As I wrote before I like GPGPU and you need somebody to speedup some part of your program. What is more, I know how expensive can be CAD software and I think that this initiative (BRL-CAD) is really important.

Why you?

I'm good in C/C++ coding and GPU programming. What is more I'm really hard working and stubborn when I want to reach some target. I think This project is quite mached to my skills and interest so BRL-CAD can be noticeable beter thanks to mine work. What is more I always want to participate in any open source community so I will stay with you after GSoC ends.