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

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

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

revision 3117 by schoenebeck, Thu Dec 15 12:47:45 2016 UTC revision 3118 by schoenebeck, Fri Apr 21 13:33:03 2017 UTC
# Line 4  Line 4 
4      This is a benchmark for comparison between a integer math, table lookup      This is a benchmark for comparison between a integer math, table lookup
5      and numeric sine wave harmonics solution.      and numeric sine wave harmonics solution.
6    
7      Copyright (C) 2005 - 2016 Christian Schoenebeck <cuse@users.sf.net>      Copyright (C) 2005 - 2017 Christian Schoenebeck <cuse@users.sf.net>
8  */  */
9    
10  #include <math.h>  #include <math.h>
# Line 84  float int_math(smpl_t* pDestinationBuffe Line 84  float int_math(smpl_t* pDestinationBuffe
84      clock_t start_time = clock();      clock_t start_time = clock();
85    
86      for (int run = 0; run < RUNS; run++) {      for (int run = 0; run < RUNS; run++) {
87          pIntLFO->update(127); // pro forma          pIntLFO->updateByMIDICtrlValue(127); // pro forma
88          for (int i = 0; i < steps; ++i) {          for (int i = 0; i < steps; ++i) {
89              pDestinationBuffer[i] = pIntLFO->render() * pAmp[i]; // * pAmp[i] just to simulate some memory load              pDestinationBuffer[i] = pIntLFO->render() * pAmp[i]; // * pAmp[i] just to simulate some memory load
90          }          }
# Line 108  float int_math_abs(smpl_t* pDestinationB Line 108  float int_math_abs(smpl_t* pDestinationB
108      clock_t start_time = clock();      clock_t start_time = clock();
109    
110      for (int run = 0; run < RUNS; run++) {      for (int run = 0; run < RUNS; run++) {
111          pIntAbsLFO->update(0); // pro forma          pIntAbsLFO->updateByMIDICtrlValue(0); // pro forma
112          for (int i = 0; i < steps; ++i) {          for (int i = 0; i < steps; ++i) {
113              pDestinationBuffer[i] = pIntAbsLFO->render() * pAmp[i]; // * pAmp[i] just to simulate some memory load              pDestinationBuffer[i] = pIntAbsLFO->render() * pAmp[i]; // * pAmp[i] just to simulate some memory load
114          }          }
# Line 202  float numeric_di_harmonic_solution(smpl_ Line 202  float numeric_di_harmonic_solution(smpl_
202      clock_t start_time = clock();      clock_t start_time = clock();
203    
204      for (int run = 0; run < RUNS; run++) {      for (int run = 0; run < RUNS; run++) {
205          pDiHarmonicLFO->update(127); // pro forma          pDiHarmonicLFO->updateByMIDICtrlValue(127); // pro forma
206          for (int i = 0; i < steps; ++i) {          for (int i = 0; i < steps; ++i) {
207              pDestinationBuffer[i] = pDiHarmonicLFO->render() * pAmp[i]; // * pAmp[i] just to simulate some memory load              pDestinationBuffer[i] = pDiHarmonicLFO->render() * pAmp[i]; // * pAmp[i] just to simulate some memory load
208          }          }

Legend:
Removed from v.3117  
changed lines
  Added in v.3118

  ViewVC Help
Powered by ViewVC