36 #include "../util_namespace.cuh" 37 #include "../util_debug.cuh" 81 template <
typename OffsetT>
99 __host__ __device__ __forceinline__
124 cudaStream_t stream = 0)
126 #if (CUB_PTX_ARCH > 0) 133 counters[FILL] = fill_size;
141 __host__ __device__ __forceinline__ cudaError_t
ResetDrain(cudaStream_t stream = 0)
143 #if (CUB_PTX_ARCH > 0) 154 __host__ __device__ __forceinline__ cudaError_t
ResetFill(cudaStream_t stream = 0)
156 #if (CUB_PTX_ARCH > 0) 167 __host__ __device__ __forceinline__ cudaError_t
FillSize(
169 cudaStream_t stream = 0)
171 #if (CUB_PTX_ARCH > 0) 196 #ifndef DOXYGEN_SHOULD_SKIP_THIS // Do not document 202 template <
typename OffsetT>
212 #endif // DOXYGEN_SHOULD_SKIP_THIS __host__ __device__ __forceinline__ cudaError_t FillAndResetDrain(OffsetT fill_size, cudaStream_t stream=0)
This operation sets the fill-size and resets the drain counter, preparing the GridQueue for draining ...
__host__ __device__ __forceinline__ GridQueue()
Constructs an invalid GridQueue descriptor.
KeyT const ValueT ValueT OffsetT OffsetT num_items
[in] Total number of input data items
Optional outer namespace(s)
__device__ __forceinline__ OffsetT Fill(OffsetT num_items)
Fill num_items into the queue. Returns offset from which to write items. To be called from CUDA kerne...
__host__ __device__ static __forceinline__ size_t AllocationSize()
Returns the device allocation size in bytes needed to construct a GridQueue instance.
__host__ __device__ __forceinline__ cudaError_t ResetFill(cudaStream_t stream=0)
This operation resets the fill counter. To be called by the host or by a kernel prior to that which w...
OffsetT OffsetT
[in] Total number of input data items
__host__ __device__ __forceinline__ cudaError_t ResetDrain(cudaStream_t stream=0)
This operation resets the drain so that it may advance to meet the existing fill-size....
__device__ __forceinline__ OffsetT Drain(OffsetT num_items)
Drain num_items from the queue. Returns offset from which to read items. To be called from CUDA kerne...
OffsetT * d_counters
Pair of counters.
__host__ __device__ __forceinline__ GridQueue(void *d_storage)
Constructs a GridQueue descriptor around the device storage allocation.
#define CubDebug(e)
Debug macro.
__global__ void FillAndResetDrainKernel(GridQueue< OffsetT > grid_queue, OffsetT num_items)
GridQueue is a descriptor utility for dynamic queue management.
__host__ __device__ __forceinline__ cudaError_t FillSize(OffsetT &fill_size, cudaStream_t stream=0)
Returns the fill-size established by the parent or by the previous kernel.