Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::TupleDataAllocator Class Reference
Collaboration diagram for duckdb::TupleDataAllocator:

Public Member Functions

 TupleDataAllocator (BufferManager &buffer_manager, shared_ptr< TupleDataLayout > layout_ptr, MemoryTag tag, shared_ptr< ArenaAllocator > stl_allocator)
 
 TupleDataAllocator (TupleDataAllocator &allocator)
 
BufferManagerGetBufferManager ()
 Get the buffer manager.
 
AllocatorGetAllocator ()
 Get the buffer allocator.
 
ArenaAllocatorGetStlAllocator ()
 Get the STL allocator.
 
shared_ptr< TupleDataLayoutGetLayoutPtr () const
 Get the layout.
 
const TupleDataLayoutGetLayout () const
 
idx_t RowBlockCount () const
 Number of row blocks.
 
idx_t HeapBlockCount () const
 Number of heap blocks.
 
void SetPartitionIndex (idx_t index)
 Sets the partition index of this tuple data allocator.
 
void Build (TupleDataSegment &segment, TupleDataPinState &pin_state, TupleDataChunkState &chunk_state, const idx_t append_offset, const idx_t append_count)
 Builds out the chunks for next append, given the metadata in the append state.
 
bool BuildFastPath (TupleDataSegment &segment, TupleDataPinState &pin_state, TupleDataChunkState &chunk_state, const idx_t append_offset, const idx_t append_count)
 
void InitializeChunkState (TupleDataSegment &segment, TupleDataPinState &pin_state, TupleDataChunkState &chunk_state, idx_t chunk_idx, bool init_heap, optional_ptr< SortKeyPayloadState > sort_key_payload_state=nullptr)
 Initializes a chunk, making its pointers valid.
 
void ReleaseOrStoreHandles (TupleDataPinState &state, TupleDataSegment &segment, TupleDataChunk &chunk, bool release_heap)
 Releases or stores any handles in the management state that are no longer required.
 
void ReleaseOrStoreHandles (TupleDataPinState &state, TupleDataSegment &segment)
 Releases or stores ALL handles in the management state.
 
void SetDestroyBufferUponUnpin ()
 Sets 'can_destroy' to true for all blocks so they aren't added to the eviction queue.
 
void DestroyRowBlocks (idx_t row_block_begin, idx_t row_block_end)
 Destroy the blocks between the given indices.
 
void DestroyHeapBlocks (idx_t heap_block_begin, idx_t heap_block_end)
 

Static Public Member Functions

static void RecomputeHeapPointers (Vector &old_heap_ptrs, const SelectionVector &old_heap_sel, const data_ptr_t row_locations[], Vector &new_heap_ptrs, const idx_t offset, const idx_t count, const TupleDataLayout &layout, const idx_t base_col_offset)
 
static void FindHeapPointers (TupleDataChunkState &chunk_state, SelectionVector &not_found, idx_t &not_found_count, const TupleDataLayout &layout, const idx_t base_col_offset)
 

Private Member Functions

unsafe_arena_ptr< TupleDataChunkPartBuildChunkPart (TupleDataSegment &segment, TupleDataPinState &pin_state, TupleDataChunkState &chunk_state, const idx_t append_offset, const idx_t append_count, TupleDataChunk &chunk)
 Builds out a single part (grabs the lock)
 
void InitializeChunkStateInternal (TupleDataPinState &pin_state, TupleDataChunkState &chunk_state, idx_t offset, bool recompute, bool init_heap_pointers, bool init_heap_sizes, unsafe_vector< reference< TupleDataChunkPart > > &parts, optional_ptr< SortKeyPayloadState > sort_key_payload_state=nullptr)
 Internal function for InitializeChunkState.
 
void CreateRowBlock (TupleDataSegment &segment)
 Create a row/heap block, extend the pinned handles in the segment accordingly.
 
void CreateHeapBlock (TupleDataSegment &segment, idx_t size)
 
BufferHandlePinRowBlock (TupleDataPinState &state, const TupleDataChunkPart &part)
 Pins the given row block.
 
BufferHandlePinHeapBlock (TupleDataPinState &state, const TupleDataChunkPart &part)
 Pins the given heap block.
 
data_ptr_t GetRowPointer (TupleDataPinState &state, const TupleDataChunkPart &part)
 Gets the pointer to the rows for the given chunk part.
 
data_ptr_t GetBaseHeapPointer (TupleDataPinState &state, const TupleDataChunkPart &part)
 Gets the base pointer to the heap for the given chunk part.
 

Static Private Member Functions

static void ReleaseOrStoreHandlesInternal (TupleDataSegment &segment, unsafe_arena_vector< BufferHandle > &pinned_row_handles, buffer_handle_map_t &handles, const ContinuousIdSet &block_ids, unsafe_arena_vector< TupleDataBlock > &blocks, TupleDataPinProperties properties)
 Internal function for ReleaseOrStoreHandles.
 

Private Attributes

shared_ptr< ArenaAllocatorstl_allocator
 Shared allocator for STL allocations.
 
BufferManagerbuffer_manager
 The buffer manager.
 
shared_ptr< TupleDataLayoutlayout_ptr
 The layout of the data.
 
const TupleDataLayoutlayout
 
const MemoryTag tag
 Memory tag (for keeping track what the allocated memory belongs to)
 
optional_idx partition_index
 Partition index (optional, if partitioned)
 
unsafe_arena_vector< TupleDataBlockrow_blocks
 Blocks storing the fixed-size rows.
 
unsafe_arena_vector< TupleDataBlockheap_blocks
 Blocks storing the variable-size data of the fixed-size rows (e.g., string, list)
 

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