MatchLib
|
Compile-time minmax tree. More...
#include <comptrees.h>
Static Public Member Functions | |
static IdxT | minmax (ArrT inputs, IdxT start, IdxT end) |
Compile-time minmax tree.
ArrT | Array type |
ElemT | Element type |
IdxT | type of the index. This is to restrict the index's bitwidth |
is_max | true if this is a max function, false for min |
Width | The width of this minmax tree, that is, the number of elements this instance of the tree is comparing. This must be a power of 2, but this is not (necessarily) the same as the size of the input array. This is mostly to define a base condition for the metaprogramming recursion (which is when Width=2) |
This specialization is for arrays implemented as a bitvector in which each element is of the same bitwidth as that of ElemT. As SC datatypes do not have a slice operator, we use bitshifts to access the corresponding element.
Definition at line 73 of file comptrees.h.