[Opengcd-discuss] missing features in gcd/xdispatch
Portable implementation of Grand Central Dispatch
Brought to you by:
mheily
From: David M. <Dav...@or...> - 2013-02-21 06:33:07
|
Hello Everyone, I just finished a comparative study of xdispatch , boost::asio, Intel TBB and c++11 thread constructs. What I did was write multiple implementations of an OpenCL based data-flow scheduler. As a result of this project I discovered a few things missing in gcd. 1. The ability to get the number of items currently waiting on a queue. This is important for load-balancing. 2. A way to create thread-specific data. GCD has queue specific data, but since a queue isn't bound to a thread it's not the same thing. I found this to be important for efficiently doing task parallelism on GPU's, where the GPU driver itself can handle multiple streams, but those streams need to be bound to threads. 3. A way to limit the number of threads that a work item can be dispatched on. This is also relevant to GPU operations, where (at least on Nvidia) you want a thread per "real" GPU core and a stream (or OpenCL queue) attached to each core. My question is whether it is worth my while to make these changes and try to get them accepted and what is the procedure, forums etc. Where these issues can be discussed. I don't want to do this work unless there is some sort of consensus on acceptance. Considering that Apple is driving GCD, I don't expect much of a hearing, but I imagine the xdispatch community would be more receptive. Some of these issues (like queue size) can only be resolved at the GCD level, but others could conceivably be implemented as xdispatch features. Please advise, David Minor Orbotech |