Commit 553e4f1c authored by Martin Reinecke's avatar Martin Reinecke

Merge branch 'windows-build' into 'master'

Fix windows build

See merge request !25
parents aeb61e47 4d87ca94
......@@ -2990,8 +2990,10 @@ class rev_iter
size_t remaining() const { return rem; }
};
#ifndef POCKETFFT_NO_VECTORS
template<typename T> struct VTYPE {};
template <typename T> using vtype_t = typename VTYPE<T>::type;
#ifndef POCKETFFT_NO_VECTORS
template<> struct VTYPE<float>
{
using type = float __attribute__ ((vector_size (VLEN<float>::val*sizeof(float))));
......@@ -3004,8 +3006,6 @@ template<> struct VTYPE<long double>
{
using type = long double __attribute__ ((vector_size (VLEN<long double>::val*sizeof(long double))));
};
template <typename T> using vtype_t = typename VTYPE<T>::type;
#endif
template<typename T> arr<char> alloc_tmp(const shape_t &shape,
......@@ -3095,13 +3095,14 @@ POCKETFFT_NOINLINE void general_nd(const cndarr<T> &in, ndarr<T> &out,
for (size_t iax=0; iax<axes.size(); ++iax)
{
constexpr auto vlen = VLEN<T0>::val;
size_t len=in.shape(axes[iax]);
if ((!plan) || (len!=plan->length()))
plan = get_plan<Tplan>(len);
threading::thread_map(util::thread_count(nthreads, in.shape(), axes[iax], vlen),
threading::thread_map(
util::thread_count(nthreads, in.shape(), axes[iax], VLEN<T>::val),
[&] {
constexpr auto vlen = VLEN<T0>::val;
auto storage = alloc_tmp<T0>(in.shape(), len, sizeof(T));
const auto &tin(iax==0? in : out);
multi_iter<vlen> it(tin, out, axes[iax]);
......@@ -3204,10 +3205,11 @@ template<typename T> POCKETFFT_NOINLINE void general_r2c(
size_t nthreads)
{
auto plan = get_plan<pocketfft_r<T>>(in.shape(axis));
constexpr auto vlen = VLEN<T>::val;
size_t len=in.shape(axis);
threading::thread_map(util::thread_count(nthreads, in.shape(), axis, vlen),
threading::thread_map(
util::thread_count(nthreads, in.shape(), axis, VLEN<T>::val),
[&] {
constexpr auto vlen = VLEN<T>::val;
auto storage = alloc_tmp<T>(in.shape(), len, sizeof(T));
multi_iter<vlen> it(in, out, axis);
#ifndef POCKETFFT_NO_VECTORS
......@@ -3258,10 +3260,11 @@ template<typename T> POCKETFFT_NOINLINE void general_c2r(
size_t nthreads)
{
auto plan = get_plan<pocketfft_r<T>>(out.shape(axis));
constexpr auto vlen = VLEN<T>::val;
size_t len=out.shape(axis);
threading::thread_map(util::thread_count(nthreads, in.shape(), axis, vlen),
threading::thread_map(
util::thread_count(nthreads, in.shape(), axis, VLEN<T>::val),
[&] {
constexpr auto vlen = VLEN<T>::val;
auto storage = alloc_tmp<T>(out.shape(), len, sizeof(T));
multi_iter<vlen> it(in, out, axis);
#ifndef POCKETFFT_NO_VECTORS
......
......@@ -23,6 +23,9 @@ if sys.platform == 'darwin':
vars = distutils.sysconfig.get_config_vars()
vars['LDSHARED'] = vars['LDSHARED'].replace('-bundle', '')
python_module_link_args += ['-bundle']
elif sys.platform == 'win32':
define_macros = []
extra_compile_args = ['/Ox', '/EHsc']
else:
extra_compile_args += ['-Wfatal-errors', '-Wfloat-conversion', '-Wsign-conversion', '-Wconversion' ,'-W', '-Wall', '-Wstrict-aliasing=2', '-Wwrite-strings', '-Wredundant-decls', '-Woverloaded-virtual', '-Wcast-qual', '-Wcast-align', '-Wpointer-arith']
python_module_link_args += ['-march=native', '-Wl,-rpath,$ORIGIN']
......
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