Boost logo

Boost :

Subject: Re: [boost] Interest in a GPU computing library
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-09-18 10:09:08


On 09/18/2012 03:53 AM, Kyle Lutz wrote:

> The core of the Boost Compute library is a thin C++ wrapper over the
> OpenCL C API. It provides classes for creating and managing various
> OpenCL entities such as contexts, buffers, devices and kernels. These
> classes are written in a style consistent with Boost and the C++
> standard library.

I've seen many similar libraries out there, some of which also support
multi-gpu or streaming operations.

What's important is to check that there is no performance loss between
the Boost.Compute version and the handwritten OpenCL version over a
variety of applications, and that Boost.Compute allows a significant
subset of what OpenCL allows.

Without a study that demonstrates both of these points, I do not think I
would be able to vote in favor of such a library.

 From a glance, the interface seems already quite limited, since you
have to copy the whole data from the host to the device before doing
computation on it, then copy the memory back. So not only can you not
overlap transfer time with computation time, you're also limited by the
device memory.
Those limitationd could be fine if they are deliberate, but it should be
pointed out that a lot of applications are ill-suited for the library,
or that some code need to be added on top of the library to do things
better.

Your example uses 'sort'. What sorting algorithm is it? Parallel sorting
is a tricky thing.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk