|
Message-ID: <CABob6ipD4gJPu+4ffippRaMfWZLCv1i2OnSf-42+N+6NWnTtpw@mail.gmail.com> Date: Sat, 17 Aug 2013 23:17:24 +0200 From: Lukas Odzioba <lukas.odzioba@...il.com> To: john-dev@...ts.openwall.com Subject: Re: Re: Daniel's weekly report #9 2013/8/16 Lukas Odzioba <lukas.odzioba@...il.com>: > I'll try to write proper opencl code this night. A bit later, but here it is. It took me ~3minutes to write this. __kernel void hello(__global int *in, __global int *in2, __global int * out) { size_t tid = get_global_id(0); __local int w[128]; uint i; for(i=0;i<128;i++) w[i]=in[i*tid]; for(i=0;i<20;i++) w[in2[i]]+=in[i]; uint sum=0; for(i=0;i<128;i++) sum+=w[i]; out[tid]=sum; } You can experiment with that. Lukas
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.