Contents

class

SushiBLAS::ScratchPool

Owns the shelf of device scratch blocks that ScratchBuffer leases come from.

Declared in
include/SushiBLAS/engine/scratch_pool.hpp

See also

include/SushiBLAS/engine/README.md

Public member functions

explicit ScratchPool(SushiRuntime::Execution::RuntimeContext &context)

Builds an empty pool over a runtime context.

Parameters

context

Allocates every block; must outlive every ScratchBuffer leased here.

ScratchPool(const ScratchPool &)=delete
ScratchPool & operator=(const ScratchPool &)=delete
ScratchPool(ScratchPool &&)=delete
ScratchPool & operator=(ScratchPool &&)=delete
~ScratchPool()=default
const SushiRuntime::sushi_ptr< Detail::ScratchShelf > & shelf() const noexcept

Returns the shelf ScratchBuffer takes blocks from; never null.

std::size_t idle_block_count() const

Returns how many blocks sit idle in the pool.

void trim()

Frees every idle block; blocks out on lease are not touched.