Class kw_only#

Inheritance Relationships#

Base Type#

Class Documentation#

class kw_only : public tvm::ffi::reflection::InfoTrait#

InfoTrait to mark a field as keyword-only in the auto-generated init.

Usage: refl::kw_only(true) marks a field so it can only be provided via the KWARGS calling convention in the auto-generated __ffi_init__.

Public Functions

inline explicit kw_only(bool is_kw_only)#

Constructor.

Parameters:

is_kw_only – Whether the field is keyword-only.

inline void Apply(TVMFFIFieldInfo *info) const#

Apply the kw_only flag to the field info.

Parameters:

info – The field info.