2828#include " util.h"
2929
3030#ifdef _OPENMP
31- #define X ( name ) CONCAT(name, _omp)
31+ #define SUFFIX " _omp"
3232#else
33- #define X ( name ) name
33+ #define SUFFIX " "
3434#endif
3535
3636static void DoSetup (const benchmark::State& state) {
@@ -57,7 +57,7 @@ static void init_random_data(NFFT(plan)* plan) {
5757}
5858
5959// Benchmark for NFFT direct transform (trafo_direct)
60- static void X ( nfft_forward_direct_1d) (benchmark::State& state) {
60+ static void nfft_forward_direct_1d (benchmark::State& state) {
6161 int N = state.range (0 );
6262 int M = state.range (1 );
6363
@@ -74,7 +74,7 @@ static void X(nfft_forward_direct_1d)(benchmark::State& state) {
7474}
7575
7676// Benchmark for NFFT adjoint direct transform (adjoint_direct)
77- static void X ( nfft_adjoint_direct_1d) (benchmark::State& state) {
77+ static void nfft_adjoint_direct_1d (benchmark::State& state) {
7878 int N = state.range (0 );
7979 int M = state.range (1 );
8080
@@ -91,7 +91,7 @@ static void X(nfft_adjoint_direct_1d)(benchmark::State& state) {
9191}
9292
9393// Benchmark for 2D NFFT direct transform
94- static void X ( nfft_forward_direct_2d) (benchmark::State& state) {
94+ static void nfft_forward_direct_2d (benchmark::State& state) {
9595 int N1 = state.range (0 );
9696 int N2 = state.range (1 );
9797 int M = state.range (2 );
@@ -109,7 +109,7 @@ static void X(nfft_forward_direct_2d)(benchmark::State& state) {
109109}
110110
111111// Benchmark for 2D NFFT adjoint direct transform
112- static void X ( nfft_adjoint_direct_2d) (benchmark::State& state) {
112+ static void nfft_adjoint_direct_2d (benchmark::State& state) {
113113 int N1 = state.range (0 );
114114 int N2 = state.range (1 );
115115 int M = state.range (2 );
@@ -127,7 +127,7 @@ static void X(nfft_adjoint_direct_2d)(benchmark::State& state) {
127127}
128128
129129// Benchmark for 3D NFFT direct transform
130- static void X ( nfft_forward_direct_3d) (benchmark::State& state) {
130+ static void nfft_forward_direct_3d (benchmark::State& state) {
131131 int N1 = state.range (0 );
132132 int N2 = state.range (1 );
133133 int N3 = state.range (2 );
@@ -146,7 +146,7 @@ static void X(nfft_forward_direct_3d)(benchmark::State& state) {
146146}
147147
148148// Benchmark for 3D NFFT adjoint direct transform
149- static void X ( nfft_adjoint_direct_3d) (benchmark::State& state) {
149+ static void nfft_adjoint_direct_3d (benchmark::State& state) {
150150 int N1 = state.range (0 );
151151 int N2 = state.range (1 );
152152 int N3 = state.range (2 );
@@ -165,7 +165,7 @@ static void X(nfft_adjoint_direct_3d)(benchmark::State& state) {
165165}
166166
167167// Register benchmarks for direct transforms
168- BENCH (X( nfft_forward_direct_1d) )
168+ BENCH (nfft_forward_direct_1d, SUFFIX )
169169 ->Args({32 , 100 })
170170 ->Args({64 , 200 })
171171 ->Args({128 , 400 })
@@ -175,7 +175,7 @@ BENCH(X(nfft_forward_direct_1d))
175175 ->Teardown(DoTeardown)
176176 ->Complexity();
177177
178- BENCH (X( nfft_adjoint_direct_1d) )
178+ BENCH (nfft_adjoint_direct_1d, SUFFIX )
179179 ->Args({32 , 100 })
180180 ->Args({64 , 200 })
181181 ->Args({128 , 400 })
@@ -185,31 +185,31 @@ BENCH(X(nfft_adjoint_direct_1d))
185185 ->Teardown(DoTeardown)
186186 ->Complexity();
187187
188- BENCH (X( nfft_forward_direct_2d) )
188+ BENCH (nfft_forward_direct_2d, SUFFIX )
189189 ->Args({16 , 16 , 500 })
190190 ->Args({32 , 32 , 1000 })
191191 ->Args({64 , 64 , 2000 })
192192 ->Setup(DoSetup)
193193 ->Teardown(DoTeardown)
194194 ->Complexity();
195195
196- BENCH (X( nfft_adjoint_direct_2d) )
196+ BENCH (nfft_adjoint_direct_2d, SUFFIX )
197197 ->Args({16 , 16 , 500 })
198198 ->Args({32 , 32 , 1000 })
199199 ->Args({64 , 64 , 2000 })
200200 ->Setup(DoSetup)
201201 ->Teardown(DoTeardown)
202202 ->Complexity();
203203
204- BENCH (X( nfft_forward_direct_3d) )
204+ BENCH (nfft_forward_direct_3d, SUFFIX )
205205 ->Args({4 , 4 , 4 , 250 })
206206 ->Args({8 , 8 , 8 , 500 })
207207 ->Args({16 , 16 , 16 , 1000 })
208208 ->Setup(DoSetup)
209209 ->Teardown(DoTeardown)
210210 ->Complexity();
211211
212- BENCH (X( nfft_adjoint_direct_3d) )
212+ BENCH (nfft_adjoint_direct_3d, SUFFIX )
213213 ->Args({4 , 4 , 4 , 250 })
214214 ->Args({8 , 8 , 8 , 500 })
215215 ->Args({16 , 16 , 16 , 1000 })
0 commit comments