Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 10 Jul 2012 07:19:38 +0530
From: Sayantan Datta <std2048@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: Rotate and bitselect investigation

On Tue, Jul 10, 2012 at 7:00 AM, Solar Designer <solar@...nwall.com> wrote:

> On Mon, Jul 09, 2012 at 12:42:47PM +0530, Sayantan Datta wrote:
> > On Mon, Jul 9, 2012 at 12:00 PM, Solar Designer <solar@...nwall.com>
> wrote:
> >
> > > Also, I guess this change should hurt on NVIDIA (does
> > > it?), so you'll need to wrap it in some #ifdef.
> >
> > Yes I did wrap it in #ifdef.
>
> So you use USE_LIBRARY_BITSELECT, which has to be manually (un)defined.
>
> Maybe we should use the same approach that magnum uses in rar_kernel.cl:
>
> #ifdef cl_nv_pragma_unroll
> #define NVIDIA
> #endif
> [...]
> #ifdef NVIDIA
> #define F(x,y,z)        (z ^ (x & (y ^ z)))
> #else
> #define F(x,y,z)        bitselect(z, y, x)
> #endif
>
> This won't detect CPUs, though - where we also don't want to use
> bitselect() most of the time (the instruction is only available with XOP
> and is probably not used by current OpenCL SDKs since I think only
> Intel's does vectorization) - but this code is mostly just for AMD and
> NVIDIA GPUs now.  We have faster MSCash2 code on CPU anyway.
>
> Alexander
>

So we should use manual bitselect by default.

Sayantan

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.