libnabo 1.1.2
Public Types | Public Member Functions | List of all members
Nabo::BruteForceSearchOpenCL< T, CloudType > Struct Template Reference

KDTree, balanced, points in leaves, stack, implicit bounds, balance aspect ratio. More...

#include <nabo_private.h>

Inheritance diagram for Nabo::BruteForceSearchOpenCL< T, CloudType >:
Nabo::OpenCLSearch< T, CloudType > Nabo::NearestNeighbourSearch< T, Cloud_T >

Public Types

typedef NearestNeighbourSearch< T, CloudType >::Vector Vector
 
typedef NearestNeighbourSearch< T, CloudType >::Matrix Matrix
 
typedef NearestNeighbourSearch< T, CloudType >::Index Index
 
- Public Types inherited from Nabo::OpenCLSearch< T, CloudType >
typedef NearestNeighbourSearch< T, CloudType >::Vector Vector
 
typedef NearestNeighbourSearch< T, CloudType >::Matrix Matrix
 
typedef NearestNeighbourSearch< T, CloudType >::Index Index
 
typedef NearestNeighbourSearch< T, CloudType >::IndexVector IndexVector
 
typedef NearestNeighbourSearch< T, CloudType >::IndexMatrix IndexMatrix
 
- Public Types inherited from Nabo::NearestNeighbourSearch< T, Cloud_T >
enum  SearchType {
  BRUTE_FORCE = 0 , KDTREE_LINEAR_HEAP , KDTREE_TREE_HEAP , KDTREE_CL_PT_IN_NODES ,
  KDTREE_CL_PT_IN_LEAVES , BRUTE_FORCE_CL , SEARCH_TYPE_COUNT
}
 type of search More...
 
enum  CreationOptionFlags { TOUCH_STATISTICS = 1 }
 creation option More...
 
enum  SearchOptionFlags { ALLOW_SELF_MATCH = 1 , SORT_RESULTS = 2 }
 search option More...
 
typedef Eigen::Matrix< T, Eigen::Dynamic, 1 > Vector
 an Eigen vector of type T, to hold the coordinates of a point
 
typedef Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > Matrix
 a column-major Eigen matrix in which each column is a point; this matrix has dim rows
 
typedef Cloud_T CloudType
 a column-major Eigen matrix in which each column is a point; this matrix has dim rows
 
typedef int Index
 an index to a Vector or a Matrix, for refering to data points
 
typedef Eigen::Matrix< Index, Eigen::Dynamic, 1 > IndexVector
 a vector of indices to data points
 
typedef Eigen::Matrix< Index, Eigen::Dynamic, Eigen::Dynamic > IndexMatrix
 a matrix of indices to data points
 

Public Member Functions

 BruteForceSearchOpenCL (const CloudType &cloud, const Index dim, const unsigned creationOptionFlags, const cl_device_type deviceType)
 constructor, calls OpenCLSearch<T, CloudType>(cloud, ...)
 
- Public Member Functions inherited from Nabo::OpenCLSearch< T, CloudType >
virtual unsigned long knn (const Matrix &query, IndexMatrix &indices, Matrix &dists2, const Index k, const T epsilon, const unsigned optionFlags, const T maxRadius) const
 
virtual unsigned long knn (const Matrix &query, IndexMatrix &indices, Matrix &dists2, const Vector &maxRadii, const Index k=1, const T epsilon=0, const unsigned optionFlags=0) const
 
- Public Member Functions inherited from Nabo::NearestNeighbourSearch< T, Cloud_T >
unsigned long knn (const Vector &query, IndexVector &indices, Vector &dists2, const Index k=1, const T epsilon=0, const unsigned optionFlags=0, const T maxRadius=std::numeric_limits< T >::infinity()) const
 Find the k nearest neighbours of query.
 
virtual unsigned long knn (const Matrix &query, IndexMatrix &indices, Matrix &dists2, const Index k=1, const T epsilon=0, const unsigned optionFlags=0, const T maxRadius=std::numeric_limits< T >::infinity()) const =0
 Find the k nearest neighbours for each point of query.
 
virtual unsigned long knn (const Matrix &query, IndexMatrix &indices, Matrix &dists2, const Vector &maxRadii, const Index k=1, const T epsilon=0, const unsigned optionFlags=0) const =0
 Find the k nearest neighbours for each point of query.
 
virtual ~NearestNeighbourSearch ()
 virtual destructor
 

Additional Inherited Members

- Static Public Member Functions inherited from Nabo::NearestNeighbourSearch< T, Cloud_T >
static NearestNeighbourSearchcreate (const CloudType &cloud, const Index dim=std::numeric_limits< Index >::max(), const SearchType preferedType=KDTREE_LINEAR_HEAP, const unsigned creationOptionFlags=0, const Parameters &additionalParameters=Parameters())
 Create a nearest-neighbour search.
 
static NearestNeighbourSearchcreateBruteForce (const CloudType &cloud, const Index dim=std::numeric_limits< Index >::max(), const unsigned creationOptionFlags=0)
 Create a nearest-neighbour search, using brute-force search, useful for comparison only.
 
static NearestNeighbourSearchcreateKDTreeLinearHeap (const CloudType &cloud, const Index dim=std::numeric_limits< Index >::max(), const unsigned creationOptionFlags=0, const Parameters &additionalParameters=Parameters())
 Create a nearest-neighbour search, using a kd-tree with linear heap, good for small k (~up to 30)
 
static NearestNeighbourSearchcreateKDTreeTreeHeap (const CloudType &cloud, const Index dim=std::numeric_limits< Index >::max(), const unsigned creationOptionFlags=0, const Parameters &additionalParameters=Parameters())
 Create a nearest-neighbour search, using a kd-tree with tree heap, good for large k (~from 30)
 
template<typename WrongMatrixType >
static NearestNeighbourSearchcreate (const WrongMatrixType &cloud, const Index dim=std::numeric_limits< Index >::max(), const SearchType preferedType=KDTREE_LINEAR_HEAP, const unsigned creationOptionFlags=0, const Parameters &additionalParameters=Parameters())
 Prevent creation of trees with the wrong matrix type. Currently only dynamic size matrices are supported.
 
template<typename WrongMatrixType >
static NearestNeighbourSearchcreateBruteForce (const WrongMatrixType &cloud, const Index dim=std::numeric_limits< Index >::max(), const unsigned creationOptionFlags=0)
 Prevent creation of trees with the wrong matrix type. Currently only dynamic size matrices are supported.
 
template<typename WrongMatrixType >
static NearestNeighbourSearchcreateKDTreeLinearHeap (const WrongMatrixType &cloud, const Index dim=std::numeric_limits< Index >::max(), const unsigned creationOptionFlags=0, const Parameters &additionalParameters=Parameters())
 Prevent creation of trees with the wrong matrix type. Currently only dynamic size matrices are supported.
 
template<typename WrongMatrixType >
static NearestNeighbourSearchcreateKDTreeTreeHeap (const WrongMatrixType &, const Index dim=std::numeric_limits< Index >::max(), const unsigned creationOptionFlags=0, const Parameters &additionalParameters=Parameters())
 Prevent creation of trees with the wrong matrix type. Currently only dynamic size matrices are supported.
 
- Public Attributes inherited from Nabo::NearestNeighbourSearch< T, Cloud_T >
const CloudTypecloud
 the reference to the data-point cloud, which must remain valid during the lifetime of the NearestNeighbourSearch object
 
const Index dim
 the dimensionality of the data-point cloud
 
const unsigned creationOptionFlags
 creation options
 
const Vector minBound
 the low bound of the search space (axis-aligned bounding box)
 
const Vector maxBound
 the high bound of the search space (axis-aligned bounding box)
 
- Static Public Attributes inherited from Nabo::NearestNeighbourSearch< T, Cloud_T >
static constexpr Index InvalidIndex = invalidIndex<Index>()
 the invalid index
 
static constexpr T InvalidValue = invalidValue<T>()
 the invalid value
 
- Protected Member Functions inherited from Nabo::OpenCLSearch< T, CloudType >
 OpenCLSearch (const CloudType &cloud, const Index dim, const unsigned creationOptionFlags, const cl_device_type deviceType)
 constructor, calls NearestNeighbourSearch<T, CloudType>(cloud)
 
void initOpenCL (const char *clFileName, const char *kernelName, const std::string &additionalDefines="")
 Initialize CL support.
 
- Protected Member Functions inherited from Nabo::NearestNeighbourSearch< T, Cloud_T >
 NearestNeighbourSearch (const CloudType &cloud, const Index dim, const unsigned creationOptionFlags)
 constructor
 
void checkSizesKnn (const Matrix &query, const IndexMatrix &indices, const Matrix &dists2, const Index k, const unsigned optionFlags, const Vector *maxRadii=0) const
 Make sure that the output matrices have the right sizes. Throw an exception otherwise.
 
- Protected Attributes inherited from Nabo::OpenCLSearch< T, CloudType >
const cl_device_type deviceType
 the type of device to run CL code on (CL_DEVICE_TYPE_CPU or CL_DEVICE_TYPE_GPU)
 
cl::Context & context
 the CL context
 
cl::Kernel knnKernel
 the kernel to perform knnSearch, mutable because it is stateful, but conceptually const
 
cl::CommandQueue queue
 the command queue
 
cl::Buffer cloudCL
 the buffer for the input data
 

Detailed Description

template<typename T, typename CloudType = Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>>
struct Nabo::BruteForceSearchOpenCL< T, CloudType >

KDTree, balanced, points in leaves, stack, implicit bounds, balance aspect ratio.


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