Posts Tagged ‘OpenCL’

Radio astronomy beam forming on GPUs

Tuesday, May 24th, 2011

I am finally publishing my master’s degree thesis, whose title is “Radio astronomy beam forming on GPUs“, on this website. The thesis describes all the work I did on the LOFAR beam former and is one of the starting points of the work I am currently doing at the VU (more on this in the future).

The thesis can be downloaded here in pdf format. I want to thank my supervisors for the great work they did helping me in this project. All the mistakes and errors are, of course, mine.

OpenCL memset

Sunday, November 21st, 2010

In September I was porting to OpenCL a version of the radioastronomy beam forming algorithm I realized in CUDA for my master project. The algorithm needs to clean the memory after some iterations, and with CUDA I was using the memset function to do it. Unluckily, OpenCL does not provide a function like memset, so I had to write a kernel to accomplish the task.

Now, it is clear that writing a kernel like this is one of the easiest tasks ever :), and is a one-liner BTW, but as always I’d like to share the code with the Internet, cause it’s always useful to find some example code on-line, especially when you are in a hurry.

__kernel void memSet(float value, __global float *mem) {
    mem[get_global_id(0)] = value;
}

As can be seen, the memory to clean was an array of float values, but changing it to work with other data types is trivial.