Name |
Last commit
|
Last update |
---|---|---|
.. | ||
adt.cc | ||
base.cc | ||
expr.cc | ||
expr_functor.cc | ||
function.cc | ||
hash.cc | ||
op_strategy.cc | ||
pattern_functor.cc | ||
transform.cc |
* [REFACTOR] Streamline Function Attr interface. There has been quite a few recent changes that depends heavily on the function attr interface. This PR streamlines that interface by introducing two APIs that covers most of the usages. - GetAttr which gets a typed object for a given key - HasNonzeroAttr is a quick helper that calls GetAttr to quickly check an attribute - WithAttr that creates a new function object with the given attr - The API comes with copy on write optimization to avoid multiple copies - We deliberately pick the prefix With(instead of Set) to indicate this function does not mutate the original input. On the python side: - We allow read access via func.attrs (which is a DictAttr) - func.with_attrs to create a new instance with updated attrs. We also get rid of the small wrapper functions and make sure the API centered around the GetAttr and HasNonzeroAttr interface. This PR also changes the function construction to follow the new convention. * Address review comments * Address review comments * Fix doxygen path
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
adt.cc | Loading commit data... | |
base.cc | Loading commit data... | |
expr.cc | Loading commit data... | |
expr_functor.cc | Loading commit data... | |
function.cc | Loading commit data... | |
hash.cc | Loading commit data... | |
op_strategy.cc | Loading commit data... | |
pattern_functor.cc | Loading commit data... | |
transform.cc | Loading commit data... |