cheshirekow  v0.1.0
mpblocks::cudaNN::PointSet< Format_t, NDim > Class Template Reference

provides a convenience interface for managing a point set in GPU memory, and dispatching brute force CUDA searches on that point set More...

#include <mpblocks/cudaNN/PointSet.h>

Public Types

typedef ResultBlock< Format_t, 2 > Result_t
 
typedef cuda::bitonic::Sorter
< Format_t, Format_t > 
Sorter_t
 
typedef unsigned int uint_t
 

Public Member Functions

void allocate (uint_t n)
 reallocates device storage for a point set of size n, also resets the database More...
 
void clear (bool clearmem=false)
 clear the database and reset input iterator More...
 
void config ()
 retreives device properties of the current device, used to calculate kernel peramaters, call once after setting the cuda device and before launching any kernels More...
 
void config (int dev)
 retreives device properties of the specified device, used to calculate kernel peramaters, call once after setting the cuda device and before launching any kernels More...
 
void deallocate ()
 deallocate and zero out pointers More...
 
void distance (EuclideanTag, const Format_t q[NDim], Result_t &out)
 batch compute distance to point set More...
 
void distance (SE3Tag, const Format_t q[NDim], Result_t &out)
 
void distance (R2S1Tag, const Format_t q[NDim], Result_t &out)
 
void distance (EuclideanTag, const Format_t q[NDim], uint_t size, Result_t &out)
 
void distance (SE3Tag, const Format_t q[NDim], uint_t size, Result_t &out)
 
void distance (R2S1Tag, const Format_t q[NDim], uint_t size, Result_t &out)
 
int insert (const Format_t q[NDim])
 insert a new state into the point set, and return it's id More...
 
void nearest (EuclideanTag, const Format_t q[NDim], Result_t &out)
 return k nearest children of q, k is columns of out More...
 
void nearest (SE3Tag, const Format_t q[NDim], Result_t &out)
 
void nearest (R2S1Tag, const Format_t q[NDim], Result_t &out)
 
void nearest (EuclideanTag, const Format_t q[NDim], uint_t size, Result_t &out)
 
void nearest (SE3Tag, const Format_t q[NDim], uint_t size, Result_t &out)
 
void nearest (R2S1Tag, const Format_t q[NDim], uint_t size, Result_t &out)
 
 PointSet (uint_t n=10)
 
 ~PointSet ()
 

Private Member Functions

void computeGrid (uint_t &blocks, uint_t &threads)
 compute the grid size given the current configuration and size of the point set More...
 

Private Attributes

uint_t m_dbAlloc
 size of the point set allocated More...
 
uint_t m_dbAlloc2
 size allocated for the sorted set, will be the next power of two of dbAlloc More...
 
uint_t m_dbSize
 size of the point set filled More...
 
Format_t * m_g_in
 kernel input buffer More...
 
Format_t * m_g_out
 kernel output buffer More...
 
Format_t * m_g_sorted
 output for sorted results More...
 
uint_t m_nSM
 number of multiprocessors More...
 
size_t m_pitchIn
 row-pitch of buffers (in bytes) More...
 
size_t m_pitchOut
 row-pitch of buffers (in bytes) More...
 
Sorter_t m_sorter
 wraps sort kernels More...
 
uint_t m_threadsPerBlock
 maximum threads per block More...
 

Detailed Description

template<typename Format_t, unsigned int NDim>
class mpblocks::cudaNN::PointSet< Format_t, NDim >

provides a convenience interface for managing a point set in GPU memory, and dispatching brute force CUDA searches on that point set

Definition at line 99 of file PointSet.h.

Member Typedef Documentation

template<typename Format_t , unsigned int NDim>
typedef ResultBlock<Format_t,2> mpblocks::cudaNN::PointSet< Format_t, NDim >::Result_t

Definition at line 104 of file PointSet.h.

template<typename Format_t , unsigned int NDim>
typedef cuda::bitonic::Sorter<Format_t,Format_t> mpblocks::cudaNN::PointSet< Format_t, NDim >::Sorter_t

Definition at line 103 of file PointSet.h.

template<typename Format_t , unsigned int NDim>
typedef unsigned int mpblocks::cudaNN::PointSet< Format_t, NDim >::uint_t

Definition at line 102 of file PointSet.h.

Constructor & Destructor Documentation

template<typename Format_t , unsigned int NDim>
mpblocks::cudaNN::PointSet< Format_t, NDim >::PointSet ( uint_t  n = 10)

Definition at line 65 of file PointSet.hpp.

template<typename Format_t , unsigned int NDim>
mpblocks::cudaNN::PointSet< Format_t, NDim >::~PointSet ( )

Definition at line 101 of file PointSet.hpp.

Member Function Documentation

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::allocate ( uint_t  n)

reallocates device storage for a point set of size n, also resets the database

Definition at line 151 of file PointSet.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::clear ( bool  clearmem = false)

clear the database and reset input iterator

Definition at line 189 of file PointSet.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::computeGrid ( uint_t blocks,
uint_t threads 
)
private

compute the grid size given the current configuration and size of the point set

Definition at line 225 of file PointSet.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::config ( )

retreives device properties of the current device, used to calculate kernel peramaters, call once after setting the cuda device and before launching any kernels

Definition at line 210 of file PointSet.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::config ( int  dev)

retreives device properties of the specified device, used to calculate kernel peramaters, call once after setting the cuda device and before launching any kernels

Definition at line 88 of file PointSet.cu.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::deallocate ( )

deallocate and zero out pointers

Definition at line 116 of file PointSet.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::distance ( EuclideanTag  tag,
const Format_t  q[NDim],
Result_t out 
)

batch compute distance to point set

Definition at line 126 of file PointSet.cu.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::distance ( SE3Tag  params,
const Format_t  q[NDim],
Result_t out 
)

Definition at line 262 of file PointSet.cu.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::distance ( R2S1Tag  params,
const Format_t  q[NDim],
Result_t out 
)

Definition at line 407 of file PointSet.cu.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::distance ( EuclideanTag  ,
const Format_t  q[NDim],
uint_t  size,
Result_t out 
)

Definition at line 134 of file PointSet.cu.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::distance ( SE3Tag  params,
const Format_t  q[NDim],
uint_t  size,
Result_t out 
)

Definition at line 270 of file PointSet.cu.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::distance ( R2S1Tag  params,
const Format_t  q[NDim],
uint_t  size,
Result_t out 
)

Definition at line 416 of file PointSet.cu.hpp.

template<typename Format_t , unsigned int NDim>
int mpblocks::cudaNN::PointSet< Format_t, NDim >::insert ( const Format_t  q[NDim])

insert a new state into the point set, and return it's id

Definition at line 243 of file PointSet.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::nearest ( EuclideanTag  tag,
const Format_t  q[NDim],
Result_t out 
)

return k nearest children of q, k is columns of out

Definition at line 166 of file PointSet.cu.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::nearest ( SE3Tag  params,
const Format_t  q[NDim],
Result_t out 
)

Definition at line 303 of file PointSet.cu.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::nearest ( R2S1Tag  params,
const Format_t  q[NDim],
Result_t out 
)

Definition at line 449 of file PointSet.cu.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::nearest ( EuclideanTag  ,
const Format_t  q[NDim],
uint_t  size,
Result_t out 
)

Definition at line 174 of file PointSet.cu.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::nearest ( SE3Tag  params,
const Format_t  q[NDim],
uint_t  size,
Result_t out 
)

Definition at line 311 of file PointSet.cu.hpp.

template<typename Format_t , unsigned int NDim>
void mpblocks::cudaNN::PointSet< Format_t, NDim >::nearest ( R2S1Tag  params,
const Format_t  q[NDim],
uint_t  size,
Result_t out 
)

Definition at line 456 of file PointSet.cu.hpp.

Member Data Documentation

template<typename Format_t , unsigned int NDim>
uint_t mpblocks::cudaNN::PointSet< Format_t, NDim >::m_dbAlloc
private

size of the point set allocated

Definition at line 107 of file PointSet.h.

template<typename Format_t , unsigned int NDim>
uint_t mpblocks::cudaNN::PointSet< Format_t, NDim >::m_dbAlloc2
private

size allocated for the sorted set, will be the next power of two of dbAlloc

Definition at line 108 of file PointSet.h.

template<typename Format_t , unsigned int NDim>
uint_t mpblocks::cudaNN::PointSet< Format_t, NDim >::m_dbSize
private

size of the point set filled

Definition at line 110 of file PointSet.h.

template<typename Format_t , unsigned int NDim>
Format_t* mpblocks::cudaNN::PointSet< Format_t, NDim >::m_g_in
private

kernel input buffer

Definition at line 113 of file PointSet.h.

template<typename Format_t , unsigned int NDim>
Format_t* mpblocks::cudaNN::PointSet< Format_t, NDim >::m_g_out
private

kernel output buffer

Definition at line 114 of file PointSet.h.

template<typename Format_t , unsigned int NDim>
Format_t* mpblocks::cudaNN::PointSet< Format_t, NDim >::m_g_sorted
private

output for sorted results

Definition at line 115 of file PointSet.h.

template<typename Format_t , unsigned int NDim>
uint_t mpblocks::cudaNN::PointSet< Format_t, NDim >::m_nSM
private

number of multiprocessors

Definition at line 120 of file PointSet.h.

template<typename Format_t , unsigned int NDim>
size_t mpblocks::cudaNN::PointSet< Format_t, NDim >::m_pitchIn
private

row-pitch of buffers (in bytes)

Definition at line 111 of file PointSet.h.

template<typename Format_t , unsigned int NDim>
size_t mpblocks::cudaNN::PointSet< Format_t, NDim >::m_pitchOut
private

row-pitch of buffers (in bytes)

Definition at line 112 of file PointSet.h.

template<typename Format_t , unsigned int NDim>
Sorter_t mpblocks::cudaNN::PointSet< Format_t, NDim >::m_sorter
private

wraps sort kernels

Definition at line 117 of file PointSet.h.

template<typename Format_t , unsigned int NDim>
uint_t mpblocks::cudaNN::PointSet< Format_t, NDim >::m_threadsPerBlock
private

maximum threads per block

Definition at line 119 of file PointSet.h.


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