7#ifndef SE_NULL_MEMORY_POOL_HPP
8#define SE_NULL_MEMORY_POOL_HPP
20template<
typename NodeT,
typename BlockT>
25 for (
NodeT*
const p : node_buffer_) {
28 for (
BlockT*
const p : block_buffer_) {
35 auto [
it,
_] = node_buffer_.emplace(
new NodeT(coord, size,
typename NodeT::DataType()));
41 const typename NodeT::DataType&
init_data)
49 const typename BlockT::DataType&
init_data)
68 std::set<NodeT*> node_buffer_;
69 std::set<BlockT*> block_buffer_;
An alternate implementation of se::MemoryPool that can help debug certain memory-related bugs.
Definition null_memory_pool.hpp:21
BlockT * allocateBlock(NodeT *const parent_ptr, const int child_idx, const typename BlockT::DataType &init_data)
Definition null_memory_pool.hpp:47
NodeT * allocateRoot(const Eigen::Vector3i &coord, const int size)
Definition null_memory_pool.hpp:33
void deleteBlock(BlockT *const block_ptr)
Definition null_memory_pool.hpp:61
NodeT * allocateNode(NodeT *const parent_ptr, const int child_idx, const typename NodeT::DataType &init_data)
Definition null_memory_pool.hpp:39
void deleteNode(NodeT *const node_ptr)
Definition null_memory_pool.hpp:55
~NullMemoryPool()
Definition null_memory_pool.hpp:23
Helper wrapper to allocate and de-allocate octants in the octree.
Definition bounded_vector.hpp:14