Struct GpuHeapArena¶
Defined in File arena.hpp
Struct Documentation¶
-
struct
ripple
::
GpuHeapArena
¶ Defines a heap-based arena for the gpu.
Public Functions
-
GpuHeapArena
(size_t id, size_t size = 0)¶ Initializes the arena with a specific size.
- Parameters
size
: The size of the arena.
-
~GpuHeapArena
() noexcept¶ Destructor to release the memory.
-
GpuHeapArena
(const GpuHeapArena&) = delete¶ Copy constructor deleted.
-
GpuHeapArena
(GpuHeapArena&&) noexcept = default¶ Move constructor defaulted.
-
auto
operator=
(const GpuHeapArena&) = delete¶ Copy assignment operator deleted.
-
auto
operator=
(GpuHeapArena&&) noexcept -> GpuHeapArena& = default¶ Move assignment operator defauled.
-
ripple_nodiscard auto begin () const noexcept -> ConstPtr
Gets a pointer to the beginning of the arena.
- Return
A pointer to the beginning of the arena.
-
ripple_nodiscard auto end () const noexcept -> ConstPtr
Gets a pointer to the end of the arena.
- Return
A pointer to the end of the arena.
-
auto
resize
(size_t new_size) -> void¶ Resizes the area.
- Note
This may be expensive since it needs to copy the already allocated memory in the new space.
- Parameters
size
: The new size of the area.
-
ripple_nodiscard auto size () const noexcept -> size_t
Gets the size of the arena.
- Return
A size of the arena, in bytes.
-