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
contextAllocates every block; must outlive every ScratchBuffer leased here.
ScratchPool(const ScratchPool &)=deleteScratchPool & operator=(const ScratchPool &)=deleteScratchPool(ScratchPool &&)=deleteScratchPool & operator=(ScratchPool &&)=delete~ScratchPool()=defaultconst SushiRuntime::sushi_ptr< Detail::ScratchShelf > & shelf() const noexceptReturns the shelf ScratchBuffer takes blocks from; never null.
std::size_t idle_block_count() constReturns how many blocks sit idle in the pool.
void trim()Frees every idle block; blocks out on lease are not touched.

