phanrahan / mantle

mantle library
Other
42 stars 10 forks source link

Unify interface to Mantle primitives across implementations #81

Open leonardt opened 6 years ago

leonardt commented 6 years ago

Update the mantle primitives to use the Declare pattern that was started in https://github.com/phanrahan/mantle/blob/master/mantle/primitives/arith.py

This ensures that all primitives across different implementations conform to the same interface. It also reduces code duplication since the implementations don't need to regenerate a unique name or generate the interface.

phanrahan commented 6 years ago

I did this for compare.py and the shift operators (see barrel.py).

The coreir and mantle logic operators are different. We need to decide whether want to have two versions of the functions:

DefineReduceAnd, ... DefineAnd, ...