cheshirekow  v0.1.0
mpblocks::cuda::bitonic Namespace Reference

Classes

class  Sorter
 A utility class for calculating properties of the bitonic sort kernels. More...
 
class  Sorter< KeyType, void >
 partial specialization for key-only sort More...
 

Typedefs

typedef std::map< std::string,
FuncAttributes
fattrMap_t
 
typedef unsigned int uint_t
 

Enumerations

enum  Direction { Descending = 0, Ascending = 1 }
 specifies values for the direction the sorter should sort the keys More...
 

Functions

template<typename KeyType , typename ValueType >
__device__ void compareSwap (KeyType &keyA, ValueType &valA, KeyType &keyB, ValueType &valB, Direction dir)
 implements a "comparator": compares to keys and swaps them if they are not in the desired order More...
 
template<typename KeyType >
__device__ void compareSwap (KeyType &keyA, KeyType &keyB, Direction dir)
 compares to keys and swaps them if they are not in the desired order More...
 
template<typename KeyType >
void get_fattr_k (fattrMap_t &map)
 
template<typename KeyType , typename ValueType >
void get_fattr_kv (fattrMap_t &map)
 
template<typename KeyType , typename ValueType >
__global__ void mergeGlobal (KeyType *d_DstKey, ValueType *d_DstVal, KeyType *d_SrcKey, ValueType *d_SrcVal, uint_t arrayLength, uint_t size, uint_t stride, Direction dir)
 sorts a bitonic series, this kernel is for a stride >= SHARED_SIZE_LIMIT More...
 
template<typename KeyType >
__global__ void mergeGlobal (KeyType *d_DstKey, KeyType *d_SrcKey, uint_t arrayLength, uint_t size, uint_t stride, Direction dir)
 sorts a bitonic series, this kernel is for a stride >= SHARED_SIZE_LIMIT More...
 
template<typename KeyType , typename ValueType >
__global__ void mergeShared (KeyType *d_DstKey, ValueType *d_DstVal, KeyType *d_SrcKey, ValueType *d_SrcVal, uint_t arrayLength, uint_t sharedLength, uint_t size, Direction dir)
 sorts a bitonic series, this kernel is for size > SHARED_SIZE_LIMIT and for a stride in [1, SHARED_SIZE_LIMIT/2] More...
 
template<typename KeyType >
__global__ void mergeShared (KeyType *d_DstKey, KeyType *d_SrcKey, uint_t arrayLength, uint_t sharedLength, uint_t size, Direction dir)
 sorts a bitonic series, this kernel is for size > SHARED_SIZE_LIMIT and for a stride in [1, SHARED_SIZE_LIMIT/2] More...
 
template<typename KeyType >
__global__ void prepare (KeyType *d_SrcKey, KeyType init, uint_t arrayLength)
 used when arrayLength is not a power of two, it writes to all values of d_SrcKey (which is an offset from of the actual source buffer) More...
 
void print_kernel_info (const char *kernel, const cuda::FuncAttributes &attr)
 
template<typename KeyType , typename ValueType >
uint_t sort (KeyType *d_DstKey, ValueType *d_DstVal, KeyType *d_SrcKey, ValueType *d_SrcVal, uint_t arrayLength, uint_t sharedLength, Direction dir, uint_t globalThread)
 kernel launcher, sorts an array of key/value pairs using the bitonic sort algorithm More...
 
template<typename KeyType >
uint_t sort (KeyType *d_DstKey, KeyType *d_SrcKey, uint_t arrayLength, uint_t sharedLength, Direction dir, uint_t globalThread)
 kernel launcher, sorts an array of key/value pairs using the bitonic sort algorithm More...
 
template<typename KeyType , typename ValueType >
__global__ void sortShared (KeyType *d_DstKey, ValueType *d_DstVal, KeyType *d_SrcKey, ValueType *d_SrcVal, uint_t arrayLength, Direction dir)
 single kernel (unified) bitonic sort More...
 
template<typename KeyType >
__global__ void sortShared (KeyType *d_DstKey, KeyType *d_SrcKey, uint_t arrayLength, Direction dir)
 single kernel (unified) bitonic sort More...
 
template<typename KeyType , typename ValueType >
__global__ void sortSharedInc (KeyType *d_DstKey, ValueType *d_DstVal, KeyType *d_SrcKey, ValueType *d_SrcVal, uint_t sharedLength)
 bottom level of the bitonic sort More...
 
template<typename KeyType >
__global__ void sortSharedInc (KeyType *d_DstKey, KeyType *d_SrcKey, uint_t sharedLength)
 bottom level of the bitonic sort More...
 

Typedef Documentation

typedef std::map<std::string,FuncAttributes> mpblocks::cuda::bitonic::fattrMap_t

Definition at line 43 of file fattr.h.

typedef unsigned int mpblocks::cuda::bitonic::uint_t

Definition at line 40 of file kernels.cu.hpp.

Enumeration Type Documentation

specifies values for the direction the sorter should sort the keys

Enumerator
Descending 

sort should be descending, i.e. a[i] > [aj], i < j

Ascending 

sort should be ascending, i.e. a[i] < a[j], i < j

Definition at line 37 of file Direction.h.

Function Documentation

template<typename KeyType >
void mpblocks::cuda::bitonic::get_fattr_k ( fattrMap_t &  map)

Definition at line 56 of file fattr.cu.hpp.

template<typename KeyType , typename ValueType >
void mpblocks::cuda::bitonic::get_fattr_kv ( fattrMap_t &  map)

Definition at line 44 of file fattr.cu.hpp.

void mpblocks::cuda::bitonic::print_kernel_info ( const char *  kernel,
const cuda::FuncAttributes &  attr 
)
inline

Definition at line 29 of file Sorter.cu.hpp.