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

Diff of /linuxsampler/trunk/benchmarks/saw.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 9  Line 9 
9    
10  #include "lfobench.h"  #include "lfobench.h"
11    
12  #include "../src/engines/common/LFOSawIntMath.h"  #include "../src/engines/common/LFOSawIntMathNew.h"
13  #include "../src/engines/common/SawLFO.h"  #include "../src/engines/common/LFOSawIntMathOld.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 19  Line 19 
19  #define INVALID_RESULT                  -1  #define INVALID_RESULT                  -1
20    
21  #if SIGNED  #if SIGNED
22  LFOSawIntMath<LFO::range_signed>* pSawIntLFO = NULL;  LFOSawIntMathNew<LFO::range_signed>* pSawIntLFO = NULL;
23  SawLFO<LFO::range_signed,true>* pSawLFOold = NULL;  LFOSawIntMathOld<LFO::range_signed,true>* pSawLFOold = NULL;
24  #else // unsigned  #else // unsigned
25  LFOSawIntMath<LFO::range_unsigned>* pSawIntLFO = NULL;  LFOSawIntMathNew<LFO::range_unsigned>* pSawIntLFO = NULL;
26  SawLFO<LFO::range_unsigned,true>* pSawLFOold = NULL;  LFOSawIntMathOld<LFO::range_unsigned,true>* pSawLFOold = NULL;
27  #endif  #endif
28    
29  double saw_new_int_math(smpl_t* pDestinationBuffer, float* pAmp, const int steps, const float frequency) {  double saw_new_int_math(smpl_t* pDestinationBuffer, float* pAmp, const int steps, const float frequency) {
# Line 94  int main() { Line 94  int main() {
94      #endif      #endif
95    
96      #if SIGNED      #if SIGNED
97      pSawIntLFO = new LFOSawIntMath<LFO::range_signed>(MAX);      pSawIntLFO = new LFOSawIntMathNew<LFO::range_signed>(MAX);
98      pSawLFOold = new SawLFO<LFO::range_signed,true>(MAX);      pSawLFOold = new LFOSawIntMathOld<LFO::range_signed,true>(MAX);
99      #else // unsigned      #else // unsigned
100      pSawIntLFO = new LFOSawIntMath<LFO::range_unsigned>(MAX);      pSawIntLFO = new LFOSawIntMathNew<LFO::range_unsigned>(MAX);
101      pSawLFOold = new SawLFO<LFO::range_unsigned,true>(MAX);      pSawLFOold = new LFOSawIntMathOld<LFO::range_unsigned,true>(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