Blender V5.3
blender::gpu::render_graph::VKNodeStorage< T, BlockSize > Struct Template Reference

#include <vk_render_graph_node.hh>

Public Member Functions

T & alloc (int64_t &r_index)
void reset ()
T & operator[] (int64_t index)
const T & operator[] (int64_t index) const
int64_t size () const
int64_t capacity () const

Public Attributes

Vector< T > data
int64_t next = 0

Detailed Description

template<typename T, int BlockSize = 1024>
struct blender::gpu::render_graph::VKNodeStorage< T, BlockSize >

Block-allocated storage for node data.

Uses an index counter (next) instead of clear + append. On reset, only the counter resets to 0 (memory is preserved and reused). When storage is full, grows by 1024-element blocks.

Definition at line 50 of file vk_render_graph_node.hh.

Member Function Documentation

◆ alloc()

template<typename T, int BlockSize = 1024>
T & blender::gpu::render_graph::VKNodeStorage< T, BlockSize >::alloc ( int64_t & r_index)
inline

Definition at line 54 of file vk_render_graph_node.hh.

References data, next, and T.

◆ capacity()

template<typename T, int BlockSize = 1024>
int64_t blender::gpu::render_graph::VKNodeStorage< T, BlockSize >::capacity ( ) const
inline

Definition at line 84 of file vk_render_graph_node.hh.

References data.

◆ operator[]() [1/2]

template<typename T, int BlockSize = 1024>
T & blender::gpu::render_graph::VKNodeStorage< T, BlockSize >::operator[] ( int64_t index)
inline

Definition at line 69 of file vk_render_graph_node.hh.

References data, and T.

◆ operator[]() [2/2]

template<typename T, int BlockSize = 1024>
const T & blender::gpu::render_graph::VKNodeStorage< T, BlockSize >::operator[] ( int64_t index) const
inline

Definition at line 74 of file vk_render_graph_node.hh.

References data, and T.

◆ reset()

template<typename T, int BlockSize = 1024>
void blender::gpu::render_graph::VKNodeStorage< T, BlockSize >::reset ( )
inline

Definition at line 64 of file vk_render_graph_node.hh.

References next.

Referenced by blender::gpu::render_graph::VKRenderGraphStorage::reset().

◆ size()

template<typename T, int BlockSize = 1024>
int64_t blender::gpu::render_graph::VKNodeStorage< T, BlockSize >::size ( ) const
inline

Definition at line 79 of file vk_render_graph_node.hh.

References next.

Member Data Documentation

◆ data

template<typename T, int BlockSize = 1024>
Vector<T> blender::gpu::render_graph::VKNodeStorage< T, BlockSize >::data

Definition at line 51 of file vk_render_graph_node.hh.

Referenced by alloc(), capacity(), operator[](), and operator[]().

◆ next

template<typename T, int BlockSize = 1024>
int64_t blender::gpu::render_graph::VKNodeStorage< T, BlockSize >::next = 0

Definition at line 52 of file vk_render_graph_node.hh.

Referenced by alloc(), reset(), and size().


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