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
ac891a30
Commit
ac891a30
authored
Aug 04, 2019
by
Peter Bell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix hartley transforms by disallowing inplace FFT output
parent
1971f449
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
pocketfft_hdronly.h
pocketfft_hdronly.h
+7
-5
No files found.
pocketfft_hdronly.h
View file @
ac891a30
...
...
@@ -2902,7 +2902,8 @@ template <typename T> using add_vec_t = typename add_vec<T>::type;
template
<
typename
Tplan
,
typename
T
,
typename
T0
,
typename
Exec
>
POCKETFFT_NOINLINE
void
general_nd
(
const
cndarr
<
T
>
&
in
,
ndarr
<
T
>
&
out
,
const
shape_t
&
axes
,
T0
fct
,
size_t
POCKETFFT_NTHREADS
,
const
Exec
&
exec
)
const
shape_t
&
axes
,
T0
fct
,
size_t
POCKETFFT_NTHREADS
,
const
Exec
&
exec
,
const
bool
allow_inplace
=
true
)
{
shared_ptr
<
Tplan
>
plan
;
...
...
@@ -2932,7 +2933,7 @@ POCKETFFT_NOINLINE void general_nd(const cndarr<T> &in, ndarr<T> &out,
while
(
it
.
remaining
()
>
0
)
{
it
.
advance
(
1
);
auto
buf
=
it
.
stride_out
()
==
sizeof
(
T
)
?
auto
buf
=
allow_inplace
&&
it
.
stride_out
()
==
sizeof
(
T
)
?
&
out
[
it
.
oofs
(
0
)]
:
reinterpret_cast
<
T
*>
(
storage
.
data
());
exec
(
it
,
in
,
out
,
buf
,
*
plan
,
fct
);
}
...
...
@@ -2979,8 +2980,8 @@ template <typename T, size_t vlen> void copy_hartley(const multi_iter<vlen> &it,
size_t
i
=
1
,
i1
=
1
,
i2
=
it
.
length_out
()
-
1
;
for
(
i
=
1
;
i
<
it
.
length_out
()
-
1
;
i
+=
2
,
++
i1
,
--
i2
)
{
dst
[
it
.
oofs
(
i1
)]
=
src
[
i
]
+
src
[
i
+
1
];
dst
[
it
.
oofs
(
i2
)]
=
src
[
i
]
-
src
[
i
+
1
];
dst
[
it
.
oofs
(
i1
)]
=
src
[
i
]
+
src
[
i
+
1
];
dst
[
it
.
oofs
(
i2
)]
=
src
[
i
]
-
src
[
i
+
1
];
}
if
(
i
<
it
.
length_out
())
dst
[
it
.
oofs
(
i1
)]
=
src
[
i
];
...
...
@@ -3294,7 +3295,8 @@ template<typename T> void r2r_separable_hartley(const shape_t &shape,
util
::
sanity_check
(
shape
,
stride_in
,
stride_out
,
data_in
==
data_out
,
axes
);
cndarr
<
T
>
ain
(
data_in
,
shape
,
stride_in
);
ndarr
<
T
>
aout
(
data_out
,
shape
,
stride_out
);
general_nd
<
pocketfft_r
<
T
>>
(
ain
,
aout
,
axes
,
fct
,
nthreads
,
ExecHartley
{});
general_nd
<
pocketfft_r
<
T
>>
(
ain
,
aout
,
axes
,
fct
,
nthreads
,
ExecHartley
{},
false
);
}
}
// namespace detail
...
...
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