From 7f74c87546f97b8d5864e1f20da54d226de9030b Mon Sep 17 00:00:00 2001 From: Jukka Ojanen Date: Mon, 28 Mar 2016 22:04:23 +0300 Subject: "transpose_buf" is not used --- src/ffts_nd.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/ffts_nd.c b/src/ffts_nd.c index 2bde9c4..c964d7f 100644 --- a/src/ffts_nd.c +++ b/src/ffts_nd.c @@ -2,6 +2,7 @@ This file is part of FFTS -- The Fastest Fourier Transform in the South +Copyright (c) 2016, Jukka Ojanen Copyright (c) 2012, Anthony M. Blake Copyright (c) 2012, The University of Waikato @@ -43,7 +44,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define TSIZE 8 -static void ffts_free_nd(ffts_plan_t *p) +static void +ffts_free_nd(ffts_plan_t *p) { if (p->plans) { int i; @@ -82,14 +84,11 @@ static void ffts_free_nd(ffts_plan_t *p) ffts_aligned_free(p->buf); } - if (p->transpose_buf) { - ffts_aligned_free(p->transpose_buf); - } - free(p); } -static void ffts_transpose(uint64_t *in, uint64_t *out, int w, int h, uint64_t *buf) +static void +ffts_transpose(uint64_t *in, uint64_t *out, int w, int h) { #ifdef HAVE_NEON #if 0 @@ -196,7 +195,8 @@ static void ffts_transpose(uint64_t *in, uint64_t *out, int w, int h, uint64_t * #endif } -static void ffts_execute_nd(ffts_plan_t *p, const void *in, void *out) +static void +ffts_execute_nd(ffts_plan_t *p, const void *in, void *out) { uint64_t *din = (uint64_t*) in; uint64_t *buf = p->buf; @@ -211,7 +211,7 @@ static void ffts_execute_nd(ffts_plan_t *p, const void *in, void *out) plan->transform(plan, din + (j * p->Ms[0]), buf + (j * p->Ms[0])); } - ffts_transpose(buf, dout, p->Ms[0], p->Ns[0], p->transpose_buf); + ffts_transpose(buf, dout, p->Ms[0], p->Ns[0]); for (i = 1; i < p->rank; i++) { plan = p->plans[i]; @@ -220,7 +220,7 @@ static void ffts_execute_nd(ffts_plan_t *p, const void *in, void *out) plan->transform(plan, dout + (j * p->Ms[i]), buf + (j * p->Ms[i])); } - ffts_transpose(buf, dout, p->Ms[i], p->Ns[i], p->transpose_buf); + ffts_transpose(buf, dout, p->Ms[i], p->Ns[i]); } } @@ -261,11 +261,6 @@ ffts_init_nd(int rank, size_t *Ns, int sign) goto cleanup; } - p->transpose_buf = ffts_aligned_malloc(2 * 8 * 8 * sizeof(float)); - if (!p->transpose_buf) { - goto cleanup; - } - p->plans = calloc(rank, sizeof(*p->plans)); if (!p->plans) { goto cleanup; -- cgit v1.1