37 #ifndef __PCL_GPU_UTILS_REPACKS_HPP__
38 #define __PCL_GPU_UTILS_REPACKS_HPP__
43 #include <pcl/gpu/containers/device_array.h>
53 const int NoCP = 0xFFFFFFFF;
56 inline int cp(
int from,
int to)
58 return ((to & 0xF) << 4) + (from & 0xF);
64 return (cp1 & 0xFF) + ((cp2 & 0xFF) << 8) + ((cp3 & 0xFF) << 16) + ((cp4 & 0xFF) << 24);
68 void copyFieldsImpl(
int in_size,
int out_size,
int rules[4],
int size,
const void* input,
void* output);
70 template<
typename Po
intIn,
typename Po
intOut>
73 int rules[4] = { rule1, rule2, rule3, rule4 };
75 copyFieldsImpl(
sizeof(PointIn)/
sizeof(
int),
sizeof(PointOut)/
sizeof(
int), rules, (
int)src.
size(), src.
ptr(), dst.
ptr());
std::size_t size() const
Returns size in elements.
void create(std::size_t size)
Allocates internal buffer in GPU memory.
T * ptr()
Returns pointer for internal buffer in GPU memory.
Defines all the PCL implemented PointT point type structures.
void copyFieldsEx(const DeviceArray< PointIn > &src, DeviceArray< PointOut > &dst, int rule1, int rule2=NoCP, int rule3=NoCP, int rule4=NoCP)
int cp(int from, int to)
Returns field copy operation code.
int rule(int cp1, int cp2=NoCP, int cp3=NoCP, int cp4=NoCP)
void copyFieldsZ(const DeviceArray< PointXYZ > &src, DeviceArray< float > &dst)
const int NoCP
This is an experimental code ///.
void copyFields(const DeviceArray< PointXYZ > &src, DeviceArray< PointNormal > &dst)
void copyFieldsImpl(int in_size, int out_size, int rules[4], int size, const void *input, void *output)
Defines all the PCL and non-PCL macros used.