Commit 2cdcfbca authored by Martin Reinecke's avatar Martin Reinecke
Browse files

hide all vector-related attributes behind #ifdef

parent 18adaa57
......@@ -2066,15 +2066,9 @@ template<> struct VTYPE<float>
#else
template<typename T> struct VTYPE{};
template<> struct VTYPE<double>
{
using type = double __attribute__ ((vector_size (8)));
static constexpr int vlen=1;
};
{ static constexpr int vlen=1; };
template<> struct VTYPE<float>
{
using type = float __attribute__ ((vector_size (4)));
static constexpr int vlen=1;
};
{ static constexpr int vlen=1; };
#endif
template<typename T> arr<char> alloc_tmp(const shape_t &shape,
......@@ -2112,6 +2106,7 @@ template<typename T> NOINLINE void pocketfft_general_c(
size_t len=it.length_in();
if ((!plan) || (len!=plan->length()))
plan.reset(new pocketfft_c<T>(len));
#if defined(HAVE_VECSUPPORT)
if (vlen>1)
while (it.remaining()>=vlen)
{
......@@ -2130,6 +2125,7 @@ template<typename T> NOINLINE void pocketfft_general_c(
for (size_t j=0; j<vlen; ++j)
it.out(j,i).Set(tdatav[i].r[j],tdatav[i].i[j]);
}
#endif
while (it.remaining()>0)
{
it.advance(1);
......@@ -2171,6 +2167,7 @@ template<typename T> NOINLINE void pocketfft_general_hartley(
size_t len=it.length_in();
if ((!plan) || (len!=plan->length()))
plan.reset(new pocketfft_r<T>(len));
#if defined(HAVE_VECSUPPORT)
if (vlen>1)
while (it.remaining()>=vlen)
{
......@@ -2194,6 +2191,7 @@ template<typename T> NOINLINE void pocketfft_general_hartley(
for (size_t j=0; j<vlen; ++j)
it.out(j,i1) = tdatav[i][j];
}
#endif
while (it.remaining()>0)
{
it.advance(1);
......@@ -2225,6 +2223,7 @@ template<typename T> NOINLINE void pocketfft_general_r2c(
constexpr int vlen = VTYPE<T>::vlen;
multi_iter<vlen, T, cmplx<T>> it(in, out, axis);
size_t len=in.shape(axis);
#if defined(HAVE_VECSUPPORT)
if (vlen>1)
while (it.remaining()>=vlen)
{
......@@ -2245,6 +2244,7 @@ template<typename T> NOINLINE void pocketfft_general_r2c(
for (size_t j=0; j<vlen; ++j)
it.out(j,ii).Set(tdatav[i][j]);
}
#endif
while (it.remaining()>0)
{
it.advance(1);
......@@ -2269,6 +2269,7 @@ template<typename T> NOINLINE void pocketfft_general_c2r(
constexpr int vlen = VTYPE<T>::vlen;
multi_iter<vlen, cmplx<T>, T> it(in, out, axis);
size_t len=out.shape(axis);
#if defined(HAVE_VECSUPPORT)
if (vlen>1)
while (it.remaining()>=vlen)
{
......@@ -2292,6 +2293,7 @@ template<typename T> NOINLINE void pocketfft_general_c2r(
for (size_t j=0; j<vlen; ++j)
it.out(j,i) = tdatav[i][j];
}
#endif
while (it.remaining()>0)
{
it.advance(1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment