Declarations of helper functions for testing. More...
#include <cassert>
#include <algorithm>
#include <functional>
#include <RBC/data_types.hpp>
#include <CL/cl.hpp>
Go to the source code of this file.
Namespaces | |
ICP | |
Offers functions that are serial CPU implementations of the relevant algorithms in the ICP pipeline. | |
Functions | |
bool | ICP::setProfilingFlag (int argc, char **argv) |
Checks the command line arguments for the profiling flag, --profiling . More... | |
template<typename T > | |
uint64_t | ICP::nextPow2 (T num) |
Returns the first power of 2 greater than or equal to the input. More... | |
template<typename T > | |
void | ICP::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 | ICP::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 | ICP::cpuReduce (T *in, T *out, uint32_t cols, uint32_t rows, std::function< bool(T, T)> func) |
Reduces each row of an array to a single element. More... | |
template<typename T > | |
void | ICP::cpuReduceSum (T *in, T *out, uint32_t cols, uint32_t rows) |
Reduces each row of an array to a single element (sum). More... | |
template<typename T > | |
void | ICP::cpuInScan (T *in, T *out, uint32_t width, uint32_t height) |
Performs an inclusive scan operation on the columns of an array. More... | |
template<typename T > | |
void | ICP::cpuExScan (T *in, T *out, uint32_t width, uint32_t height) |
Performs an exclusive scan operation on the columns of an array. More... | |
template<typename T > | |
void | ICP::cpuICPLMs (T *in, T *out) |
Samples a point cloud for 16384 (128x128) landmarks. More... | |
template<typename T > | |
void | ICP::cpuICPReps (T *in, T *out, uint32_t nr) |
Samples a set of 16384 (128x128) landmarks for representatives. More... | |
template<typename T > | |
void | ICP::cpuICPWeights (rbc_dist_id *D, T *W, cl_double *SW, uint32_t n) |
Computes weights for pairs of points in the fixed and moving sets, and also reduces them to get their sum. More... | |
template<typename T > | |
void | ICP::cpuICPMean (T *F, T *M, T *mean, uint32_t n) |
Computes the mean on the xyz dimensions of the set of 8-D points. More... | |
template<typename T > | |
void | ICP::cpuICPMeanWeighted (T *F, T *M, T *MEAN, T *W, uint32_t n) |
Computes the weighted mean on the xyz dimensions of the set of 8-D points. More... | |
template<typename T > | |
void | ICP::cpuICPDevs (T *F, T *M, T *DF, T *DM, T *mean, uint32_t n) |
Computes the deviations of a set of points from their mean. More... | |
template<typename T > | |
void | ICP::cpuICPS (T *DM, T *DF, T *S, uint32_t m, float c) |
Calculates the S matrix and the constituents of the scale factor s. More... | |
template<typename T > | |
void | ICP::cpuICPSw (T *M, T *F, T *W, T *S, uint32_t m, float c) |
Calculates the S matrix and the constituents of the scale factor s. More... | |
template<typename T > | |
void | ICP::cross_product (T *a, T *b, T *c) |
Performs a cross product. More... | |
template<typename T > | |
void | ICP::cpuICPTransformQ (T *M, T *tM, T *D, uint32_t m) |
Performs a homogeneous transformation on a set of points using a quaternion and a translation vector. More... | |
template<typename T > | |
void | ICP::cpuICPTransformQ2 (T *M, T *tM, T *D, uint32_t m) |
Performs a homogeneous transformation on a set of points using a quaternion and a translation vector. More... | |
template<typename T > | |
void | ICP::cpuICPTransformM (T *M, T *tM, T *D, uint32_t m) |
Performs a homogeneous transformation on a set of points using a transformation matrix. More... | |
template<typename T > | |
T | ICP::cpuLength (T *x) |
Computes the vector length ( \(\ell_2\) norm). More... | |
template<typename T > | |
T | ICP::cpuDistance (T *x1, T *x2) |
Computes the vector distance ( \(\ell_2\) norm). More... | |
template<typename T > | |
void | ICP::cpuNormalize (T *x) |
Normalizes a vector. More... | |
template<typename T > | |
void | ICP::cpuProd (T *N, T *x, T *x_new) |
Computes a matrix-vector product, \( x_{new}=Nx \). More... | |
template<typename T > | |
T | ICP::cpuICPPowerMethod (T *Sij, T *means, T *Tk) |
Computes the quantities that represent the incremental development in the transformation estimation in iteration k . More... | |
Declarations of helper functions for testing.