Basic Image AlgorithmS Library
2.8.0
|
#include <OpenCLFramework/Algorithm/clfRadixSort.hh>
Public Member Functions | |
void | ApplyPermutation (clfBuffer *in, clfBuffer *out, int elemsize, int numElems, bool hightolow=false) |
void | Check (void) |
clfRadixSort (clfContext *ctx=NULL, bool sharedGL=false, unsigned int device=0) | |
clfProgram * | GetCLProgram () |
clfContext * | GetContext () |
unsigned int * | GetPermutation (unsigned int num=0) |
void | Histogram (unsigned int pass) |
void | Host2GPU (void) |
void | RecupGPU (void) |
void | Reorder (unsigned int pass) |
void | Resize (int nn) |
void | ScanHistogram (void) |
void | SetData (int num, float *data, int scale=1) |
void | SetData (int num, clfBuffer *data) |
void | Sort () |
void | Transpose (int nbrow, int nbcol) |
virtual | ~clfRadixSort () |
Static Public Member Functions | |
static void | getlocsize (const unsigned int val, unsigned int &result) |
static unsigned int | getlocsize (const unsigned int val) |
Public Attributes | |
clfBuffer * | d_globsum |
clfBuffer * | d_Histograms |
clfBuffer * | d_inKeys |
clfBuffer * | d_inPermut |
clfBuffer * | d_outKeys |
clfBuffer * | d_outPermut |
clfBuffer * | d_temp |
unsigned int | h_checkKeys [(1<< 23)] |
unsigned int | h_globsum [512] |
unsigned int | h_Histograms [5 *16 *16] |
unsigned int | h_initialPermut [(1<< 23)] |
unsigned int | h_Keys [(1<< 23)] |
unsigned int | h_Permut [(1<< 23)] |
float | histo_time |
unsigned int | nkeys |
unsigned int | nkeys_rounded |
float | reorder_time |
float | scan_time |
float | sort_time |
float | transpose_time |
Protected Member Functions | |
void | InitInternal_ (clfContext *ctx, bool sharedGL, unsigned int device) |
Protected Attributes | |
clfContext * | context_ |
int | device_ |
bool | isSharedGL_ |
int | maxComputeUnits_ |
bool | ownContext_ |
clfProgram * | programCL_ |
Definition at line 24 of file clfRadixSort.hh.
clfRadixSort::clfRadixSort | ( | clfContext * | ctx = NULL , |
bool | sharedGL = false , |
||
unsigned int | device = 0 |
||
) |
Definition at line 29 of file clfRadixSort.cpp.
References BIAS::clfProgram::AddKernel(), BIAS::clfProgram::AddSource(), BIAS::clfBuffer::Allocate(), BIAS::clfProgram::Build(), BIAS::clfAlgorithm::context_, BIAS::clfContext::CreateBuffer(), d_globsum, d_Histograms, d_inKeys, d_inPermut, d_outKeys, d_outPermut, d_temp, BIAS::clfException::GetDetailedString(), h_initialPermut, histo_time, BIAS::clfProgram::KernelSetArgument(), BIAS::clfProgram::KernelSetLocalArgument(), nkeys, nkeys_rounded, BIAS::clfAlgorithm::programCL_, reorder_time, scan_time, and transpose_time.
|
virtual |
Definition at line 261 of file clfRadixSort.cpp.
References d_globsum, d_Histograms, d_inKeys, d_inPermut, d_outKeys, and d_outPermut.
void clfRadixSort::ApplyPermutation | ( | clfBuffer * | in, |
clfBuffer * | out, | ||
int | elemsize, | ||
int | numElems, | ||
bool | hightolow = false |
||
) |
Definition at line 229 of file clfRadixSort.cpp.
References BIAS::clfAlgorithm::context_, d_inPermut, BIAS::clfContext::DivUp(), BIAS::clfProgram::KernelSetArgument(), BIAS::clfAlgorithm::programCL_, and BIAS::clfContext::RunOn1DRange().
void clfRadixSort::Check | ( | void | ) |
Definition at line 241 of file clfRadixSort.cpp.
References h_Keys, nkeys, and RecupGPU().
|
inlineinherited |
Definition at line 25 of file clfAlgorithm.hh.
|
inlineinherited |
Definition at line 23 of file clfAlgorithm.hh.
|
staticinherited |
Definition at line 53 of file clfAlgorithm.cpp.
|
staticinherited |
Definition at line 57 of file clfAlgorithm.cpp.
unsigned int * clfRadixSort::GetPermutation | ( | unsigned int | num = 0 | ) |
Definition at line 288 of file clfRadixSort.cpp.
References d_inPermut, h_Permut, and BIAS::clfBuffer::ReadFromBuffer().
Referenced by BIAS::clfTrimmedICP::ComputeNearestPoints_().
void clfRadixSort::Histogram | ( | unsigned int | pass | ) |
Definition at line 299 of file clfRadixSort.cpp.
References BIAS::clfAlgorithm::context_, d_inKeys, BIAS::clfContext::Finish(), BIAS::clfProgram::KernelSetArgument(), nkeys_rounded, BIAS::clfAlgorithm::programCL_, and BIAS::clfContext::RunOn1DRange().
Referenced by Sort().
void clfRadixSort::Host2GPU | ( | void | ) |
Definition at line 282 of file clfRadixSort.cpp.
References BIAS::clfAlgorithm::context_, d_inKeys, d_inPermut, BIAS::clfContext::Finish(), h_Keys, h_Permut, and BIAS::clfBuffer::WriteToBuffer().
Referenced by SetData().
|
protectedinherited |
Definition at line 33 of file clfAlgorithm.cpp.
References BIAS::clfAlgorithm::context_, BIAS::clfContext::CreateProgram(), BIAS::clfAlgorithm::device_, BIAS::clfContext::GetDeviceInfo(), BIAS::clfAlgorithm::isSharedGL_, BIAS::clfContext::IsSharedGLContext(), clfDeviceInfo::maxComputeUnits, BIAS::clfAlgorithm::maxComputeUnits_, BIAS::clfAlgorithm::ownContext_, BIAS::clfAlgorithm::programCL_, and BIAS::clfContext::SetActiveDevice().
Referenced by BIAS::clfAlgorithm::clfAlgorithm().
void clfRadixSort::RecupGPU | ( | void | ) |
Definition at line 273 of file clfRadixSort.cpp.
References BIAS::clfAlgorithm::context_, d_globsum, d_Histograms, d_inKeys, d_inPermut, BIAS::clfContext::Finish(), h_globsum, h_Histograms, h_Keys, h_Permut, and BIAS::clfBuffer::ReadFromBuffer().
Referenced by Check(), and BIAS::clfTrimmedICP::ComputeNearestPoints_().
void clfRadixSort::Reorder | ( | unsigned int | pass | ) |
Definition at line 357 of file clfRadixSort.cpp.
References BIAS::clfAlgorithm::context_, d_inKeys, d_inPermut, d_outKeys, d_outPermut, d_temp, BIAS::clfContext::Finish(), BIAS::clfProgram::KernelSetArgument(), nkeys_rounded, BIAS::clfAlgorithm::programCL_, and BIAS::clfContext::RunOn1DRange().
Referenced by Sort().
void clfRadixSort::Resize | ( | int | nn | ) |
Definition at line 127 of file clfRadixSort.cpp.
References d_inKeys, nkeys, nkeys_rounded, and BIAS::clfBuffer::WriteToBuffer().
Referenced by SetData().
void clfRadixSort::ScanHistogram | ( | void | ) |
Definition at line 319 of file clfRadixSort.cpp.
References BIAS::clfAlgorithm::context_, d_globsum, d_Histograms, d_temp, BIAS::clfContext::Finish(), BIAS::clfProgram::KernelSetArgument(), BIAS::clfAlgorithm::programCL_, and BIAS::clfContext::RunOn1DRange().
Referenced by Sort().
void clfRadixSort::SetData | ( | int | num, |
float * | data, | ||
int | scale = 1 |
||
) |
Definition at line 107 of file clfRadixSort.cpp.
References h_Keys, h_Permut, Host2GPU(), and Resize().
Referenced by BIAS::clfTrimmedICP::ComputeNearestPoints_().
void clfRadixSort::SetData | ( | int | num, |
clfBuffer * | data | ||
) |
Definition at line 119 of file clfRadixSort.cpp.
References BIAS::clfAlgorithm::context_, BIAS::clfBuffer::CopyBuffer(), d_inKeys, d_inPermut, BIAS::clfContext::Finish(), h_initialPermut, Resize(), and BIAS::clfBuffer::WriteToBuffer().
void clfRadixSort::Sort | ( | ) |
Definition at line 204 of file clfRadixSort.cpp.
References histo_time, Histogram(), nkeys, nkeys_rounded, Reorder(), reorder_time, scan_time, ScanHistogram(), sort_time, Transpose(), and transpose_time.
Referenced by BIAS::clfTrimmedICP::ComputeNearestPoints_().
void clfRadixSort::Transpose | ( | int | nbrow, |
int | nbcol | ||
) |
Definition at line 150 of file clfRadixSort.cpp.
References BIAS::clfAlgorithm::context_, d_inKeys, d_inPermut, d_outKeys, d_outPermut, d_temp, BIAS::clfContext::Finish(), BIAS::clfProgram::KernelSetArgument(), BIAS::clfProgram::KernelSetLocalArgument(), BIAS::clfAlgorithm::programCL_, and BIAS::clfContext::RunOn2DRange().
Referenced by Sort().
|
protectedinherited |
Definition at line 34 of file clfAlgorithm.hh.
Referenced by ApplyPermutation(), BIAS::clfAlgorithm::clfAlgorithm(), clfRadixSort(), BIAS::clfUnifiedMultilateralFilter::clfUnifiedMultilateralFilter(), BIAS::clfUnifiedMultilateralFilter::Compute(), BIAS::clfCopy::Copy(), BIAS::clfImageOperator::CutOffMinThreshold(), BIAS::clfImageOperator::Difference(), BIAS::clfRecursiveGauss::FilterGrey(), BIAS::clfRecursiveGauss::FilterGreyColPacked(), BIAS::clfRecursiveGauss::FilterX(), BIAS::clfRecursiveGauss::FilterY(), Histogram(), Host2GPU(), BIAS::clfUnifiedMultilateralFilter::Init(), BIAS::clfUnifiedMultilateralFilter::InitColorFilter(), BIAS::clfUnifiedMultilateralFilter::InitCredibilityFilter(), BIAS::clfUnifiedMultilateralFilter::InitDepthFilter(), BIAS::clfAlgorithm::InitInternal_(), BIAS::clfUnifiedMultilateralFilter::InitSpatialFilter(), RecupGPU(), Reorder(), ScanHistogram(), SetData(), Transpose(), and BIAS::clfAlgorithm::~clfAlgorithm().
clfBuffer* BIAS::clfRadixSort::d_globsum |
Definition at line 74 of file clfRadixSort.hh.
Referenced by clfRadixSort(), RecupGPU(), ScanHistogram(), and ~clfRadixSort().
clfBuffer* BIAS::clfRadixSort::d_Histograms |
Definition at line 69 of file clfRadixSort.hh.
Referenced by clfRadixSort(), RecupGPU(), ScanHistogram(), and ~clfRadixSort().
clfBuffer* BIAS::clfRadixSort::d_inKeys |
Definition at line 82 of file clfRadixSort.hh.
Referenced by clfRadixSort(), Histogram(), Host2GPU(), RecupGPU(), Reorder(), Resize(), SetData(), Transpose(), and ~clfRadixSort().
clfBuffer* BIAS::clfRadixSort::d_inPermut |
Definition at line 88 of file clfRadixSort.hh.
Referenced by ApplyPermutation(), clfRadixSort(), GetPermutation(), Host2GPU(), RecupGPU(), Reorder(), SetData(), Transpose(), and ~clfRadixSort().
clfBuffer* BIAS::clfRadixSort::d_outKeys |
Definition at line 83 of file clfRadixSort.hh.
Referenced by clfRadixSort(), Reorder(), Transpose(), and ~clfRadixSort().
clfBuffer* BIAS::clfRadixSort::d_outPermut |
Definition at line 89 of file clfRadixSort.hh.
Referenced by clfRadixSort(), Reorder(), Transpose(), and ~clfRadixSort().
clfBuffer* BIAS::clfRadixSort::d_temp |
Definition at line 75 of file clfRadixSort.hh.
Referenced by clfRadixSort(), Reorder(), ScanHistogram(), and Transpose().
|
protectedinherited |
Definition at line 39 of file clfAlgorithm.hh.
Referenced by BIAS::clfAlgorithm::clfAlgorithm(), and BIAS::clfAlgorithm::InitInternal_().
unsigned int BIAS::clfRadixSort::h_checkKeys[(1<< 23)] |
Definition at line 80 of file clfRadixSort.hh.
unsigned int BIAS::clfRadixSort::h_globsum[512] |
Definition at line 73 of file clfRadixSort.hh.
Referenced by RecupGPU().
unsigned int BIAS::clfRadixSort::h_Histograms[5 *16 *16] |
Definition at line 68 of file clfRadixSort.hh.
Referenced by RecupGPU().
unsigned int BIAS::clfRadixSort::h_initialPermut[(1<< 23)] |
Definition at line 87 of file clfRadixSort.hh.
Referenced by clfRadixSort(), and SetData().
unsigned int BIAS::clfRadixSort::h_Keys[(1<< 23)] |
Definition at line 81 of file clfRadixSort.hh.
Referenced by Check(), Host2GPU(), RecupGPU(), and SetData().
unsigned int BIAS::clfRadixSort::h_Permut[(1<< 23)] |
Definition at line 86 of file clfRadixSort.hh.
Referenced by GetPermutation(), Host2GPU(), RecupGPU(), and SetData().
float BIAS::clfRadixSort::histo_time |
Definition at line 92 of file clfRadixSort.hh.
Referenced by clfRadixSort(), and Sort().
|
protectedinherited |
Definition at line 37 of file clfAlgorithm.hh.
Referenced by BIAS::clfAlgorithm::clfAlgorithm(), and BIAS::clfAlgorithm::InitInternal_().
|
protectedinherited |
Definition at line 38 of file clfAlgorithm.hh.
Referenced by BIAS::clfAlgorithm::clfAlgorithm(), and BIAS::clfAlgorithm::InitInternal_().
unsigned int BIAS::clfRadixSort::nkeys |
Definition at line 78 of file clfRadixSort.hh.
Referenced by Check(), clfRadixSort(), Resize(), and Sort().
unsigned int BIAS::clfRadixSort::nkeys_rounded |
Definition at line 79 of file clfRadixSort.hh.
Referenced by clfRadixSort(), Histogram(), Reorder(), Resize(), and Sort().
|
protectedinherited |
Definition at line 36 of file clfAlgorithm.hh.
Referenced by BIAS::clfAlgorithm::clfAlgorithm(), BIAS::clfAlgorithm::InitInternal_(), and BIAS::clfAlgorithm::~clfAlgorithm().
|
protectedinherited |
Definition at line 35 of file clfAlgorithm.hh.
Referenced by ApplyPermutation(), BIAS::clfAlgorithm::clfAlgorithm(), BIAS::clfCopy::clfCopy(), BIAS::clfImageOperator::clfImageOperator(), clfRadixSort(), BIAS::clfRecursiveGauss::clfRecursiveGauss(), BIAS::clfUnifiedMultilateralFilter::clfUnifiedMultilateralFilter(), BIAS::clfUnifiedMultilateralFilter::Compute(), BIAS::clfCopy::Copy(), BIAS::clfImageOperator::CutOffMinThreshold(), BIAS::clfImageOperator::Difference(), BIAS::clfRecursiveGauss::FilterGrey(), BIAS::clfRecursiveGauss::FilterGreyColPacked(), BIAS::clfRecursiveGauss::FilterX(), BIAS::clfRecursiveGauss::FilterY(), Histogram(), BIAS::clfUnifiedMultilateralFilter::InitCredibilityFilter(), BIAS::clfAlgorithm::InitInternal_(), Reorder(), ScanHistogram(), BIAS::clfRecursiveGauss::SetSigma(), Transpose(), and BIAS::clfAlgorithm::~clfAlgorithm().
float BIAS::clfRadixSort::reorder_time |
Definition at line 92 of file clfRadixSort.hh.
Referenced by clfRadixSort(), and Sort().
float BIAS::clfRadixSort::scan_time |
Definition at line 92 of file clfRadixSort.hh.
Referenced by clfRadixSort(), and Sort().
float BIAS::clfRadixSort::sort_time |
Definition at line 92 of file clfRadixSort.hh.
Referenced by Sort().
float BIAS::clfRadixSort::transpose_time |
Definition at line 92 of file clfRadixSort.hh.
Referenced by clfRadixSort(), and Sort().