Boost logo

Boost :

Subject: Re: [boost] Synchronization (RE: [compute] review)
From: Thomas M (firespot71_at_[hidden])
Date: 2014-12-31 06:51:05


On 31/12/2014 11:00, Gruenke,Matt wrote:
> I just wanted to remind anyone following this that, if Kyle adopts #2 (embedding synchronization or refcounting in device memory containers), these waits/guards/guarantees/etc. wouldn't be of interest to the majority of users. So, I think it's a lot of debate over what's essentially a corner case. And event guarantees get the job done, while anything else is just easier to use (and misuse).

Let me put it this way: The library should be by itself, that is
implicit / hidden to the user, be as much exception safe as possible (I
think we agree on that). Whatever gets us closest to that is perfectly
fine with me. If I don't need to handle a single guarantee/wait etc. by
myself, great. And as side effect that wipes out the probably biggest
misuse source (= requiring the user to do some explicit in order to be
protected).

Currently I just cannot see, technically speaking, how this can be done
throughout e.g. when the library interfaces with non-library objects
(like plain void * host memory) or via the raw OpenCL objects; hence
tools are useful which - now to be done explicitly by the user - help
out here. Since there's a range of such interactions imaginable, with
different preconditions, equally the tools offered shall provide some
diversity. I am against forcing users to a single but clumpsy tool (an
all-powered event-level guarantee) if the preconditions in a given
application can be much more relaxed and something higher-leveled does
the job as well.

cheers, Thomas


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