90#ifndef PCL_GPU_FEATURES_EIGEN_HPP_
91#define PCL_GPU_FEATURES_EIGEN_HPP_
95#include <pcl/gpu/utils/device/algorithm.hpp>
96#include <pcl/gpu/utils/device/vector_math.hpp>
105 float d = b * b - 4.f *
c;
117 if ( std::abs(
c0) < std::numeric_limits<float>::epsilon())
123 const float s_inv3 = 1.f/3.f;
187 if(!isMuchSmallerThan(
src.x,
src.z) || !isMuchSmallerThan(
src.y,
src.z))
215 float max01 =
fmaxf( std::abs(mat_pkg[0]), std::abs(mat_pkg[1]) );
216 float max23 =
fmaxf( std::abs(mat_pkg[2]), std::abs(mat_pkg[3]) );
217 float max45 =
fmaxf( std::abs(mat_pkg[4]), std::abs(mat_pkg[5]) );
221 if (scale <= std::numeric_limits<float>::min())
234 float c0 = m00() * m11() * m22()
235 + 2.f * m01() * m02() * m12()
236 - m00() * m12() * m12()
237 - m11() * m02() * m02()
238 - m22() * m01() * m01();
239 float c1 = m00() * m11() -
245 float c2 = m00() + m11() + m22();
249 if(
evals.z -
evals.x <= std::numeric_limits<float>::epsilon())
255 else if (
evals.y -
evals.x <= std::numeric_limits<float>::epsilon() )
258 tmp[0] = row0();
tmp[1] = row1();
tmp[2] = row2();
285 else if (
evals.z -
evals.y <= std::numeric_limits<float>::epsilon() )
288 tmp[0] = row0();
tmp[1] = row1();
tmp[2] = row2();
318 tmp[0] = row0();
tmp[1] = row1();
tmp[2] = row2();
349 tmp[0] = row0();
tmp[1] = row1();
tmp[2] = row2();
382 tmp[0] = row0();
tmp[1] = row1();
tmp[2] = row2();
424 volatile float* mat_pkg;
428 __device__ __forceinline__
float m02()
const {
return mat_pkg[2]; }
429 __device__ __forceinline__
float m10()
const {
return mat_pkg[1]; }
430 __device__ __forceinline__
float m11()
const {
return mat_pkg[3]; }
431 __device__ __forceinline__
float m12()
const {
return mat_pkg[4]; }
432 __device__ __forceinline__
float m20()
const {
return mat_pkg[2]; }
433 __device__ __forceinline__
float m21()
const {
return mat_pkg[4]; }
434 __device__ __forceinline__
float m22()
const {
return mat_pkg[5]; }
436 __device__ __forceinline__ float3 row0()
const {
return make_float3( m00(), m01(), m02() ); }
437 __device__ __forceinline__ float3 row1()
const {
return make_float3( m10(), m11(), m12() ); }
438 __device__ __forceinline__ float3 row2()
const {
return make_float3( m20(), m21(), m22() ); }
440 __device__ __forceinline__
static bool isMuchSmallerThan (
float x,
float y)
443 constexpr float prec_sqr = std::numeric_limits<float>::epsilon() * std::numeric_limits<float>::epsilon();
444 return x * x <= prec_sqr * y * y;
Iterator class for point clouds with or without given indices.
__device__ __forceinline__ float3 normalized(const float3 &v)
__device__ __forceinline__ float dot(const float3 &v1, const float3 &v2)
__device__ __forceinline__ void computeRoots3(float c0, float c1, float c2, float3 &roots)
__device__ __forceinline__ void computeRoots2(const float &b, const float &c, float3 &roots)
__device__ __host__ __forceinline__ void swap(T &a, T &b)
__device__ __host__ __forceinline__ float3 cross(const float3 &v1, const float3 &v2)
__device__ __host__ __forceinline__ float3 & operator[](int i)
__device__ __host__ __forceinline__ const float3 & operator[](int i) const
__device__ __forceinline__ void compute(Mat33 &tmp, Mat33 &vec_tmp, Mat33 &evecs, float3 &evals)
static __forceinline__ __device__ float3 unitOrthogonal(const float3 &src)
__device__ __forceinline__ Eigen33(volatile float *mat_pkg_arg)