CUDPP 1.1
radixsort_app.cu File Reference

CUDPP application-level radix sorting routines. More...

#include "cudpp.h"
#include "cudpp_util.h"
#include "cudpp_radixsort.h"
#include "cudpp_scan.h"
#include "kernel/radixsort_kernel.cu"
#include <cutil.h>
#include <cstdlib>
#include <cstdio>
#include <assert.h>

RadixSort Functions

typedef unsigned int uint
template<uint nbits, uint startbit, bool flip, bool unflip>
void radixSortStep (uint *keys, uint *values, const CUDPPRadixSortPlan *plan, uint numElements)
 Perform one step of the radix sort. Sorts by nbits key bits per step, starting at startbit.
template<bool flip>
void radixSortSingleBlock (uint *keys, uint *values, uint numElements)
 Single-block optimization for sorts of fewer than 4 * CTA_SIZE elements.
void radixSort (uint *keys, uint *values, const CUDPPRadixSortPlan *plan, size_t numElements, bool flipBits, int keyBits)
 Main radix sort function.
void radixSortFloatKeys (float *keys, uint *values, const CUDPPRadixSortPlan *plan, size_t numElements, bool negativeKeys, int keyBits)
 Wrapper to call main radix sort function. For float configuration.
template<uint nbits, uint startbit, bool flip, bool unflip>
void radixSortStepKeysOnly (uint *keys, const CUDPPRadixSortPlan *plan, uint numElements)
 Perform one step of the radix sort. Sorts by nbits key bits per step, starting at startbit.
template<bool flip>
void radixSortSingleBlockKeysOnly (uint *keys, uint numElements)
 Optimization for sorts of fewer than 4 * CTA_SIZE elements (keys only).
void radixSortKeysOnly (uint *keys, const CUDPPRadixSortPlan *plan, bool flipBits, size_t numElements, int keyBits)
 Main radix sort function. For keys only configuration.
void radixSortFloatKeysOnly (float *keys, const CUDPPRadixSortPlan *plan, bool negativeKeys, size_t numElements, int keyBits)
 Wrapper to call main radix sort function. For floats and keys only.
void initDeviceParameters (CUDPPRadixSortPlan *plan)
void allocRadixSortStorage (CUDPPRadixSortPlan *plan)
 From the programmer-specified sort configuration, creates internal memory for performing the sort.
void freeRadixSortStorage (CUDPPRadixSortPlan *plan)
 Deallocates intermediate memory from allocRadixSortStorage.
void cudppRadixSortDispatch (void *keys, void *values, size_t numElements, int keyBits, const CUDPPRadixSortPlan *plan)
 Dispatch function to perform a sort on an array with a specified configuration.

Detailed Description

CUDPP application-level radix sorting routines.

radixsort_app.cu

 All Classes Files Functions Variables Enumerations Enumerator Defines