diff --git a/CHANGES.txt b/CHANGES.txt index 57f4df8..db60025 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,10 @@ NEW IN VERSION 2 particular system. This option is altered using the "-p" command line option on the CUDA version (defaults to 100). +- Exponential Table lookup has been disabled by default. It was found that + on most architectures, it's actually faster to just do the EXP call than + it is to have to read from memory. + =============================================================================== NEW IN VERSION 1 =============================================================================== diff --git a/src/cpu/kernel.c b/src/cpu/kernel.c index ec7478e..411e975 100644 --- a/src/cpu/kernel.c +++ b/src/cpu/kernel.c @@ -214,7 +214,10 @@ void attenuate_segment( Input * restrict I, Source * restrict S, #pragma vector_level(10) #endif for( int g = 0; g < egroups; g++) - expVal[g] = interpolateTable( table, tau[g] ); + { + //expVal[g] = interpolateTable( table, tau[g] ); + expVal[g] = 1.f - exp( -tau[g] ); // exp is faster on many architectures + } // Flux Integral diff --git a/src/cuda/kernel.cu b/src/cuda/kernel.cu index 2d7a577..79002eb 100644 --- a/src/cuda/kernel.cu +++ b/src/cuda/kernel.cu @@ -155,7 +155,8 @@ __global__ void run_kernel( Input I, Source * S, tau = sigT * ds; sigT2 = sigT * sigT; - interpolateTable( table, tau, &expVal ); + //interpolateTable( table, tau, &expVal ); + expVal = 1.f - exp( -tau); // EXP function is fater than table lookup // Flux Integral