Skip to documentation
SLOP

tiny.accy.executable.composition.element

Reference tiny.accy executable composition element

Defined in executable.composition.

API (2)

Actions

Public operations.

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

Source

Called byCallsNo direct callstest sourcelib.accy.src.executable.composition.elementtest: Accy and composition element ty...executable.composition.elementdtype
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest sourcelib.accy.src.executable.composition.elementtest: Accy and composition element ty...executable.composition.elementelementType
Static calls · unresolved targets: 0 · external targets: 0.

Source: lib/accy/src/executable/composition/element.zig

zig
const std = @import("std");const choir_abi = @import("choir_abi");const choir = @import("choir");const accy_root = @import("../../root.zig");pub fn elementType(value: choir_abi.DType) choir.composition.ElementType {    return switch (value) {        .i1 => .i1,        .i8 => .i8,        .i16 => .i16,        .i32 => .i32,        .i64 => .i64,        .u8 => .u8,        .u16 => .u16,        .u32 => .u32,        .u64 => .u64,        .f16 => .f16,        .bf16 => .bf16,        .f32 => .f32,        .f64 => .f64,        .key => .key,    };}pub fn dtype(element_type: choir.composition.ElementType) choir_abi.DType {    return switch (element_type) {        .i1 => .i1,        .i8 => .i8,        .i16 => .i16,        .i32 => .i32,        .i64 => .i64,        .u8 => .u8,        .u16 => .u16,        .u32 => .u32,        .u64 => .u64,        .f16 => .f16,        .bf16 => .bf16,        .f32 => .f32,        .f64 => .f64,        .key => .key,    };}test "Accy and composition element types round-trip" {    inline for (std.meta.tags(choir_abi.DType)) |value| {        try std.testing.expectEqual(value, dtype(elementType(value)));    }}

Source: lib/accy/src/executable/composition/root.zig:3

zig
pub const element = @import("element.zig");

Audit

Definitions3
Public names5
Members0
Version26.7.0
Revisiondaab053ee433