Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
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

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ