[SoC] Week 3 OpenCL Integration

Seth Price seth at pricepages.org
Tue Jun 8 00:05:40 EDT 2010


1) What did I do last week

First, I worked on the API for integrating OpenCL into the GDAL code  
with my mentors. While that was going on, I began work on integrating  
OpenCL into GRASS's r.sun.

r.sun is pretty complex, and there are global variables all over the  
place, so it's hard to sort out the memory. I also have all the r.sun  
structures being dumped into 3 arrays: one that is per-thread, one of  
int constants, and one of float constants. This is a bit tricky  
because I need to figure out which ones are constant, which I can put  
in constant cache and have a <10 cycle access time, vs the ones that  
are different per-thread in global memory, which have a >100 cycle  
access time. This is tricky because all the structures that are passed  
through the program are often initialized differently depending on  
which cell you're calculating (but not always) Another problem that  
I'm going to have is calculating the min/max sunrise/sunset, OpenCL  
doesn't lend itself well to comparing values between threads.

Something else that's tricky about r.sun:
Some of the global variables are no longer in use, they're only used  
in commented out code.

2) What do I plan to do this week

I will be continuing my work with the GDAL API, and perhaps  
implementing it. I'll also be continuing my work on r.sun.

3) Do I have any problems/obstacle which interfere with my work

Does r.sun count? ;)

~Seth


More information about the SoC mailing list