Skip to content

bloqade.lanes.dialects.stack_move.HasArity

← Module overview

classHasAritysource

bloqade.lanes.dialects.stack_move.HasArity

Bases: StmtTrait

Marks a statement whose bytecode opcode takes a variable-length arity argument.

class HasArity(n_fixed: int = 0)

arity(stmt) returns len(stmt.args) - n_fixed, where n_fixed is the number of leading scalar (non-variadic) SSA arguments — e.g. 2 for LocalR (axis_angle + rotation_angle), 1 for LocalRz/GetItem, 0 for statements whose only args are the variadic group.

Parameters

NameTypeDefaultDescription
n_fixedint0

Attributes

NameTypeDefaultDescription
n_fixedint0

methodaritysource

bloqade.lanes.dialects.stack_move.HasArity.arity

def arity(stmt: ir.Statement) -> int

Parameters

NameTypeDescription
stmtir.Statement

Returns

int

source