use the std wrappers

This commit is contained in:
Ahmet Inan 2020-10-13 10:26:26 +02:00
commit ad9407c66e
2 changed files with 3 additions and 8 deletions

View file

@ -44,9 +44,7 @@ public:
template <typename TYPE, int NUM>
class MovMin
{
struct Equal { bool operator () (TYPE a, TYPE b) { return a == b; } };
struct Less { bool operator () (TYPE a, TYPE b) { return a < b; } };
MovExt<TYPE, Equal, Less, NUM> movmin;
MovExt<TYPE, std::equal_to<TYPE>, std::less<TYPE>, NUM> movmin;
public:
TYPE operator () (TYPE input)
{
@ -57,9 +55,7 @@ public:
template <typename TYPE, int NUM>
class MovMax
{
struct Equal { bool operator () (TYPE a, TYPE b) { return a == b; } };
struct Greater { bool operator () (TYPE a, TYPE b) { return a > b; } };
MovExt<TYPE, Equal, Greater, NUM> movmax;
MovExt<TYPE, std::equal_to<TYPE>, std::greater<TYPE>, NUM> movmax;
public:
TYPE operator () (TYPE input)
{

3
sma.hh
View file

@ -82,8 +82,7 @@ public:
template <typename TYPE, typename VALUE, int NUM, bool NORM = true>
class SMA4
{
struct Add { TYPE operator () (TYPE a, TYPE b) { return a + b; } };
SWA<TYPE, Add, NUM> swa;
SWA<TYPE, std::plus<TYPE>, NUM> swa;
public:
SMA4() : swa(0)
{