Difference between revisions of "User:Vasco.costa/GSoC15/logs"
From BRL-CAD
Line 67: | Line 67: | ||
''Week 7 : 6 Jul-12 Jul'' | ''Week 7 : 6 Jul-12 Jul'' | ||
− | * Evaluating algorithms for grid construction. Selecting OpenCL kernels we can use to support grid construction. | + | * Evaluating algorithms for grid construction. Selecting OpenCL kernels we can use to support grid construction. It seems pyopencl has some kernels we could use. Now the question is how to extricate the OpenCL/C from the Python... |
Revision as of 20:24, 12 July 2015
Community Bonding Period
I have made two patches for OpenCL (OCL) shot code. One patch refactors the existing sph (Sphere) shot code, and the another patch implements ehy (Elliptical Hyperboloid) shot code.
Background Research
- http://graphics.cs.kuleuven.be/publications/LD08CFRGRT/
- http://research.microsoft.com/en-us/um/people/cloop/garanzhaloop2010.pdf
Development Phase
Week 1 : 25-31 May
- Created some example .g files in mged for the primitives to be implemented this week. The Quick Reference Card proved to be quite useful.
- Do the matrix ops for ehy (Elliptical Hyperboloid) in the OpenCL side.
- Made patch for ell (Generalized Ellipsoid) and arb8 (Arbitrary Polyhedron) OpenCL shots:
- M1 complete: ellipsoid (ell), arb8 (arbitrary polyhedron) shot routines in OCL.
- Tried out a bunch of code browsing tools (cscope, LXR, doxygen, etc). The NetBeans IDE seems the most promising.
Week 2 : 1-7 Jun
- Read code to better understand the main rendering loop. It seems to be something like this:
do_frame() → do_run() → worker()* → do_pixel()* → rt_shootray()* → rt_*_shot()
- The code is recursive (which is problematic for OpenCL). I'll work on a simplified version of the rendering loop which only does the primary rays in C as a first approach. After I get the non-recursive parallel friendly C code I'll work on the OpenCL port.
- Updated project proposal on Google Melange.
- SVN r65153 fails to compile with a bogus error of an unused variable that's actually being used its just that GCC 4.9.1 is too dumb to figure that out.
- Upgraded Ubuntu and GCC.
- Made simple ray generation code in C.
- Made simple frame buffer write code in C.
- Made simple diffuse shading code in C.
Week 3 : 8-14 Jun
- Added the main boolean weaving code to our minimal renderer.
- Eliminated some gotos and made the code more thread safe.
- The simple renderer patches are in the mailing-list.
Week 4 : 15-21 Jun
- Added OpenMP compile support. Use OpenMP constructs to launch the rendering threads. This work still has some bugs in it.
- Alpha M2 patch. in mailing-list.
- Read code to better understand the main spatial partition construction routines. They seem to be something like this:
rt_prep_parallel() → rt_cut_it() → rt_nugrid_cut()
- We need something less complex that is more amenable to porting to OpenCL. So I will be implementing the Lagae & Dutré compact grid construction algorithm published at EGSR. First I will program in ANSI C then I will port the code to OpenCL.
- Started work on M3: grid spatial partitioning in OCL.
- ANSI C Lagae & Dutré grid construction code.
Week 5 : 22-28 Jun
- Took time off from the project to go to the CGI'15 conference.
Week 6 : 29 Jun-5 Jul
- GSoC Midterm Evaluations.
Week 7 : 6 Jul-12 Jul
- Evaluating algorithms for grid construction. Selecting OpenCL kernels we can use to support grid construction. It seems pyopencl has some kernels we could use. Now the question is how to extricate the OpenCL/C from the Python...