mirror of
https://github.com/aicodix/dsp.git
synced 2026-04-27 14:30:36 +00:00
use the std wrappers
This commit is contained in:
parent
0b8fa61da7
commit
ad9407c66e
2 changed files with 3 additions and 8 deletions
|
|
@ -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
3
sma.hh
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue