Expand description
Signature descriptors for OpDef::signature.
arg and ty_arg are fixed value and type arguments,
var_args and var_ty_args variadic tails, and
call_attrs the type of Call.attrs. A node type accepts an instance of it,
and the typed expressions such as PrimExpr and PrimVar
also check its type; implement ArgType for another check.
Re-exports§
pub use crate::ir::expr::IntExpr;pub use crate::ir::expr::PrimExpr;pub use crate::ir::expr::PrimVar;
Structs§
- Arg
- A descriptor of a required value argument of type
T, made byarg. - Call
Attrs - A descriptor of
Call.attrsof typeT, made bycall_attrs. - TyArg
- A descriptor of a required type argument of type
T, made byty_arg. - VarArgs
- A descriptor of a variadic value tail of type
T, made byvar_args. - VarTy
Args - A descriptor of a variadic type-argument tail of type
T, made byvar_ty_args.
Traits§
- ArgType
- A check of an argument against a type.
- Specs
- The descriptors that
OpDef::signaturetakes: a descriptor, or a tuple of them in order.
Functions§
- arg
- Describe a required value argument
nameof typeT, documented bydoc;Expraccepts any. - call_
attrs - Describe the attributes of a Call:
Call.attrsholds aT, which is also the operator’s attrs type; a signature has at most one. - ty_arg
- Describe a required type argument
nameof typeT, documented bydoc;Typeaccepts any. - var_
args - Describe zero or more further value arguments
nameof typeT, documented bydoc; a signature has at most one variadic value tail. - var_
of_ type - Return whether
valueis aVar, not a subclass, whose type is anN, such asTensorTypeObj: the check of variable argument types such asTensorVar. - var_
ty_ args - Describe zero or more further type arguments
nameof typeT, documented bydoc; a signature has at most one variadic type-argument tail.