Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sat, 22 Dec 2012 20:12:27 +0100
From: magnum <>
Subject: Re: Varous experimental OpenCL commits

On 22 Dec, 2012, at 19:44 , Claudio André <> wrote:
> Em 22-12-2012 15:29, Sayantan Datta escreveu:
>>   void crypt_all(int count)
>>   {
>>         enqueue(Transfer);
>>         enqueue(RarInitKernel);
>>         for (i=0; i<HASH_LOOPS; i++)
>>         {
>>                 enqueue(RarLoopKernel);
>> +               clFinish();
>> +               opencl_process_event();
>>         }
>>         enqueue(RarFinalKernel);
>> Is it necessary to include clFinish() inside the loop to ensure proper functioning of opencl_process_event() ?
> Yes. Otherwise the the result is not going to be the one expected.

Right. Normally, all functions in crypt_all() are non-blocking except the last clEnqueueReadBuffer(). So what happens without the clFinish() is that all of it (including that whole loop) will execute in a micro-second or so, and then we'll have a very long block in the clEnqueueReadBuffer() during which we can't process any events.

I feared those clFinish() calls would ruin performance but they do not. For a really fast format they would, but then we'd not need to use this anyway.

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.