FuncDecl¶
- class hugr.ops.FuncDecl(f_name: str, signature: PolyFuncType, num_out: int = 1)[source]¶
Bases:
Op
Function declaration operation, defines the signature of a function.
Methods
Attributes
- port_kind(port: InPort | OutPort) ValueKind | ConstKind | FunctionKind | CFKind | OrderKind [source]¶
Get the kind of the given port.
Example
>>> op = Const(val.TRUE) >>> op.port_kind(OutPort(Node(0), 0)) ConstKind(Bool)
- signature: PolyFuncType¶
polymorphic function signature