DeviceStatistics
Interface in Runtime
What a device counts of the arrays it made.
import type { DeviceStatistics } from 'typeshade'import type { DeviceStatistics } from 'typeshade/runtime'
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
Syntax
interface DeviceStatistics { readonly live: number; readonly liveBytes: number; readonly pooledBytes: number; readonly allocations: number; readonly reuses: number; readonly uploadBytes: number; readonly readBytes: number; readonly variants: Readonly<Record<string, 'tree' | 'subgroup'>>;}Description
The bytes are those of typed arrays.
Instance properties
liveread onlynumberThe arrays the device made and has not freed, the pooled ones among them.
liveBytesread onlynumberpooledBytesread onlynumberThe bytes of the released arrays kept for reuse.
allocationsread onlynumberHow many arrays
array()made new.reusesread onlynumberHow many arrays
array()took from the pool instead.uploadBytesread onlynumberThe bytes of the values
array(value)was given.readBytesread onlynumberThe bytes
read()of the device’s arrays returned.variantsread onlyReadonly<Record<string, 'tree' | 'subgroup'>>The text the last kernel call of each function dispatched on WebGPU (change 0119), by the function’s name:
'subgroup'for the subgroup variant,'tree'for the function’s own. A function whose face has no variant, and every call on another tier, is'tree'.
Source
src/runtime/device.ts, line 111, at commit af54ddad5