UFO 1.0.0
An Efficient Probabilistic 3D Mapping Framework That Embraces the Unknown
Loading...
Searching...
No Matches
ufo::TreeData< Derived, Dim, Ts > Class Template Reference
Inheritance diagram for ufo::TreeData< Derived, Dim, Ts >:
ufo::Tree< Map< Dim, Maps... >, Dim, Maps::Block... > ufo::Tree< TreeMap< Dim, T >, Dim, TreeMapBlock< T > > ufo::Tree< TreeMap< Dim, node_t >, Dim, TreeMapBlock< node_t > > ufo::Map< ufo::OccupancyMap, ufo::ColorMap > ufo::Map< Dim, Maps > ufo::TreeMap< Dim, T > ufo::detail::MapHelper< Map >

Public Types

using Index = TreeIndex
 
using InnerData = TreeContainer< typename Ts::template InnerBlock< Dim, BF >... >
 
using LeafData = TreeContainer< typename Ts::template LeafBlock< Dim, BF >... >
 
using pos_type = Index::pos_type
 

Public Member Functions

bool exists (pos_type block) const
 Checks if a block exists.
 
WGPUDevice gpuDevice () const
 
bool gpuInit (WGPUAdapter adapter)
 
bool gpuInit (WGPUAdapter adapter, WGPULimits const &required_limits)
 
bool gpuInit (WGPUDevice device)
 
bool gpuInit (WGPULimits const &required_limits, WGPUSurface compatible_surface=nullptr, WGPUPowerPreference power_preference=WGPUPowerPreference_HighPerformance, WGPUBackendType backend_type=WGPUBackendType_Undefined)
 
bool gpuInit (WGPUPowerPreference power_preference=WGPUPowerPreference_HighPerformance, WGPUBackendType backend_type=WGPUBackendType_Undefined)
 
template<class T >
WGPUBuffer gpuInnerBuffer (std::size_t index) const
 
template<class T >
std::size_t gpuInnerBufferSize (std::size_t index) const
 
template<class T >
WGPUBuffer gpuLeafBuffer (std::size_t index) const
 
template<class T >
std::size_t gpuLeafBufferSize (std::size_t index) const
 
template<class T >
std::size_t gpuNumBuffers () const
 
template<class T >
std::size_t gpuNumInnerBuffers () const
 
template<class T >
std::size_t gpuNumLeafBuffers () const
 
WGPUQueue gpuQueue () const
 
void gpuRead ()
 
template<class T >
void gpuRead ()
 
void gpuReadInner ()
 
template<class T >
void gpuReadInner ()
 
void gpuReadLeaf ()
 
template<class T >
void gpuReadLeaf ()
 
void gpuRelease ()
 
bool gpuWrite ()
 
template<class T >
bool gpuWrite ()
 
bool gpuWriteInner ()
 
template<class T >
bool gpuWriteInner ()
 
bool gpuWriteLeaf ()
 
template<class T >
bool gpuWriteLeaf ()
 
InnerDatainnerData ()
 
InnerData const & innerData () const
 
bool innerExists (pos_type block) const
 
LeafDataleafData ()
 
LeafData const & leafData () const
 
bool leafExists (pos_type block) const
 

Static Public Attributes

static constexpr TreeIndex::offset_type const BF = ipow(std::size_t(2), Dim)
 
static constexpr std::size_t const NumBuffers = sizeof...(Ts)
 

Protected Member Functions

void clear ()
 
pos_type create (bool leaf)
 
pos_type createThreadSafe (bool leaf)
 
void erase (pos_type block)
 
template<class T >
T & innerBlock (pos_type block)
 
template<class T >
T const & innerBlock (pos_type block) const
 
void innerClear ()
 
pos_type innerCreate ()
 
pos_type innerCreateThreadSafe ()
 
void innerErase (pos_type block)
 
void innerReserve (std::size_t cap)
 
std::size_t innerSize () const
 
template<class T >
T & leafBlock (pos_type block)
 
template<class T >
T const & leafBlock (pos_type block) const
 
void leafClear ()
 
pos_type leafCreate ()
 
pos_type leafCreateThreadSafe ()
 
void leafErase (pos_type block)
 
void leafReserve (std::size_t cap)
 
std::size_t leafSize () const
 
void reserve (std::size_t cap)
 
std::size_t size () const
 

Static Protected Member Functions

static constexpr pos_type addInnerType (pos_type block) noexcept
 
static constexpr pos_type addLeafType (pos_type block) noexcept
 
static constexpr bool inner (pos_type block) noexcept
 
static constexpr bool leaf (pos_type block) noexcept
 
static constexpr pos_type removeInnerType (pos_type block) noexcept
 
static constexpr pos_type removeLeafType (pos_type block) noexcept
 

Protected Attributes

WGPUAdapter adapter_ = nullptr
 
WGPUDevice device_ = nullptr
 
std::array< std::vector< WGPUBuffer >, NumBuffers > inner_buffers_ {}
 
InnerData inner_data_
 
WGPUInstance instance_ = nullptr
 
std::array< std::vector< WGPUBuffer >, NumBuffers > leaf_buffers_ {}
 
LeafData leaf_data_
 
std::size_t max_buffer_size_ = 1'073'741'824 / 2
 
WGPUQueue queue_ = nullptr
 

Detailed Description

template<class Derived, std::size_t Dim, class... Ts>
class ufo::TreeData< Derived, Dim, Ts >

Definition at line 60 of file data.hpp.

Member Typedef Documentation

◆ Index

template<class Derived , std::size_t Dim, class... Ts>
using ufo::TreeData< Derived, Dim, Ts >::Index = TreeIndex

Definition at line 70 of file data.hpp.

◆ InnerData

template<class Derived , std::size_t Dim, class... Ts>
using ufo::TreeData< Derived, Dim, Ts >::InnerData = TreeContainer<typename Ts::template InnerBlock<Dim, BF>...>

Definition at line 68 of file data.hpp.

◆ LeafData

template<class Derived , std::size_t Dim, class... Ts>
using ufo::TreeData< Derived, Dim, Ts >::LeafData = TreeContainer<typename Ts::template LeafBlock<Dim, BF>...>

Definition at line 67 of file data.hpp.

◆ pos_type

template<class Derived , std::size_t Dim, class... Ts>
using ufo::TreeData< Derived, Dim, Ts >::pos_type = Index::pos_type

Definition at line 71 of file data.hpp.

Constructor & Destructor Documentation

◆ ~TreeData()

template<class Derived , std::size_t Dim, class... Ts>
ufo::TreeData< Derived, Dim, Ts >::~TreeData ( )
inline

Definition at line 76 of file data.hpp.

Member Function Documentation

◆ addInnerType()

template<class Derived , std::size_t Dim, class... Ts>
static constexpr pos_type ufo::TreeData< Derived, Dim, Ts >::addInnerType ( pos_type  block)
inlinestaticconstexprprotectednoexcept

Definition at line 515 of file data.hpp.

◆ addLeafType()

template<class Derived , std::size_t Dim, class... Ts>
static constexpr pos_type ufo::TreeData< Derived, Dim, Ts >::addLeafType ( pos_type  block)
inlinestaticconstexprprotectednoexcept

Definition at line 505 of file data.hpp.

◆ clear()

template<class Derived , std::size_t Dim, class... Ts>
void ufo::TreeData< Derived, Dim, Ts >::clear ( )
inlineprotected

Definition at line 541 of file data.hpp.

◆ create()

template<class Derived , std::size_t Dim, class... Ts>
pos_type ufo::TreeData< Derived, Dim, Ts >::create ( bool  leaf)
inlineprotected

Definition at line 551 of file data.hpp.

◆ createThreadSafe()

template<class Derived , std::size_t Dim, class... Ts>
pos_type ufo::TreeData< Derived, Dim, Ts >::createThreadSafe ( bool  leaf)
inlineprotected

Definition at line 557 of file data.hpp.

◆ erase()

template<class Derived , std::size_t Dim, class... Ts>
void ufo::TreeData< Derived, Dim, Ts >::erase ( pos_type  block)
inlineprotected

Definition at line 572 of file data.hpp.

◆ exists()

template<class Derived , std::size_t Dim, class... Ts>
bool ufo::TreeData< Derived, Dim, Ts >::exists ( pos_type  block) const
inline

Checks if a block exists.

Parameters
blockthe block to check
Returns
true if the block exists, false otherwise.

Definition at line 92 of file data.hpp.

◆ gpuDevice()

template<class Derived , std::size_t Dim, class... Ts>
WGPUDevice ufo::TreeData< Derived, Dim, Ts >::gpuDevice ( ) const
inline

Definition at line 226 of file data.hpp.

◆ gpuInit() [1/5]

template<class Derived , std::size_t Dim, class... Ts>
bool ufo::TreeData< Derived, Dim, Ts >::gpuInit ( WGPUAdapter  adapter)
inline

Definition at line 143 of file data.hpp.

◆ gpuInit() [2/5]

template<class Derived , std::size_t Dim, class... Ts>
bool ufo::TreeData< Derived, Dim, Ts >::gpuInit ( WGPUAdapter  adapter,
WGPULimits const &  required_limits 
)
inline

Definition at line 150 of file data.hpp.

◆ gpuInit() [3/5]

template<class Derived , std::size_t Dim, class... Ts>
bool ufo::TreeData< Derived, Dim, Ts >::gpuInit ( WGPUDevice  device)
inline

Definition at line 168 of file data.hpp.

◆ gpuInit() [4/5]

template<class Derived , std::size_t Dim, class... Ts>
bool ufo::TreeData< Derived, Dim, Ts >::gpuInit ( WGPULimits const &  required_limits,
WGPUSurface  compatible_surface = nullptr,
WGPUPowerPreference  power_preference = WGPUPowerPreference_HighPerformance,
WGPUBackendType  backend_type = WGPUBackendType_Undefined 
)
inline

Definition at line 125 of file data.hpp.

◆ gpuInit() [5/5]

template<class Derived , std::size_t Dim, class... Ts>
bool ufo::TreeData< Derived, Dim, Ts >::gpuInit ( WGPUPowerPreference  power_preference = WGPUPowerPreference_HighPerformance,
WGPUBackendType  backend_type = WGPUBackendType_Undefined 
)
inline

Definition at line 109 of file data.hpp.

◆ gpuInnerBuffer()

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
WGPUBuffer ufo::TreeData< Derived, Dim, Ts >::gpuInnerBuffer ( std::size_t  index) const
inline

Definition at line 255 of file data.hpp.

◆ gpuInnerBufferSize()

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
std::size_t ufo::TreeData< Derived, Dim, Ts >::gpuInnerBufferSize ( std::size_t  index) const
inline

Definition at line 267 of file data.hpp.

◆ gpuLeafBuffer()

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
WGPUBuffer ufo::TreeData< Derived, Dim, Ts >::gpuLeafBuffer ( std::size_t  index) const
inline

Definition at line 249 of file data.hpp.

◆ gpuLeafBufferSize()

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
std::size_t ufo::TreeData< Derived, Dim, Ts >::gpuLeafBufferSize ( std::size_t  index) const
inline

Definition at line 261 of file data.hpp.

◆ gpuNumBuffers()

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
std::size_t ufo::TreeData< Derived, Dim, Ts >::gpuNumBuffers ( ) const
inline

Definition at line 231 of file data.hpp.

◆ gpuNumInnerBuffers()

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
std::size_t ufo::TreeData< Derived, Dim, Ts >::gpuNumInnerBuffers ( ) const
inline

Definition at line 243 of file data.hpp.

◆ gpuNumLeafBuffers()

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
std::size_t ufo::TreeData< Derived, Dim, Ts >::gpuNumLeafBuffers ( ) const
inline

Definition at line 237 of file data.hpp.

◆ gpuQueue()

template<class Derived , std::size_t Dim, class... Ts>
WGPUQueue ufo::TreeData< Derived, Dim, Ts >::gpuQueue ( ) const
inline

Definition at line 228 of file data.hpp.

◆ gpuRead() [1/2]

template<class Derived , std::size_t Dim, class... Ts>
void ufo::TreeData< Derived, Dim, Ts >::gpuRead ( )
inline

Definition at line 272 of file data.hpp.

◆ gpuRead() [2/2]

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
void ufo::TreeData< Derived, Dim, Ts >::gpuRead ( )
inline

Definition at line 283 of file data.hpp.

◆ gpuReadInner() [1/2]

template<class Derived , std::size_t Dim, class... Ts>
void ufo::TreeData< Derived, Dim, Ts >::gpuReadInner ( )
inline

Definition at line 280 of file data.hpp.

◆ gpuReadInner() [2/2]

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
void ufo::TreeData< Derived, Dim, Ts >::gpuReadInner ( )
inline

Definition at line 296 of file data.hpp.

◆ gpuReadLeaf() [1/2]

template<class Derived , std::size_t Dim, class... Ts>
void ufo::TreeData< Derived, Dim, Ts >::gpuReadLeaf ( )
inline

Definition at line 278 of file data.hpp.

◆ gpuReadLeaf() [2/2]

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
void ufo::TreeData< Derived, Dim, Ts >::gpuReadLeaf ( )
inline

Definition at line 290 of file data.hpp.

◆ gpuRelease()

template<class Derived , std::size_t Dim, class... Ts>
void ufo::TreeData< Derived, Dim, Ts >::gpuRelease ( )
inline

Definition at line 185 of file data.hpp.

◆ gpuWrite() [1/2]

template<class Derived , std::size_t Dim, class... Ts>
bool ufo::TreeData< Derived, Dim, Ts >::gpuWrite ( )
inline

Definition at line 301 of file data.hpp.

◆ gpuWrite() [2/2]

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
bool ufo::TreeData< Derived, Dim, Ts >::gpuWrite ( )
inline

Definition at line 313 of file data.hpp.

◆ gpuWriteInner() [1/2]

template<class Derived , std::size_t Dim, class... Ts>
bool ufo::TreeData< Derived, Dim, Ts >::gpuWriteInner ( )
inline

Definition at line 310 of file data.hpp.

◆ gpuWriteInner() [2/2]

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
bool ufo::TreeData< Derived, Dim, Ts >::gpuWriteInner ( )
inline

Definition at line 408 of file data.hpp.

◆ gpuWriteLeaf() [1/2]

template<class Derived , std::size_t Dim, class... Ts>
bool ufo::TreeData< Derived, Dim, Ts >::gpuWriteLeaf ( )
inline

Definition at line 308 of file data.hpp.

◆ gpuWriteLeaf() [2/2]

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
bool ufo::TreeData< Derived, Dim, Ts >::gpuWriteLeaf ( )
inline

Definition at line 321 of file data.hpp.

◆ inner()

template<class Derived , std::size_t Dim, class... Ts>
static constexpr bool ufo::TreeData< Derived, Dim, Ts >::inner ( pos_type  block)
inlinestaticconstexprprotectednoexcept

Definition at line 500 of file data.hpp.

◆ innerBlock() [1/2]

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
T & ufo::TreeData< Derived, Dim, Ts >::innerBlock ( pos_type  block)
inlineprotected

Definition at line 592 of file data.hpp.

◆ innerBlock() [2/2]

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
T const & ufo::TreeData< Derived, Dim, Ts >::innerBlock ( pos_type  block) const
inlineprotected

Definition at line 599 of file data.hpp.

◆ innerClear()

template<class Derived , std::size_t Dim, class... Ts>
void ufo::TreeData< Derived, Dim, Ts >::innerClear ( )
inlineprotected

Definition at line 549 of file data.hpp.

◆ innerCreate()

template<class Derived , std::size_t Dim, class... Ts>
pos_type ufo::TreeData< Derived, Dim, Ts >::innerCreate ( )
inlineprotected

Definition at line 555 of file data.hpp.

◆ innerCreateThreadSafe()

template<class Derived , std::size_t Dim, class... Ts>
pos_type ufo::TreeData< Derived, Dim, Ts >::innerCreateThreadSafe ( )
inlineprotected

Definition at line 567 of file data.hpp.

◆ innerData() [1/2]

template<class Derived , std::size_t Dim, class... Ts>
InnerData & ufo::TreeData< Derived, Dim, Ts >::innerData ( )
inline

Definition at line 82 of file data.hpp.

◆ innerData() [2/2]

template<class Derived , std::size_t Dim, class... Ts>
InnerData const & ufo::TreeData< Derived, Dim, Ts >::innerData ( ) const
inline

Definition at line 84 of file data.hpp.

◆ innerErase()

template<class Derived , std::size_t Dim, class... Ts>
void ufo::TreeData< Derived, Dim, Ts >::innerErase ( pos_type  block)
inlineprotected

Definition at line 576 of file data.hpp.

◆ innerExists()

template<class Derived , std::size_t Dim, class... Ts>
bool ufo::TreeData< Derived, Dim, Ts >::innerExists ( pos_type  block) const
inline

Definition at line 103 of file data.hpp.

◆ innerReserve()

template<class Derived , std::size_t Dim, class... Ts>
void ufo::TreeData< Derived, Dim, Ts >::innerReserve ( std::size_t  cap)
inlineprotected

Definition at line 539 of file data.hpp.

◆ innerSize()

template<class Derived , std::size_t Dim, class... Ts>
std::size_t ufo::TreeData< Derived, Dim, Ts >::innerSize ( ) const
inlineprotected

Definition at line 529 of file data.hpp.

◆ leaf()

template<class Derived , std::size_t Dim, class... Ts>
static constexpr bool ufo::TreeData< Derived, Dim, Ts >::leaf ( pos_type  block)
inlinestaticconstexprprotectednoexcept

Definition at line 495 of file data.hpp.

◆ leafBlock() [1/2]

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
T & ufo::TreeData< Derived, Dim, Ts >::leafBlock ( pos_type  block)
inlineprotected

Definition at line 579 of file data.hpp.

◆ leafBlock() [2/2]

template<class Derived , std::size_t Dim, class... Ts>
template<class T >
T const & ufo::TreeData< Derived, Dim, Ts >::leafBlock ( pos_type  block) const
inlineprotected

Definition at line 586 of file data.hpp.

◆ leafClear()

template<class Derived , std::size_t Dim, class... Ts>
void ufo::TreeData< Derived, Dim, Ts >::leafClear ( )
inlineprotected

Definition at line 547 of file data.hpp.

◆ leafCreate()

template<class Derived , std::size_t Dim, class... Ts>
pos_type ufo::TreeData< Derived, Dim, Ts >::leafCreate ( )
inlineprotected

Definition at line 553 of file data.hpp.

◆ leafCreateThreadSafe()

template<class Derived , std::size_t Dim, class... Ts>
pos_type ufo::TreeData< Derived, Dim, Ts >::leafCreateThreadSafe ( )
inlineprotected

Definition at line 562 of file data.hpp.

◆ leafData() [1/2]

template<class Derived , std::size_t Dim, class... Ts>
LeafData & ufo::TreeData< Derived, Dim, Ts >::leafData ( )
inline

Definition at line 78 of file data.hpp.

◆ leafData() [2/2]

template<class Derived , std::size_t Dim, class... Ts>
LeafData const & ufo::TreeData< Derived, Dim, Ts >::leafData ( ) const
inline

Definition at line 80 of file data.hpp.

◆ leafErase()

template<class Derived , std::size_t Dim, class... Ts>
void ufo::TreeData< Derived, Dim, Ts >::leafErase ( pos_type  block)
inlineprotected

Definition at line 574 of file data.hpp.

◆ leafExists()

template<class Derived , std::size_t Dim, class... Ts>
bool ufo::TreeData< Derived, Dim, Ts >::leafExists ( pos_type  block) const
inline

Definition at line 97 of file data.hpp.

◆ leafReserve()

template<class Derived , std::size_t Dim, class... Ts>
void ufo::TreeData< Derived, Dim, Ts >::leafReserve ( std::size_t  cap)
inlineprotected

Definition at line 537 of file data.hpp.

◆ leafSize()

template<class Derived , std::size_t Dim, class... Ts>
std::size_t ufo::TreeData< Derived, Dim, Ts >::leafSize ( ) const
inlineprotected

Definition at line 527 of file data.hpp.

◆ removeInnerType()

template<class Derived , std::size_t Dim, class... Ts>
static constexpr pos_type ufo::TreeData< Derived, Dim, Ts >::removeInnerType ( pos_type  block)
inlinestaticconstexprprotectednoexcept

Definition at line 520 of file data.hpp.

◆ removeLeafType()

template<class Derived , std::size_t Dim, class... Ts>
static constexpr pos_type ufo::TreeData< Derived, Dim, Ts >::removeLeafType ( pos_type  block)
inlinestaticconstexprprotectednoexcept

Definition at line 510 of file data.hpp.

◆ reserve()

template<class Derived , std::size_t Dim, class... Ts>
void ufo::TreeData< Derived, Dim, Ts >::reserve ( std::size_t  cap)
inlineprotected

Definition at line 531 of file data.hpp.

◆ size()

template<class Derived , std::size_t Dim, class... Ts>
std::size_t ufo::TreeData< Derived, Dim, Ts >::size ( ) const
inlineprotected

Definition at line 525 of file data.hpp.

Member Data Documentation

◆ adapter_

template<class Derived , std::size_t Dim, class... Ts>
WGPUAdapter ufo::TreeData< Derived, Dim, Ts >::adapter_ = nullptr
protected

Definition at line 644 of file data.hpp.

◆ BF

template<class Derived , std::size_t Dim, class... Ts>
constexpr TreeIndex::offset_type const ufo::TreeData< Derived, Dim, Ts >::BF = ipow(std::size_t(2), Dim)
staticconstexpr

Definition at line 65 of file data.hpp.

◆ device_

template<class Derived , std::size_t Dim, class... Ts>
WGPUDevice ufo::TreeData< Derived, Dim, Ts >::device_ = nullptr
protected

Definition at line 645 of file data.hpp.

◆ inner_buffers_

template<class Derived , std::size_t Dim, class... Ts>
std::array<std::vector<WGPUBuffer>, NumBuffers> ufo::TreeData< Derived, Dim, Ts >::inner_buffers_ {}
protected

Definition at line 648 of file data.hpp.

◆ inner_data_

template<class Derived , std::size_t Dim, class... Ts>
InnerData ufo::TreeData< Derived, Dim, Ts >::inner_data_
protected

Definition at line 641 of file data.hpp.

◆ instance_

template<class Derived , std::size_t Dim, class... Ts>
WGPUInstance ufo::TreeData< Derived, Dim, Ts >::instance_ = nullptr
protected

Definition at line 643 of file data.hpp.

◆ leaf_buffers_

template<class Derived , std::size_t Dim, class... Ts>
std::array<std::vector<WGPUBuffer>, NumBuffers> ufo::TreeData< Derived, Dim, Ts >::leaf_buffers_ {}
protected

Definition at line 647 of file data.hpp.

◆ leaf_data_

template<class Derived , std::size_t Dim, class... Ts>
LeafData ufo::TreeData< Derived, Dim, Ts >::leaf_data_
protected

Definition at line 640 of file data.hpp.

◆ max_buffer_size_

template<class Derived , std::size_t Dim, class... Ts>
std::size_t ufo::TreeData< Derived, Dim, Ts >::max_buffer_size_ = 1'073'741'824 / 2
protected

Definition at line 650 of file data.hpp.

◆ NumBuffers

template<class Derived , std::size_t Dim, class... Ts>
constexpr std::size_t const ufo::TreeData< Derived, Dim, Ts >::NumBuffers = sizeof...(Ts)
staticconstexpr

Definition at line 73 of file data.hpp.

◆ queue_

template<class Derived , std::size_t Dim, class... Ts>
WGPUQueue ufo::TreeData< Derived, Dim, Ts >::queue_ = nullptr
protected

Definition at line 646 of file data.hpp.


The documentation for this class was generated from the following file: