Skip to documentation
SLOP

tiny.choir.ir.interfaces.ShapedTypeInterface

Reference tiny.choir ir interfaces ShapedTypeInterface

Defined in ir.interfaces.

API (6)

Actions

Public operations.

Types and contracts

Public types and contracts.

Values and defaults

Public values and defaults.

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

Source

Source: lib/choir/src/core/interfaces/types.zig:321

zig
pub const ShapedTypeInterface = struct {    pub const interface_name = "ir.interface.shaped_type";    pub const id: InterfaceId = base.interfaceId(interface_name);    pub const VTable = struct {        getRank: *const fn (type_ptr: *const anyopaque, ctx: *const ContextOpaque) ?usize,        getShape: *const fn (type_ptr: *const anyopaque, ctx: *const ContextOpaque) ?[]const u64,        getElementType: *const fn (type_ptr: *const anyopaque, ctx: *const ContextOpaque) ?IrType,        getAddressSpaceTag: *const fn (type_ptr: *const anyopaque, ctx: *const ContextOpaque) ?u8,    };    pub fn entry(vtable: *const VTable) InterfaceEntry {        return .{ .id = id, .vtable = vtable };    }    pub fn vtableFor(        comptime getRank: *const fn (type_ptr: *const anyopaque, ctx: *const ContextOpaque) ?usize,        comptime getShape: *const fn (type_ptr: *const anyopaque, ctx: *const ContextOpaque) ?[]const u64,        comptime getElementType: *const fn (type_ptr: *const anyopaque, ctx: *const ContextOpaque) ?IrType,        comptime getAddressSpaceTag: *const fn (type_ptr: *const anyopaque, ctx: *const ContextOpaque) ?u8,    ) *const VTable {        return &.{            .getRank = getRank,            .getShape = getShape,            .getElementType = getElementType,            .getAddressSpaceTag = getAddressSpaceTag,        };    }    pub fn entryFor(        comptime getRank: *const fn (type_ptr: *const anyopaque, ctx: *const ContextOpaque) ?usize,        comptime getShape: *const fn (type_ptr: *const anyopaque, ctx: *const ContextOpaque) ?[]const u64,        comptime getElementType: *const fn (type_ptr: *const anyopaque, ctx: *const ContextOpaque) ?IrType,        comptime getAddressSpaceTag: *const fn (type_ptr: *const anyopaque, ctx: *const ContextOpaque) ?u8,    ) InterfaceEntry {        return entry(vtableFor(getRank, getShape, getElementType, getAddressSpaceTag));    }};

Source: lib/choir/src/core/interfaces/root.zig:66

zig
pub const ShapedTypeInterface = types.ShapedTypeInterface;

Also reachable as

backends.wasm.emission.module_encoding.common.ir.interfaces.ShapedTypeInterface.

Audit

Definitions7
Public names14
Members4
Version26.7.0
Revisiondaab053ee433