40 #include <pcl/cuda/point_types.h>
41 #include <pcl/cuda/thrust.h>
57 unsigned char r,
g,
b;
67 using type = thrust::host_vector<T>;
96 using type = thrust::device_vector<T>;
131 template <
template <
typename>
class Storage>
149 template <
typename OtherStorage>
164 at (
int u,
int v)
const
168 return (
PointXYZRGB (std::numeric_limits<float>::quiet_NaN (),
169 std::numeric_limits<float>::quiet_NaN (),
170 std::numeric_limits<float>::quiet_NaN (),
187 typename Storage<PointXYZRGB>::type
points;
189 using iterator =
typename Storage<PointXYZRGB>::type::iterator;
199 using Ptr = shared_ptr<PointCloudAOS<Storage> >;
200 using ConstPtr = shared_ptr<const PointCloudAOS<Storage> >;
206 template <
template <
typename>
class Storage>
226 template <
typename OtherStorage>
270 typename Storage<int>::type
rgb;
280 using Ptr = shared_ptr<PointCloudSOA<Storage> >;
281 using ConstPtr = shared_ptr<const PointCloudSOA<Storage> >;
287 using iterator_tuple = thrust::tuple<float_iterator, float_iterator, float_iterator>;
293 return (thrust::make_zip_iterator (thrust::make_tuple (
points_x.begin (),
301 return (thrust::make_zip_iterator (thrust::make_tuple (
points_x.end (),
307 template <
template <
typename>
class Storage,
typename T>
313 template <
typename T>
316 using type = thrust::detail::normal_iterator<thrust::device_ptr<T> >;
319 template <
typename T>
322 using type = thrust::detail::normal_iterator<T *>;
325 template <
template <
typename>
class Storage,
typename T>
331 template <
typename T>
334 using type = thrust::device_ptr<T>;
335 template <
typename U>
338 return thrust::device_ptr<U> ((U*)ptr.get());
340 template <
typename U>
341 static thrust::device_ptr<U>
cast (T* ptr)
343 return thrust::device_ptr<U> ((U*)ptr);
347 template <
typename T>
351 template <
typename U>
357 template <
template <
typename>
class Storage,
typename T>
362 template <
typename T>
365 static thrust::device_ptr<T>
alloc (
int size)
367 return thrust::device_malloc<T> (size);
371 template <
typename T>
376 return (T*) malloc (size);
PointCloudAOS represents an AOS (Array of Structs) PointCloud implementation for CUDA processing.
PointCloudAOS & operator<<(const OtherStorage &rhs)
unsigned int height
The point cloud height (if organized as an image-structure).
bool is_dense
True if no points are invalid (e.g., have NaN or Inf values).
unsigned int width
The point cloud width (if organized as an image-structure).
shared_ptr< const PointCloudAOS< Storage > > ConstPtr
typename Storage< PointXYZRGB >::type::iterator iterator
shared_ptr< PointCloudAOS< Storage > > Ptr
PointCloudAOS & operator=(const PointCloudAOS &rhs)
PointXYZRGB & operator()(int u, int v)
PointXYZRGB at(int u, int v) const
Storage< PointXYZRGB >::type points
The point data.
PointCloudSOA represents a SOA (Struct of Arrays) PointCloud implementation for CUDA processing.
unsigned int height
The point cloud height (if organized as an image-structure).
shared_ptr< PointCloudSOA< Storage > > Ptr
shared_ptr< const PointCloudSOA< Storage > > ConstPtr
unsigned int width
The point cloud width (if organized as an image-structure).
thrust::zip_iterator< iterator_tuple > zip_iterator
bool sane() const
Check if the internal point data vectors are valid.
typename Storage< float >::type::iterator float_iterator
void resize(std::size_t newsize)
Resize the internal point data vectors.
PointCloudSOA & operator=(const PointCloudSOA &rhs)
thrust::tuple< float, float, float > tuple_type
bool is_dense
True if no points are invalid (e.g., have NaN or Inf values).
Storage< float >::type points_z
Storage< float >::type points_x
The point data.
thrust::tuple< float_iterator, float_iterator, float_iterator > iterator_tuple
Storage< float >::type points_y
PointCloudSOA & operator<<(const OtherStorage &rhs)
std::size_t size() const
Return the size of the internal vectors.
Defines functions, macros and traits for allocating and using memory.
misnamed class holding a 3x3 matrix
thrust::device_vector< T > type
thrust::host_vector< T > type
Simple structure holding RGB data.
thrust::detail::normal_iterator< thrust::device_ptr< T > > type
thrust::detail::normal_iterator< T * > type
Default point xyz-rgb structure.
static thrust::device_ptr< T > alloc(int size)
static T * alloc(int size)
static thrust::device_ptr< U > cast(type ptr)
thrust::device_ptr< T > type
static thrust::device_ptr< U > cast(T *ptr)
static U * cast(type ptr)