27 #ifndef MPBLOCKS_DUBINS_CURVES_CUDA2_PACKEDINDEX_HPP_
28 #define MPBLOCKS_DUBINS_CURVES_CUDA2_PACKEDINDEX_HPP_
33 namespace curves_cuda {
36 template <
typename Format_t>
44 template <
typename Format_t>
51 template <
typename Format_t>
56 const Storage_t size =
sizeof(Format_t)*8;
61 return (
SolutionId)( m_storage >> (size-field) );
64 template <
typename Format_t>
69 const Storage_t size =
sizeof(Format_t)*8;
73 const Storage_t mask = ~( 0x0F << (size-field) );
75 return (m_storage & mask);
78 template <
typename Format_t>
84 m_storage = (idBits << (
sizeof(Format_t)*8-4) ) | (m_storage & mask);
87 template <
typename Format_t>
94 m_storage = ( idMask & m_storage ) | ( idxMask & idx );
97 template <
typename Format_t>
101 return reinterpret_cast<Format_t&
>(m_storage);
104 template <
typename Format_t>
108 reinterpret_cast<Format_t&
>(m_storage) = bits;
111 template <
typename Format_t>
118 template <
typename Format_t>
146 #endif // PACKEDINDEX_H_
__device__ __host__ Storage_t getIdx() const
__device__ __host__ SolutionId getId() const
__device__ __host__ Format_t & getPun()
__device__ __host__ void setUnsigned(Storage_t bits)
PackedStorage< sizeof(Format_t) >::Result Storage_t
__device__ __host__ void setIdx(Storage_t idx)
__device__ __host__ PackedIndex(Format_t bits)
__device__ __host__ void setId(SolutionId id)
__device__ __host__ Storage_t getUnsigned()
SolutionId
enumerates solution types
__device__ __host__ void setPun(Format_t bits)