CUDPP  2.2
CUDA Data-Parallel Primitives Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Types | Static Public Member Functions | List of all members
ScanTraits< T, Oper, backward, exclusive, multiRow, sums, fullBlock > Class Template Reference

Template class containing compile-time parameters to the scan functions. More...

Public Types

typedef Oper Op
 The operator functor used for the scan.
 

Static Public Member Functions

static __device__ bool isBackward ()
 Returns true if this is a backward scan.
 
static __device__ bool isExclusive ()
 Returns true if this is an exclusive scan.
 
static __device__ bool isMultiRow ()
 Returns true if this a multi-row scan.
 
static __device__ bool writeSums ()
 Returns true if this scan writes the sum of each block to the d_blockSums array (multi-block scans)
 
static __device__ bool isFullBlock ()
 Returns true if this is a full scan – all blocks process CTA_SIZE * SCAN_ELEMENTS_PER_THREAD elements.
 

Detailed Description

template<typename T, class Oper, bool backward, bool exclusive, bool multiRow, bool sums, bool fullBlock>
class ScanTraits< T, Oper, backward, exclusive, multiRow, sums, fullBlock >

Template class containing compile-time parameters to the scan functions.

ScanTraits is passed as a template parameter to all scan functions. By using these compile-time functions we can enable generic code while maintaining the highest performance. This is crucial for the performance of low-level workhorse algorithms like scan.

Parameters
TThe datatype of the scan
operThe CUDPPOperator to use for the scan (add, max, etc.)
multiRowTrue if this is a multi-row scan
unrollTrue if scan inner loops should be unrolled
sumsTrue if each block should write it's sum to the d_blockSums array (false for single-block scans)
backwardTrue if this is a backward scan
fullBlockTrue if all blocks in this scan are full (CTA_SIZE * SCAN_ELEMENTS_PER_THREAD elements)
exclusiveTrue for exclusive scans, false for inclusive scans

The documentation for this class was generated from the following file: