Shortcuts

Struct GpuHeapArena

Struct Documentation

struct ripple::GpuHeapArena

Defines a heap-based arena for the gpu.

Public Types

using Ptr = void*

Pointer type.

using ConstPtr = void*

Const pointer type.

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.

Public Static Attributes

constexpr bool constexpr_size = false

Returns that the allocator does not have a constexpr size.

constexpr bool valid_on_device = true

Returns that the arena is not valid on the device.

constexpr bool valid_on_host = false

Returns that the arena is valid on the host.

Docs

Access comprehensive developer documentation for Ripple

View Docs

Tutorials

Get tutorials to help with understand all features

View Tutorials

Examples

Find examples to help get started

View Examples