OCLSLAM  0.1.0
 Hosted by GitHub
Functions | Variables
oclslam Namespace Reference

Offers functions that are serial CPU implementations of the relevant algorithms in the OCLSLAM pipeline. More...

Functions

bool setProfilingFlag (int argc, char **argv)
 Checks the command line arguments for the profiling flag, --profiling. More...
 
template<typename T >
uint64_t nextPow2 (T num)
 Returns the first power of 2 greater than or equal to the input. More...
 
template<typename T >
void printBuffer (const char *title, T *ptr, uint32_t width, uint32_t height)
 Prints an array of an integer type to standard output. More...
 
template<typename T >
void printBufferF (const char *title, T *ptr, uint32_t width, uint32_t height, uint32_t prec)
 Prints an array of floating-point type to standard output. More...
 
template<typename T >
void cpuSplitPC8D (T *pc8d, T *pc3d, cl_uchar *rgb, uint32_t n)
 Splits an 8-D point cloud into 3-D coordinates (in meters) and 8-bit RGB values. More...
 

Variables

std::function< unsigned char()> rNum_0_255 = std::bind (distribution1, generator)
 Uniform number generator in the range \([0, 255]\). More...
 
std::function< unsigned short()> rNum_0_10000 = std::bind (distribution2, generator)
 Uniform number generator in the range \([0, 10000]\). More...
 
std::function< float()> rNum_R_0_1 = std::bind (distributionR1, generator)
 Uniform number generator in the range \([0.0, 1.0)\). More...
 
std::function< float()> rNum_R_1_255_E__6 = std::bind (distributionR2, generator)
 Uniform number generator in the range \([1e-6, 255*1e-6)\). More...
 

Detailed Description

Offers functions that are serial CPU implementations of the relevant algorithms in the OCLSLAM pipeline.

Function Documentation

template<typename T >
void oclslam::cpuSplitPC8D ( T *  pc8d,
T *  pc3d,
cl_uchar *  rgb,
uint32_t  n 
)

Splits an 8-D point cloud into 3-D coordinates (in meters) and 8-bit RGB values.

It is just a naive serial implementation.

Parameters
[in]pc8darray with 8-D points (homogeneous coordiates + RGBA values).
[out]pc3darray with 3-D coordinates (in meters).
[out]rgbarray with 8-bit RGB values.
[in]nnumber of points in the 8-D point cloud.
template<typename T >
uint64_t oclslam::nextPow2 ( num)

Returns the first power of 2 greater than or equal to the input.

Parameters
[in]numinput number.
Returns
The first power of 2 >= num.
template<typename T >
void oclslam::printBuffer ( const char *  title,
T *  ptr,
uint32_t  width,
uint32_t  height 
)

Prints an array of an integer type to standard output.

Template Parameters
Ttype of the data to be printed.
Parameters
[in]titlelegend for the output.
[in]ptrarray that is to be displayed.
[in]widthwidth of the array.
[in]heightheight of the array.
template<typename T >
void oclslam::printBufferF ( const char *  title,
T *  ptr,
uint32_t  width,
uint32_t  height,
uint32_t  prec 
)

Prints an array of floating-point type to standard output.

Template Parameters
Ttype of the data to be printed.
Parameters
[in]titlelegend for the output.
[in]ptrarray that is to be displayed.
[in]widthwidth of the array.
[in]heightheight of the array.
[in]precthe number of decimal places to print.
bool oclslam::setProfilingFlag ( int  argc,
char **  argv 
)

Checks the command line arguments for the profiling flag, --profiling.

Parameters
[in]argccommand line argument count
[in]argvcommand line arguments
Returns
A flag to indicate whether a command line argument for profiling was provided.

Variable Documentation

std::function< unsigned short()> oclslam::rNum_0_10000 = std::bind (distribution2, generator)

Uniform number generator in the range \([0, 10000]\).

std::function< unsigned char()> oclslam::rNum_0_255 = std::bind (distribution1, generator)

Uniform number generator in the range \([0, 255]\).

std::function< float()> oclslam::rNum_R_0_1 = std::bind (distributionR1, generator)

Uniform number generator in the range \([0.0, 1.0)\).

std::function<float ()> oclslam::rNum_R_1_255_E__6 = std::bind (distributionR2, generator)

Uniform number generator in the range \([1e-6, 255*1e-6)\).