import { DType } from './dtype.ts'; import { type Allocator, BufferSpec, type Compiled } from './runtime/allocator.ts'; import { MemoryView } from './helpers/memoryview.ts'; import { type UOp } from './ops.ts'; export * from './runtime/allocator.ts'; export declare class _Device { opened: Map; get DEFAULT(): string; set DEFAULT(dev: string); private _canonicalize; canonicalize: (device?: string) => string; get(device: string): Compiled; default: () => Compiled; } export declare const Device: _Device; export declare const uop_buffer: (uop: UOp) => Buffer; export declare const uop_realized: (uop: UOp) => Buffer | undefined; export declare const uop_is_realized: (uop: UOp) => boolean; export declare class Buffer { device: string; size: number; dtype: DType; options?: BufferSpec | undefined; offset: number; _base?: Buffer; _lb_refcount?: number; _buf?: Buf; allocator?: Allocator; _id: bigint; static register: FinalizationRegistry<{ allocator?: Allocator; _buf: any; options?: BufferSpec; size: number; }>; constructor(device: string, size: number, dtype: DType, opaque?: any, options?: BufferSpec | undefined, initial_value?: MemoryView, lb_refcount?: number, base?: Buffer, offset?: number, preallocate?: boolean); get base(): Buffer; get lb_refcount(): number; ref: (cnt: number) => number; is_allocated: () => boolean; ensure_allocated: () => Buffer; allocate: (opaque?: Buf, external_ptr?: bigint) => Buffer; deallocate: () => void; get nbytes(): number; toString: () => string; as_buffer: (allowZeroCopy?: boolean, forceZeroCopy?: boolean) => Promise; copyin: (mv: MemoryView) => Buf; copyout: (mv: MemoryView) => Promise; view: (size: number, dtype: DType, offset: number) => Buffer; } export declare const is_dtype_supported: (dtype: DType, device?: string) => boolean;