summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJukka Ojanen <jukka.ojanen@linkotec.net>2015-11-30 17:16:01 +0200
committerJukka Ojanen <jukka.ojanen@linkotec.net>2015-11-30 17:18:31 +0200
commitae1b59ddd07cb66b0807bc2c7c981ce96c69acea (patch)
tree0b17e0271543e1fb897aba27c242b656378df858 /src
parentc3e325911ae15524c814db75fe701df91d6f7c2a (diff)
downloadffts-ae1b59ddd07cb66b0807bc2c7c981ce96c69acea.zip
ffts-ae1b59ddd07cb66b0807bc2c7c981ce96c69acea.tar.gz
Enable building shared library and start version numbering from 0.9.0. On Windows when using FFTS as a DLL, define FFTS_SHARED. This is not mandatory, but it offers a little performance increase. Hide symbols when possible to improve compiler optimization and sizeof binary. Use CMake target alias "ffts" to choose between static and shared library, preferring static
Diffstat (limited to 'src')
-rw-r--r--src/ffts.c8
-rw-r--r--src/ffts_nd.c6
-rw-r--r--src/ffts_real.c2
-rw-r--r--src/ffts_real_nd.c6
4 files changed, 14 insertions, 8 deletions
diff --git a/src/ffts.c b/src/ffts.c
index a04a92c..a22a1c8 100644
--- a/src/ffts.c
+++ b/src/ffts.c
@@ -149,7 +149,8 @@ static FFTS_INLINE void ffts_vmem_free(void *addr, size_t length)
#endif
}
-void ffts_execute(ffts_plan_t *p, const void *in, void *out)
+FFTS_API 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)
@@ -165,7 +166,8 @@ void ffts_execute(ffts_plan_t *p, const void *in, void *out)
p->transform(p, (const float*) in, (float*) out);
}
-void ffts_free(ffts_plan_t *p)
+FFTS_API void
+ffts_free(ffts_plan_t *p)
{
if (p) {
p->destroy(p);
@@ -409,7 +411,7 @@ cleanup:
return -1;
}
-ffts_plan_t*
+FFTS_API ffts_plan_t*
ffts_init_1d(size_t N, int sign)
{
const size_t leaf_N = 8;
diff --git a/src/ffts_nd.c b/src/ffts_nd.c
index 23338c1..72e21e7 100644
--- a/src/ffts_nd.c
+++ b/src/ffts_nd.c
@@ -281,7 +281,8 @@ static void ffts_execute_nd(ffts_plan_t *p, const void *in, void *out)
}
}
-ffts_plan_t *ffts_init_nd(int rank, size_t *Ns, int sign)
+FFTS_API ffts_plan_t*
+ffts_init_nd(int rank, size_t *Ns, int sign)
{
ffts_plan_t *p;
size_t vol;
@@ -354,7 +355,8 @@ cleanup:
return NULL;
}
-ffts_plan_t *ffts_init_2d(size_t N1, size_t N2, int sign)
+FFTS_API ffts_plan_t*
+ffts_init_2d(size_t N1, size_t N2, int sign)
{
size_t Ns[2];
diff --git a/src/ffts_real.c b/src/ffts_real.c
index 6650d07..7f41069 100644
--- a/src/ffts_real.c
+++ b/src/ffts_real.c
@@ -599,7 +599,7 @@ ffts_execute_1d_real_inv(ffts_plan_t *p, const void *input, void *output)
p->plans[0]->transform(p->plans[0], buf, output);
}
-ffts_plan_t*
+FFTS_API ffts_plan_t*
ffts_init_1d_real(size_t N, int sign)
{
ffts_plan_t *p;
diff --git a/src/ffts_real_nd.c b/src/ffts_real_nd.c
index 5eae44b..545e8f0 100644
--- a/src/ffts_real_nd.c
+++ b/src/ffts_real_nd.c
@@ -218,7 +218,8 @@ static void ffts_execute_nd_real_inv(ffts_plan_t *p, const void *in, void *out)
}
}
-ffts_plan_t *ffts_init_nd_real(int rank, size_t *Ns, int sign)
+FFTS_API ffts_plan_t*
+ffts_init_nd_real(int rank, size_t *Ns, int sign)
{
int i;
size_t vol = 1;
@@ -327,7 +328,8 @@ cleanup:
return NULL;
}
-ffts_plan_t *ffts_init_2d_real(size_t N1, size_t N2, int sign)
+FFTS_API ffts_plan_t*
+ffts_init_2d_real(size_t N1, size_t N2, int sign)
{
size_t Ns[2];
OpenPOWER on IntegriCloud