pool of blocks of memory holding the statuses or the statistics of synchronous computations performed on a device.
More...
template<typename T, typename Device>
class mfront::generic_parallel::StatusBlockPool< T, Device >
pool of blocks of memory holding the statuses or the statistics of synchronous computations performed on a device.
The kernels only write in a block when an event occurs (failure at a point, bound violated, etc.). The primitives of the backends allocate the blocks in device memory, initialize them by a copy before the computations and copy them back once the computations are completed: the host never accesses a block, which the device may not share with the host while kernels run.
The blocks are allocated at their first use on a device and reused by the following calls: no memory is allocated per call. A block is used by one call at a time, so that concurrent calls (from several threads or on several queues) are supported. As the copies of the shared data, the blocks are never freed by the pool.
- Template Parameters
-
| T | type of the values of a block (a block may hold several values, the allocation function giving the size of the blocks) |
| Device | type identifying a device, comparable with == |