Skip to documentation
SLOP

tiny.gpu.BufferImport

Reference tiny.gpu BufferImport

Defined in contract.

A caller fills this request to let a backend use caller memory as a buffer without copying.

API (4)

Fields and members

Public fields and members.

No direct callersNo direct callscontractBufferImport
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/gpu/src/contract.zig:1709

zig
/// A caller fills this request to let a backend use caller memory as a buffer without copying. The/// request carries the caller's bytes, their alignment, and an optional element type and element/// count. The caller keeps the bytes alive and at the same address until `destroyObject` releases/// the handle the import returned. The backend never frees the bytes, and the CPU backend frees/// nothing when it destroys a borrowed buffer.pub const BufferImport = struct {    bytes: []u8,    alignment: u32 = 1,    dtype: ?DType = null,    element_count: ?u64 = null,};

Source: lib/gpu/src/root.zig:118

zig
pub const BufferImport = contract.BufferImport;

Audit

Definitions1
Public names2
Members4
Version26.7.0
Revisiondaab053ee433