Re: [pcre-dev] opencl

Startseite
Nachricht löschen
Autor: Zoltán Herczeg
Datum:  
To: james jones
CC: pcre-dev
Betreff: Re: [pcre-dev] opencl
No strong opinion. I think the use case matters. Your example is a simple implementation of posix regex. PCRE is much more complex, but if you don't need its features, this simple code can do as well. PCRE searches the first occurrence of a pattern, and returns a lot of info like the position of capturing brackets. OpenCL is designed to run the same kernel on a large number of inputs. So if your use case is finding all occurrence of a pattern (including intersecting ones), OpenCL might be useful again, since you can run the same kernel from all starting positions in the same time. However, this could waste a lot of power if you only need the first one. Another question is the effectiveness of the code, since the OpenCL compiler is a lightweight compiler, which prefers compilation speed over compiler optimizations.

Btw you don't need to copy the input if you use a system which supports host pointers like many embedded systems.

Regards,
Zoltan

james jones <james.voip+kernel@???> írta:
>What do you think about this approach?On Wed, Dec 5, 2012 at 5:34 PM, james jones james.voip+kernel@???> wrote:>

I have been able to port and compile the one below but I am having a little trouble with getting strings from ram to the memory on the graphics. Getting a lot memory access error right before a seg fault. I am just doing it wrong and need to make sure I am copying the array correctly. I have not looked at it in about two weeks. Will pick it up again over the weekend.>
>

http://www.cse.yorku.ca/~oz/regex.bun