summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJukka Ojanen <jukka.ojanen@linkotec.net>2016-04-05 14:44:51 +0300
committerJukka Ojanen <jukka.ojanen@linkotec.net>2016-04-05 14:44:51 +0300
commit52c7d506e13dca5c92692e95aba5dfa678b2acb0 (patch)
tree5ea06fe27598ba57d21e372367762c71695ec4e4
parente464bcb622d5ab1426b14a2314d852fc6e1539e1 (diff)
downloadffts-52c7d506e13dca5c92692e95aba5dfa678b2acb0.zip
ffts-52c7d506e13dca5c92692e95aba5dfa678b2acb0.tar.gz
Add notes about data layout to ffts.h
-rw-r--r--include/ffts.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/include/ffts.h b/include/ffts.h
index d187e36..cc85a88 100644
--- a/include/ffts.h
+++ b/include/ffts.h
@@ -56,12 +56,22 @@ extern "C" {
# endif
#endif
-#define POSITIVE_SIGN 1
-#define NEGATIVE_SIGN -1
+/* The direction of the transform
+ (i.e, the sign of the exponent in the transform.)
+*/
+#define FFTS_FORWARD (-1)
+#define FFTS_BACKWARD (+1)
struct _ffts_plan_t;
typedef struct _ffts_plan_t ffts_plan_t;
+/* Complex data is stored in the interleaved format
+ (i.e, the real and imaginary parts composing each
+ element of complex data are stored adjacently in memory)
+
+ The multi-dimensional arrays passed are expected to be
+ stored as a single contiguous block in row-major order
+*/
FFTS_API ffts_plan_t*
ffts_init_1d(size_t N, int sign);
@@ -71,8 +81,10 @@ ffts_init_2d(size_t N1, size_t N2, int sign);
FFTS_API ffts_plan_t*
ffts_init_nd(int rank, size_t *Ns, int sign);
-/* For real transforms, sign == -1 implies a real-to-complex forwards tranform,
- and sign == 1 implies a complex-to-real backwards transform.
+/* For real transforms, sign == FFTS_FORWARD implies a real-to-complex
+ forwards tranform, and sign == FFTS_BACKWARD implies a complex-to-real
+ backwards transform.
+
The output of a real-to-complex transform is N/2+1 complex numbers,
where the redundant outputs have been omitted.
*/
OpenPOWER on IntegriCloud