cheshirekow  v0.1.0
mpblocks::dubins::curves_cuda::PointSet< Format_t > Class Template Reference

provides a convenience interface for managing a point set of dubins states in GPU memory, including brute force CUDA searches on that point set More...

#include <mpblocks/dubins/curves_cuda/PointSet.h>

Public Types

typedef std::map< std::string,
cuda::FuncAttributes
fattrMap_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_from_set (Format_t q[3], ResultBlock< Format_t > &out)
 batch compute distance from point set More...
 
void distance_to_set (Format_t q[3], ResultBlock< Format_t > &out)
 batch compute distance to point set More...
 
void group_distance_neighbors (Format_t q[3], ResultBlock< Format_t > &out)
 find k euclidean nearest neighbors More...
 
void group_distance_to_set (Format_t q[3], ResultBlock< Format_t > &out)
 batch compute euclidean distances More...
 
int insert (Format_t q[3])
 insert a new state into the point set, and return it's id More...
 
void nearest_children (Format_t q[3], ResultBlock< Format_t > &out)
 return k nearest children of q More...
 
void nearest_parents (Format_t q[3], ResultBlock< Format_t > &out)
 return k nearest parents of q More...
 
 PointSet (uint_t n=10, Format_t r=1)
 
void set_r (Format_t r)
 set the radius More...
 
 ~PointSet ()
 

Static Public Member Functions

static void get_fattr (fattrMap_t &)
 retrieve kernel attributes into the map, intended only for printing out statistics More...
 

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...
 
Params< Format_t > m_params
 query parameters 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>
class mpblocks::dubins::curves_cuda::PointSet< Format_t >

provides a convenience interface for managing a point set of dubins states in GPU memory, including brute force CUDA searches on that point set

Definition at line 84 of file PointSet.h.

Member Typedef Documentation

template<typename Format_t >
typedef std::map< std::string, cuda::FuncAttributes > mpblocks::dubins::curves_cuda::PointSet< Format_t >::fattrMap_t

Definition at line 88 of file PointSet.h.

template<typename Format_t >
typedef cuda::bitonic::Sorter<Format_t,Format_t> mpblocks::dubins::curves_cuda::PointSet< Format_t >::Sorter_t

Definition at line 89 of file PointSet.h.

template<typename Format_t >
typedef unsigned int mpblocks::dubins::curves_cuda::PointSet< Format_t >::uint_t

Definition at line 87 of file PointSet.h.

Constructor & Destructor Documentation

template<typename Format_t >
mpblocks::dubins::curves_cuda::PointSet< Format_t >::PointSet ( uint_t  n = 10,
Format_t  r = 1 
)

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

template<typename Format_t >
mpblocks::dubins::curves_cuda::PointSet< Format_t >::~PointSet ( )

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

Member Function Documentation

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::allocate ( uint_t  n)

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

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

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::clear ( bool  clearmem = false)

clear the database and reset input iterator

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

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::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 179 of file PointSet.cu.hpp.

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::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 132 of file PointSet.cu.hpp.

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::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 138 of file PointSet.cu.hpp.

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::deallocate ( )

deallocate and zero out pointers

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

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::distance_from_set ( Format_t  q[3],
ResultBlock< Format_t > &  out 
)

batch compute distance from point set

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

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::distance_to_set ( Format_t  q[3],
ResultBlock< Format_t > &  out 
)

batch compute distance to point set

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

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::get_fattr ( fattrMap_t map)
static

retrieve kernel attributes into the map, intended only for printing out statistics

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

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::group_distance_neighbors ( Format_t  q[3],
ResultBlock< Format_t > &  out 
)

find k euclidean nearest neighbors

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

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::group_distance_to_set ( Format_t  q[3],
ResultBlock< Format_t > &  out 
)

batch compute euclidean distances

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

template<typename Format_t >
int mpblocks::dubins::curves_cuda::PointSet< Format_t >::insert ( Format_t  q[3])

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

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

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::nearest_children ( Format_t  q[3],
ResultBlock< Format_t > &  out 
)

return k nearest children of q

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

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::nearest_parents ( Format_t  q[3],
ResultBlock< Format_t > &  out 
)

return k nearest parents of q

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

template<typename Format_t >
void mpblocks::dubins::curves_cuda::PointSet< Format_t >::set_r ( Format_t  r)

set the radius

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

Member Data Documentation

template<typename Format_t >
uint_t mpblocks::dubins::curves_cuda::PointSet< Format_t >::m_dbAlloc
private

size of the point set allocated

Definition at line 93 of file PointSet.h.

template<typename Format_t >
uint_t mpblocks::dubins::curves_cuda::PointSet< Format_t >::m_dbAlloc2
private

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

Definition at line 94 of file PointSet.h.

template<typename Format_t >
uint_t mpblocks::dubins::curves_cuda::PointSet< Format_t >::m_dbSize
private

size of the point set filled

Definition at line 96 of file PointSet.h.

template<typename Format_t >
Format_t* mpblocks::dubins::curves_cuda::PointSet< Format_t >::m_g_in
private

kernel input buffer

Definition at line 99 of file PointSet.h.

template<typename Format_t >
Format_t* mpblocks::dubins::curves_cuda::PointSet< Format_t >::m_g_out
private

kernel output buffer

Definition at line 100 of file PointSet.h.

template<typename Format_t >
Format_t* mpblocks::dubins::curves_cuda::PointSet< Format_t >::m_g_sorted
private

output for sorted results

Definition at line 101 of file PointSet.h.

template<typename Format_t >
uint_t mpblocks::dubins::curves_cuda::PointSet< Format_t >::m_nSM
private

number of multiprocessors

Definition at line 106 of file PointSet.h.

template<typename Format_t >
Params<Format_t> mpblocks::dubins::curves_cuda::PointSet< Format_t >::m_params
private

query parameters

Definition at line 92 of file PointSet.h.

template<typename Format_t >
size_t mpblocks::dubins::curves_cuda::PointSet< Format_t >::m_pitchIn
private

row-pitch of buffers (in bytes)

Definition at line 97 of file PointSet.h.

template<typename Format_t >
size_t mpblocks::dubins::curves_cuda::PointSet< Format_t >::m_pitchOut
private

row-pitch of buffers (in bytes)

Definition at line 98 of file PointSet.h.

template<typename Format_t >
Sorter_t mpblocks::dubins::curves_cuda::PointSet< Format_t >::m_sorter
private

wraps sort kernels

Definition at line 103 of file PointSet.h.

template<typename Format_t >
uint_t mpblocks::dubins::curves_cuda::PointSet< Format_t >::m_threadsPerBlock
private

maximum threads per block

Definition at line 105 of file PointSet.h.


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