Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pypocketfft
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Martin Reinecke
pypocketfft
Commits
36b04d9c
Commit
36b04d9c
authored
May 16, 2019
by
Martin Reinecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more warning flags
parent
45740128
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
21 deletions
+24
-21
pocketfft_hdronly.h
pocketfft_hdronly.h
+23
-20
setup.py
setup.py
+1
-1
No files found.
pocketfft_hdronly.h
View file @
36b04d9c
...
...
@@ -66,16 +66,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace
pocketfft
{
using
shape_t
=
std
::
vector
<
size_t
>
;
using
stride_t
=
std
::
vector
<
ptrdiff_t
>
;
constexpr
bool
FORWARD
=
true
,
BACKWARD
=
false
;
namespace
detail
{
using
namespace
std
;
using
shape_t
=
vector
<
size_t
>
;
using
stride_t
=
vector
<
ptrdiff_t
>
;
constexpr
bool
FORWARD
=
true
,
BACKWARD
=
false
;
#ifndef POCKETFFT_NO_VECTORS
#if (defined(__AVX512F__))
#define HAVE_VECSUPPORT
...
...
@@ -2503,14 +2503,11 @@ template<typename T> NOINLINE void general_r(
#undef HAVE_VECSUPPORT
}
// namespace detail
template
<
typename
T
>
void
c2c
(
const
shape_t
&
shape
,
const
stride_t
&
stride_in
,
const
stride_t
&
stride_out
,
const
shape_t
&
axes
,
bool
forward
,
const
std
::
complex
<
T
>
*
data_in
,
std
::
complex
<
T
>
*
data_out
,
T
fct
,
const
complex
<
T
>
*
data_in
,
complex
<
T
>
*
data_out
,
T
fct
,
size_t
nthreads
=
1
)
{
using
namespace
detail
;
if
(
util
::
prod
(
shape
)
==
0
)
return
;
util
::
sanity_check
(
shape
,
stride_in
,
stride_out
,
data_in
==
data_out
,
axes
);
ndarr
<
cmplx
<
T
>>
ain
(
data_in
,
shape
,
stride_in
),
...
...
@@ -2520,9 +2517,8 @@ template<typename T> void c2c(const shape_t &shape, const stride_t &stride_in,
template
<
typename
T
>
void
r2c
(
const
shape_t
&
shape_in
,
const
stride_t
&
stride_in
,
const
stride_t
&
stride_out
,
size_t
axis
,
const
T
*
data_in
,
std
::
complex
<
T
>
*
data_out
,
T
fct
,
size_t
nthreads
=
1
)
const
T
*
data_in
,
complex
<
T
>
*
data_out
,
T
fct
,
size_t
nthreads
=
1
)
{
using
namespace
detail
;
if
(
util
::
prod
(
shape_in
)
==
0
)
return
;
util
::
sanity_check
(
shape_in
,
stride_in
,
stride_out
,
false
,
axis
);
ndarr
<
T
>
ain
(
data_in
,
shape_in
,
stride_in
);
...
...
@@ -2534,9 +2530,8 @@ template<typename T> void r2c(const shape_t &shape_in,
template
<
typename
T
>
void
r2c
(
const
shape_t
&
shape_in
,
const
stride_t
&
stride_in
,
const
stride_t
&
stride_out
,
const
shape_t
&
axes
,
const
T
*
data_in
,
std
::
complex
<
T
>
*
data_out
,
T
fct
,
size_t
nthreads
=
1
)
const
T
*
data_in
,
complex
<
T
>
*
data_out
,
T
fct
,
size_t
nthreads
=
1
)
{
using
namespace
detail
;
if
(
util
::
prod
(
shape_in
)
==
0
)
return
;
util
::
sanity_check
(
shape_in
,
stride_in
,
stride_out
,
false
,
axes
);
r2c
(
shape_in
,
stride_in
,
stride_out
,
axes
.
back
(),
data_in
,
data_out
,
fct
,
...
...
@@ -2552,9 +2547,8 @@ template<typename T> void r2c(const shape_t &shape_in,
template
<
typename
T
>
void
c2r
(
const
shape_t
&
shape_out
,
const
stride_t
&
stride_in
,
const
stride_t
&
stride_out
,
size_t
axis
,
const
std
::
complex
<
T
>
*
data_in
,
T
*
data_out
,
T
fct
,
size_t
nthreads
=
1
)
const
complex
<
T
>
*
data_in
,
T
*
data_out
,
T
fct
,
size_t
nthreads
=
1
)
{
using
namespace
detail
;
if
(
util
::
prod
(
shape_out
)
==
0
)
return
;
util
::
sanity_check
(
shape_out
,
stride_in
,
stride_out
,
false
,
axis
);
shape_t
shape_in
(
shape_out
);
...
...
@@ -2566,9 +2560,8 @@ template<typename T> void c2r(const shape_t &shape_out,
template
<
typename
T
>
void
c2r
(
const
shape_t
&
shape_out
,
const
stride_t
&
stride_in
,
const
stride_t
&
stride_out
,
const
shape_t
&
axes
,
const
std
::
complex
<
T
>
*
data_in
,
T
*
data_out
,
T
fct
,
size_t
nthreads
=
1
)
const
complex
<
T
>
*
data_in
,
T
*
data_out
,
T
fct
,
size_t
nthreads
=
1
)
{
using
namespace
detail
;
if
(
util
::
prod
(
shape_out
)
==
0
)
return
;
if
(
axes
.
size
()
==
1
)
return
c2r
(
shape_out
,
stride_in
,
stride_out
,
axes
[
0
],
data_in
,
data_out
,
...
...
@@ -2593,7 +2586,6 @@ template<typename T> void r2r_fftpack(const shape_t &shape,
const
stride_t
&
stride_in
,
const
stride_t
&
stride_out
,
size_t
axis
,
bool
forward
,
const
T
*
data_in
,
T
*
data_out
,
T
fct
,
size_t
nthreads
=
1
)
{
using
namespace
detail
;
if
(
util
::
prod
(
shape
)
==
0
)
return
;
util
::
sanity_check
(
shape
,
stride_in
,
stride_out
,
data_in
==
data_out
,
axis
);
ndarr
<
T
>
ain
(
data_in
,
shape
,
stride_in
),
aout
(
data_out
,
shape
,
stride_out
);
...
...
@@ -2604,13 +2596,24 @@ template<typename T> void r2r_hartley(const shape_t &shape,
const
stride_t
&
stride_in
,
const
stride_t
&
stride_out
,
const
shape_t
&
axes
,
const
T
*
data_in
,
T
*
data_out
,
T
fct
,
size_t
nthreads
=
1
)
{
using
namespace
detail
;
if
(
util
::
prod
(
shape
)
==
0
)
return
;
util
::
sanity_check
(
shape
,
stride_in
,
stride_out
,
data_in
==
data_out
,
axes
);
ndarr
<
T
>
ain
(
data_in
,
shape
,
stride_in
),
aout
(
data_out
,
shape
,
stride_out
);
general_hartley
(
ain
,
aout
,
axes
,
fct
,
nthreads
);
}
}
// namespace detail
using
detail
::
FORWARD
;
using
detail
::
BACKWARD
;
using
detail
::
shape_t
;
using
detail
::
stride_t
;
using
detail
::
c2c
;
using
detail
::
c2r
;
using
detail
::
r2c
;
using
detail
::
r2r_fftpack
;
using
detail
::
r2r_hartley
;
}
// namespace pocketfft
#endif // POCKETFFT_HDRONLY_H
setup.py
View file @
36b04d9c
...
...
@@ -63,7 +63,7 @@ if sys.platform == 'darwin':
builder
=
setuptools
.
command
.
build_ext
.
build_ext
(
Distribution
())
base_library_link_args
.
append
(
'-dynamiclib'
)
else
:
extra_compile_args
+=
[
'-march=native'
,
'-O3'
,
'-Wfatal-errors'
,
'-Wno-ignored-attributes'
,
'-DPOCKETFFT_OPENMP'
,
'-fopenmp'
]
extra_compile_args
+=
[
'-march=native'
,
'-O3'
,
'-Wfatal-errors'
,
'-Wno-ignored-attributes'
,
'-DPOCKETFFT_OPENMP'
,
'-fopenmp'
,
'-Wfloat-conversion'
,
'-Wsign-conversion'
,
'-Wconversion'
,
'-W'
,
'-Wall'
]
python_module_link_args
+=
[
'-march=native'
]
extra_cc_compile_args
.
append
(
'--std=c++11'
)
python_module_link_args
.
append
(
"-Wl,-rpath,$ORIGIN"
)
...
...
Write
Preview
Markdown
is supported
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