Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Reinecke
pypocketfft
Commits
4d87ca94
Commit
4d87ca94
authored
Aug 09, 2019
by
Peter Bell
Committed by
Martin Reinecke
Aug 09, 2019
Browse files
Fix windows build
parent
aeb61e47
Changes
2
Hide whitespace changes
Inline
Side-by-side
pocketfft_hdronly.h
View file @
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
...
...
setup.py
View file @
4d87ca94
...
...
@@ -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'
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment