Class AttachFieldFlag#

Inheritance Relationships#

Base Type#

Class Documentation#

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

Trait that can be used to attach field flag.

Public Functions

inline explicit AttachFieldFlag(int32_t flag)#

Attach a field flag to the field.

Parameters:

flag – The flag to be set

inline void Apply(TVMFFIFieldInfo *info) const#

Apply the field flag to the field info.

Parameters:

info – The field info.

Public Static Functions

static inline AttachFieldFlag SEqHashDefRecursive()#

Attach kTVMFFIFieldFlagBitMaskSEqHashDefRecursive.

The field enters a recursive def region: free vars discovered both at the field’s value and inside that value’s sub-fields bind as fresh defs at the same site. Use for “function-style” bindings.

static inline AttachFieldFlag SEqHashDefNonRecursive()#

Attach kTVMFFIFieldFlagBitMaskSEqHashDefNonRecursive.

The field enters a non-recursive def region: only the immediate free var at the field’s value binds; free vars in its sub-fields are uses that must already be bound by an outer def region. Use for “let-style” bindings whose sub-fields reference outer-scope vars.

static inline AttachFieldFlag SEqHashIgnore()#

Attach kTVMFFIFieldFlagBitMaskSEqHashIgnore.