supereight
Public Types | Public Member Functions | Public Attributes | List of all members
se::BoostMemoryPool< NodeT, BlockT > Class Template Reference

#include <memory_pool.hpp>

Public Types

typedef NodeT::DataType DataType
 

Public Member Functions

 BoostMemoryPool ()
 
NodeT * allocateNode (const Eigen::Vector3i &node_coord, const unsigned int node_size)
 Allocate a node using its coordinates and size. More...
 
NodeT * allocateNode (NodeT *parent_ptr, const int child_idx, const DataType init_data)
 Allocate a node using its parent and child index. More...
 
BlockT * allocateBlock (NodeT *parent_ptr, const int child_idx, const DataType init_data)
 Allocate a block using its parent and child index. More...
 
void deleteNode (NodeT *node_ptr)
 Delete a given node. More...
 
void deleteBlock (BlockT *block_ptr)
 Delete a given block. More...
 

Public Attributes

boost::pool node_buffer_
 The node buffer. More...
 
boost::pool block_buffer_
 The block buffer. More...
 

Member Typedef Documentation

◆ DataType

template<typename NodeT, typename BlockT>
typedef NodeT::DataType se::BoostMemoryPool< NodeT, BlockT >::DataType

Constructor & Destructor Documentation

◆ BoostMemoryPool()

template<typename NodeT, typename BlockT>
se::BoostMemoryPool< NodeT, BlockT >::BoostMemoryPool ( )
inline

Member Function Documentation

◆ allocateNode() [1/2]

template<typename NodeT, typename BlockT>
NodeT* se::BoostMemoryPool< NodeT, BlockT >::allocateNode ( const Eigen::Vector3i &  node_coord,
const unsigned int  node_size 
)
inline

Allocate a node using its coordinates and size.

Warning
Should only be used for the root.

◆ allocateNode() [2/2]

template<typename NodeT, typename BlockT>
NodeT* se::BoostMemoryPool< NodeT, BlockT >::allocateNode ( NodeT *  parent_ptr,
const int  child_idx,
const DataType  init_data 
)
inline

Allocate a node using its parent and child index.

Parameters
[in]parent_ptrThe pointer to the parent node
[in]child_idxThe index of the child to be allocated
[in]init_dataThe data to initialise the child node with
Returns
The pointer to the child node.

◆ allocateBlock()

template<typename NodeT, typename BlockT>
BlockT* se::BoostMemoryPool< NodeT, BlockT >::allocateBlock ( NodeT *  parent_ptr,
const int  child_idx,
const DataType  init_data 
)
inline

Allocate a block using its parent and child index.

Parameters
[in]parent_ptrThe pointer to the parent node
[in]child_idxThe index of the child to be allocated
[in]init_dataThe data to initialise the child node with
Returns
The pointer to the child block.

◆ deleteNode()

template<typename NodeT, typename BlockT>
void se::BoostMemoryPool< NodeT, BlockT >::deleteNode ( NodeT *  node_ptr)
inline

Delete a given node.

◆ deleteBlock()

template<typename NodeT, typename BlockT>
void se::BoostMemoryPool< NodeT, BlockT >::deleteBlock ( BlockT *  block_ptr)
inline

Delete a given block.

Member Data Documentation

◆ node_buffer_

template<typename NodeT, typename BlockT>
boost::pool se::BoostMemoryPool< NodeT, BlockT >::node_buffer_

The node buffer.

◆ block_buffer_

template<typename NodeT, typename BlockT>
boost::pool se::BoostMemoryPool< NodeT, BlockT >::block_buffer_

The block buffer.


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