37 #ifndef PCL_GPU_FEATURS_DEVICE_VECTOR_OPERATIONS_HPP_
38 #define PCL_GPU_FEATURS_DEVICE_VECTOR_OPERATIONS_HPP_
40 #include <pcl/gpu/features/device/rodrigues.hpp>
41 #include <pcl/gpu/utils/device/vector_math.hpp>
47 __forceinline__ __device__ __host__ float3
operator/(
const float3& vec,
float val)
49 return make_float3(vec.x/val, vec.y/val, vec.z/val);
52 __device__ __host__ __forceinline__ float3&
operator/=(float3& v,
const float& value)
60 __device__ __host__ __forceinline__
float norm(
const float3& v1,
const float3& v2)
62 float dx = v1.x - v2.x;
63 float dy = v1.y - v2.y;
64 float dz = v1.z - v2.z;
65 return sqrtf(dx*dx + dy*dy + dz*dz);
68 template<
typename T> __device__ __forceinline__ float3
tr(
const T& v)
70 return make_float3(v.x, v.y, v.z);
73 inline __host__ __device__ float3
normalize(
const float3& v)
__host__ __device__ __forceinline__ float inverse_norm(const T &v)
__device__ __forceinline__ float3 tr(const T &v)
__forceinline__ __device__ __host__ float3 operator/(const float3 &vec, float val)
__host__ __device__ float3 normalize(const float3 &v)
__device__ __host__ __forceinline__ float norm(const float3 &v1, const float3 &v2)
__device__ __host__ __forceinline__ float3 & operator/=(float3 &v, const float &value)