27 #ifndef MPBLOCKS_CUDANN_POINTSET_H_
28 #define MPBLOCKS_CUDANN_POINTSET_H_
39 template <
typename Format_t,
unsigned int NDim>
98 template <
typename Format_t,
unsigned int NDim>
134 void clear(
bool clearmem=
false);
153 int insert(
const Format_t q[NDim] );
179 #endif // POINTSET_H_
ResultBlock(uint_t cols=0)
void allocate(uint_t cols)
cuda::bitonic::Sorter< Format_t, Format_t > Sorter_t
R2S1Tag operator()(float w) const
provides a convenience interface for managing a point set in GPU memory, and dispatching brute force ...
uint_t m_nSM
number of multiprocessors
Format_t * m_g_in
kernel input buffer
Format_t operator()(int i, int j)
uint_t m_threadsPerBlock
maximum threads per block
void deallocate()
deallocate and zero out pointers
void computeGrid(uint_t &blocks, uint_t &threads)
compute the grid size given the current configuration and size of the point set
void clear(bool clearmem=false)
clear the database and reset input iterator
void distance(EuclideanTag, const Format_t q[NDim], Result_t &out)
batch compute distance to point set
uint_t m_dbAlloc2
size allocated for the sorted set, will be the next power of two of dbAlloc
uint_t m_dbSize
size of the point set filled
ResultBlock< Format_t, 2 > Result_t
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
size_t m_pitchIn
row-pitch of buffers (in bytes)
size_t m_pitchOut
row-pitch of buffers (in bytes)
void nearest(EuclideanTag, const Format_t q[NDim], Result_t &out)
return k nearest children of q, k is columns of out
const EuclideanTag EUCLIDEAN
Sorter_t m_sorter
wraps sort kernels
SE3Tag operator()(float w) const
int insert(const Format_t q[NDim])
insert a new state into the point set, and return it's id
void allocate(uint_t n)
reallocates device storage for a point set of size n, also resets the database
uint_t m_dbAlloc
size of the point set allocated
Format_t * m_g_sorted
output for sorted results
Format_t * m_g_out
kernel output buffer