[SoC] Week 3 OpenCL Integration
Seth Price
seth at pricepages.org
Wed Jun 9 02:39:28 EDT 2010
> Consider to discuss this on "grass-dev" for feedback.
First I'll try to get it working as-is. ;) I've been going through the
r.sun code and translating. I've hit a bit of a snag. I can't call
pj_do_proj() from within the OpenCL kernel code, but it's at line 250
of rsunlib.c. I can't figure out how to avoid that call. I'll probably
post to the grass-dev list soon.
> Sounds like clean-up desired!
> Do you work in trunk (7) or GRASS 6.x?
I'm currently working in trunk.
~Seth
On Jun 8, 2010, at 12:22 AM, Markus Neteler wrote:
> Hi Seth,
>
> On Tue, Jun 8, 2010 at 6:05 AM, Seth Price <seth at pricepages.org>
> wrote:
>> 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)
>
> Consider to discuss this on "grass-dev" for feedback.
>
> If any changes are needed for the variable management, please submit
> them
> as trac tickets and, if accepted, we can merge them into SVN asap.
>
>> 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.
>
> Sounds like clean-up desired!
> Do you work in trunk (7) or GRASS 6.x?
>
>> 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? ;)
>
> Sure :)
>
> Markus
More information about the SoC
mailing list