From d70b38d65f5afec50ae43c20edf3927d11dfa734 Mon Sep 17 00:00:00 2001 From: Dennis Shtatnov Date: Mon, 30 Dec 2013 11:13:29 -0500 Subject: Check to make sure that the buffers were aligned properly --- src/ffts.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/ffts.c') diff --git a/src/ffts.c b/src/ffts.c index f8cc355..3178526 100644 --- a/src/ffts.c +++ b/src/ffts.c @@ -53,6 +53,18 @@ #endif void ffts_execute(ffts_plan_t *p, const void * in, void * out) { + +//TODO: Define NEEDS_ALIGNED properly instead +#if defined(HAVE_SSE) || defined(HAVE_NEON) + if(((int)in % 16) != 0) { + LOG("ffts_execute: input buffer needs to be aligned to a 128bit boundary\n"); + } + + if(((int)out % 16) != 0) { + LOG("ffts_execute: output buffer needs to be aligned to a 128bit boundary\n"); + } +#endif + p->transform(p, (const float *)in, (float *)out); } -- cgit v1.1