Skip to content

Commit 5fd25e9

Browse files
bibikaroleksandr-pavlyk
authored andcommitted
Don't remove printing of small buffers
1 parent a6ea850 commit 5fd25e9

11 files changed

Lines changed: 56 additions & 17 deletions

‎native/fft2_cdp-out-c.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ int main() {
115115
status = DftiFreeDescriptor(&hand);
116116
assert(status == 0);
117117

118+
if (si == 0) {
119+
#include "print_buf.inc"
120+
}
121+
118122
mkl_free(buf);
119123

120124
t1 = moment_now();

‎native/fft2_cdp-out-nc.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ int main() {
104104
status = DftiFreeDescriptor(&hand);
105105
assert(status == 0);
106106

107+
if (si == 0 && it == -1) {
108+
#include "print_buf.inc"
109+
}
110+
107111
mkl_free(buf);
108112

109113
t1 = moment_now();

‎native/fft3_cdp-out-c.c‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,18 @@ int main() {
115115
status = DftiFreeDescriptor(&hand);
116116
assert(status == 0);
117117

118+
if (si == 0) {
119+
#include "print_buf.inc"
120+
}
121+
122+
mkl_free(buf);
123+
118124
t1 = moment_now();
119125
time_tot += t1 - t0;
120126

121127
printf("%.5g\n", seconds_from_moment(time_tot));
122128
}
123129

124-
#include "print_buf.inc"
125-
126-
mkl_free(buf);
127-
128130
err = vslDeleteStream(&stream);
129131
assert(err == VSL_STATUS_OK);
130132

‎native/fft3_cdp-out-nc.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ int main() {
105105
status = DftiFreeDescriptor(&hand);
106106
assert(status == 0);
107107

108+
if (si == 0 && it == -1) {
109+
#include "print_buf.inc"
110+
}
111+
108112
mkl_free(buf);
109113

110114
t1 = moment_now();

‎native/fft_cdp-out-c.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ int main() {
9494
status = DftiFreeDescriptor(&hand);
9595
assert(status == 0);
9696

97+
if (si == 0) {
98+
#include "print_buf.inc"
99+
}
100+
97101
mkl_free(buf);
98102

99103
t1 = moment_now();

‎native/fft_cdp-out-nc.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ int main() {
8282
status = DftiFreeDescriptor(&hand);
8383
assert(status == 0);
8484

85+
if (si == 0 && it == -1) {
86+
#include "print_buf.inc"
87+
}
88+
8589
mkl_free(buf);
8690

8791
t1 = moment_now();

‎native/fft_rdp-out-c.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ int main() {
8989
status = DftiFreeDescriptor(&hand);
9090
assert(status == 0);
9191

92+
if (si == 0) {
93+
#include "print_buf.inc"
94+
}
95+
9296
mkl_free(buf);
9397

9498
t1 = moment_now();
@@ -97,8 +101,6 @@ int main() {
97101
printf("%.5g\n", seconds_from_moment(time_tot));
98102
}
99103

100-
#include "print_buf.inc"
101-
102104
err = vslDeleteStream(&stream);
103105
assert(err == VSL_STATUS_OK);
104106

‎native/fft_rdp-out-nc.c‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ int main() {
2626
#define DESCRIPTION_STR "Real double, not in-place, not cached"
2727
#include "read_n_echo_env.inc"
2828

29+
x = (double *) mkl_malloc(N * sizeof(double), 64);
30+
assert(x);
31+
2932
err = vslNewStream(&stream, VSL_BRNG_MT19937, SEED);
3033
assert(err == VSL_STATUS_OK);
3134

3235
err = vdRngGaussian(VSL_RNG_METHOD_GAUSSIAN_ICDF, stream, N, x, d_zero, d_one);
3336
assert(err == VSL_STATUS_OK);
3437

35-
buf = (MKL_Complex16 *) mkl_malloc(N * sizeof(MKL_Complex16), 64);
36-
assert(buf);
37-
3838
warm_up_threads();
3939

4040
for(si = 0; si < samps; time_tot=0, si++) {
@@ -43,8 +43,8 @@ int main() {
4343

4444
t0 = moment_now();
4545

46-
x = (double *) mkl_malloc(N * sizeof(double), 64);
47-
assert(x);
46+
buf = (MKL_Complex16 *) mkl_malloc(N * sizeof(MKL_Complex16), 64);
47+
assert(buf);
4848

4949
status = DftiCreateDescriptor(
5050
&hand,
@@ -77,6 +77,10 @@ int main() {
7777
status = DftiFreeDescriptor(&hand);
7878
assert(status == 0);
7979

80+
if (si == 0 && it == -1) {
81+
#include "print_buf.inc"
82+
}
83+
8084
mkl_free(buf);
8185

8286
t1 = moment_now();

‎native/fft_rdp2-out-c.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ int main() {
105105
status = DftiFreeDescriptor(&hand);
106106
assert(status == 0);
107107

108+
if (si == 0) {
109+
#include "print_buf.inc"
110+
}
111+
108112
mkl_free(buf);
109113

110114
t1 = moment_now();

‎native/rfft_rdp-out-c.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ int main() {
8181
status = DftiFreeDescriptor(&hand);
8282
assert(status == 0);
8383

84+
if (si == 0) {
85+
#include "print_buf.inc"
86+
}
87+
8488
mkl_free(buf);
8589

8690
t1 = moment_now();

0 commit comments

Comments
 (0)