/[svn]/linuxsampler/trunk/benchmarks/square.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/benchmarks/square.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3613 by schoenebeck, Mon Sep 30 18:03:43 2019 UTC revision 3614 by schoenebeck, Tue Oct 1 09:11:27 2019 UTC
# Line 10  Line 10 
10  #include "lfobench.h"  #include "lfobench.h"
11    
12  #include "../src/engines/common/LFOSquareIntMath.h"  #include "../src/engines/common/LFOSquareIntMath.h"
13  #include "../src/engines/common/PulseLFO.h"  #include "../src/engines/common/LFOSquarePulse.h"
14    
15  // return value of this benchmark  // return value of this benchmark
16  // to indicate the best performing solution  // to indicate the best performing solution
# Line 20  Line 20 
20    
21  #if SIGNED  #if SIGNED
22  LFOSquareIntMath<LFO::range_signed>* pSquareIntLFO = NULL;  LFOSquareIntMath<LFO::range_signed>* pSquareIntLFO = NULL;
23  SquareLFO<LFO::range_signed>* pSquarePulse = NULL;  LFOSquarePulse<LFO::range_signed>* pSquarePulse = NULL;
24  #else // unsigned  #else // unsigned
25  LFOSquareIntMath<LFO::range_unsigned>* pSquareIntLFO = NULL;  LFOSquareIntMath<LFO::range_unsigned>* pSquareIntLFO = NULL;
26  SquareLFO<LFO::range_unsigned>* pSquarePulse = NULL;  LFOSquarePulse<LFO::range_unsigned>* pSquarePulse = NULL;
27  #endif  #endif
28    
29  double square_int_math(smpl_t* pDestinationBuffer, float* pAmp, const int steps, const float frequency) {  double square_int_math(smpl_t* pDestinationBuffer, float* pAmp, const int steps, const float frequency) {
# Line 95  int main() { Line 95  int main() {
95    
96      #if SIGNED      #if SIGNED
97      pSquareIntLFO = new LFOSquareIntMath<LFO::range_signed>(MAX);      pSquareIntLFO = new LFOSquareIntMath<LFO::range_signed>(MAX);
98      pSquarePulse = new SquareLFO<LFO::range_signed>(MAX);      pSquarePulse = new LFOSquarePulse<LFO::range_signed>(MAX);
99      #else // unsigned      #else // unsigned
100      pSquareIntLFO = new LFOSquareIntMath<LFO::range_unsigned>(MAX);      pSquareIntLFO = new LFOSquareIntMath<LFO::range_unsigned>(MAX);
101      pSquarePulse = new SquareLFO<LFO::range_unsigned>(MAX);      pSquarePulse = new LFOSquarePulse<LFO::range_unsigned>(MAX);
102      #endif      #endif
103    
104      // output buffer for the calculated sinusoid wave      // output buffer for the calculated sinusoid wave

Legend:
Removed from v.3613  
changed lines
  Added in v.3614

  ViewVC Help
Powered by ViewVC