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 SEqHashDefPattern()#

Attach kTVMFFIFieldFlagBitMaskSEqHashDefPattern.

The field enters a pattern def region: the value’s type is matched as a pattern. The value variable and every free variable found in its type bind on first occurrence and must match on later ones. Use for function-style bindings such as parameter lists, where shape variables are introduced alongside the parameters.

static inline AttachFieldFlag SEqHashDefSimple()#

Attach kTVMFFIFieldFlagBitMaskSEqHashDefSimple.

The field enters a simple def region: the variable alone is defined, and its type is walked as uses, so variables appearing in the type must already be bound. Use for let-style bindings whose type refers to outer-scope variables. Entered inside a pattern region it stays a pattern region.

static inline AttachFieldFlag SEqHashIgnore()#

Attach kTVMFFIFieldFlagBitMaskSEqHashIgnore.