27 #ifndef MPBLOCKS_DUBINS_CURVES_CUDA2_POINTSET_H_
28 #define MPBLOCKS_DUBINS_CURVES_CUDA2_POINTSET_H_
36 namespace curves_cuda {
39 template <
typename Format_t>
83 template <
typename Format_t>
88 typedef std::map< std::string, cuda::FuncAttributes >
fattrMap_t;
120 void set_r( Format_t r );
123 void clear(
bool clearmem=
false);
142 int insert( Format_t q[3] );
173 #endif // POINTSET_H_
void distance_to_set(Format_t q[3], ResultBlock< Format_t > &out)
batch compute distance to point set
Format_t * m_g_sorted
output for sorted results
size_t m_pitchIn
row-pitch of buffers (in bytes)
void allocate(uint_t n)
reallocates device storage for a point set of size n, also resets the database
ResultBlock(uint_t rows=0, uint_t cols=0)
void clear(bool clearmem=false)
clear the database and reset input iterator
size_t m_pitchOut
row-pitch of buffers (in bytes)
static void get_fattr(fattrMap_t &)
retrieve kernel attributes into the map, intended only for printing out statistics ...
void deallocate()
deallocate and zero out pointers
cuda::bitonic::Sorter< Format_t, Format_t > Sorter_t
std::map< std::string, cuda::FuncAttributes > fattrMap_t
void group_distance_to_set(Format_t q[3], ResultBlock< Format_t > &out)
batch compute euclidean distances
Format_t * m_g_out
kernel output buffer
void nearest_parents(Format_t q[3], ResultBlock< Format_t > &out)
return k nearest parents of q
Format_t operator()(int i, int j)
void set_r(Format_t r)
set the radius
void distance_from_set(Format_t q[3], ResultBlock< Format_t > &out)
batch compute distance from point set
void nearest_children(Format_t q[3], ResultBlock< Format_t > &out)
return k nearest children of q
uint_t m_dbAlloc
size of the point set allocated
void computeGrid(uint_t &blocks, uint_t &threads)
compute the grid size given the current configuration and size of the point set
Params< Format_t > m_params
query parameters
int insert(Format_t q[3])
insert a new state into the point set, and return it's id
provides a convenience interface for managing a point set of dubins states in GPU memory...
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
uint_t m_threadsPerBlock
maximum threads per block
Sorter_t m_sorter
wraps sort kernels
uint_t m_nSM
number of multiprocessors
PointSet(uint_t n=10, Format_t r=1)
void group_distance_neighbors(Format_t q[3], ResultBlock< Format_t > &out)
find k euclidean nearest neighbors
Format_t * m_g_in
kernel input buffer
void allocate(uint_t rows, uint_t cols)
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