summaryrefslogtreecommitdiffstats
path: root/src/ffts.c
diff options
context:
space:
mode:
authorDennis Shtatnov <densht@gmail.com>2013-12-30 11:13:29 -0500
committerDennis Shtatnov <densht@gmail.com>2013-12-30 11:13:29 -0500
commitd70b38d65f5afec50ae43c20edf3927d11dfa734 (patch)
tree7d50d7983b4151d3faeca2280fe6635c5647d87f /src/ffts.c
parentcd00e1eb68dc0cc24c53a2e4dc2ba94efdec2dfe (diff)
downloadffts-d70b38d65f5afec50ae43c20edf3927d11dfa734.zip
ffts-d70b38d65f5afec50ae43c20edf3927d11dfa734.tar.gz
Check to make sure that the buffers were aligned properly
Diffstat (limited to 'src/ffts.c')
-rw-r--r--src/ffts.c12
1 files changed, 12 insertions, 0 deletions
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);
}
OpenPOWER on IntegriCloud