Template Function tvm::ffi::reflection::ForEachFieldInfoWithEarlyStop

Template Function tvm::ffi::reflection::ForEachFieldInfoWithEarlyStop#

Function Documentation#

template<typename Callback>
inline bool tvm::ffi::reflection::ForEachFieldInfoWithEarlyStop(const TypeInfo *type_info, Callback callback_with_early_stop)#

Visit each field info of the type info and run callback which returns bool for early stop.

Note

This function calls both the child and parent type info and can be used for searching.

Template Parameters:

Callback – The callback function type, which returns bool for early stop.

Parameters:
  • type_info – The type info.

  • callback_with_early_stop – The callback function.

Returns:

true if any of early stop is triggered.