31 {
return ptr + mult *
dims.x *
dims.y; }
38 coo.x = __fmaf_rn(f.x, __fdividef(p.x, p.z), c.x);
39 coo.y = __fmaf_rn(f.y, __fdividef(p.y, p.z), c.y);
48 float x = z * (u - c.x) * finv.x;
49 float y = z * (v - c.y) * finv.y;
50 return make_float3(x, y, z);
57 {
return make_ushort2 (__float2half_rn (tsdf), weight); }
62 return __half2float (value.x);
90 template<
typename T>
__kf_device__ static void StCs(
const T& val, T *ptr);
99 #if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 200 101 #if defined(_WIN64) || defined(__LP64__) 102 #define _ASM_PTR_ "l" 104 #define _ASM_PTR_ "r" 110 asm(
"ld.global.cs.v2.u16 {%0, %1}, [%2];" :
"=h"(
reinterpret_cast<ushort&
>(val.x)),
"=h"(
reinterpret_cast<ushort&
>(val.y)) : _ASM_PTR_(ptr));
116 short cx = val.x, cy = val.y;
117 asm(
"st.global.cs.v2.u16 [%0], {%1, %2};" : : _ASM_PTR_(ptr),
"h"(
reinterpret_cast<ushort&
>(cx)),
"h"(
reinterpret_cast<ushort&
>(cy)));
__kf_device__ ushort2 pack_tsdf(float tsdf, int weight)
packing/unpacking tsdf volume element
__kf_device__ elem_type * multzstep(int mult, elem_type *const ptr) const
static __kf_device__ void StCs(const T &val, T *ptr)
static __kf_device__ T LdCs(T *ptr)
__kf_device__ float dot(const float3 &v1, const float3 &v2)
__kf_device__ Vec3f tr(const float4 &v)
__kf_device__ elem_type * zstep(elem_type *const ptr) const
__kf_device__ elem_type * operator()(int x, int y, int z)
TsdfVolume.
__kf_device__ float3 operator()(int x, int y, float z) const
Reprojector.
__kf_device__ float unpack_tsdf(ushort2 value, int &weight)
__kf_device__ float2 operator()(const float3 &p) const
Projector.
__kf_device__ Vec3f operator*(const Mat3f &m, const Vec3f &v)
__kf_device__ elem_type * beg(int x, int y) const