Contents

class

SushiAI::Graph::ArenaSet

Owns one Storage per arena in a plan and hands out views into them.

Declared in
include/SushiAI/graph/arena.hpp

Public member functions

ArenaSet(SushiBLAS::Engine &engine, MemoryPlan plan)

Allocates every arena requested by plan.

Parameters

engine

The engine whose context owns the allocator.

plan

The memory plan to realise.

Exceptions

Error

If an arena allocation fails.

const MemoryPlan & plan() const noexcept

The plan these arenas realise.

bool holds(ValueId id) const noexcept

Whether id's bytes live in one of these arenas.

SushiBLAS::Tensor view(ValueId id, const Shape &shape, DType dtype) const

Returns a tensor view of the slot reserved for id.

Parameters

id

The value to address.

shape

The value extents.

dtype

The element data type.

Returns

A tensor sharing the arena storage at the planned offset.

Exceptions

Error

If id is not packed or size mismatches the slot.

std::size_t arena_count() const noexcept

How many arenas were allocated.

std::size_t bytes() const noexcept

Total bytes across every arena.