Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TurTLE
TurTLE
Commits
aec0d620
Commit
aec0d620
authored
10 years ago
by
Chichi Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
add fftw transpose plan
parent
3b16beb6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/fftwf_tools.cpp
+24
-0
24 additions, 0 deletions
src/fftwf_tools.cpp
src/fftwf_tools.hpp
+7
-0
7 additions, 0 deletions
src/fftwf_tools.hpp
with
31 additions
and
0 deletions
src/fftwf_tools.cpp
+
24
−
0
View file @
aec0d620
...
@@ -148,3 +148,27 @@ int fftwf_get_descriptors_3D(
...
@@ -148,3 +148,27 @@ int fftwf_get_descriptors_3D(
return
EXIT_SUCCESS
;
return
EXIT_SUCCESS
;
}
}
/* the following is copied from
* http://agentzlerich.blogspot.com/2010/01/using-fftw-for-in-place-matrix.html
* */
fftwf_plan
plan_transpose
(
int
rows
,
int
cols
,
float
*
in
,
float
*
out
,
const
unsigned
flags
)
{
fftwf_iodim
howmany_dims
[
2
];
howmany_dims
[
0
].
n
=
rows
;
howmany_dims
[
0
].
is
=
cols
;
howmany_dims
[
0
].
os
=
1
;
howmany_dims
[
1
].
n
=
cols
;
howmany_dims
[
1
].
is
=
1
;
howmany_dims
[
1
].
os
=
rows
;
const
int
howmany_rank
=
sizeof
(
howmany_dims
)
/
sizeof
(
howmany_dims
[
0
]);
return
fftw_plan_guru_r2r
(
/*rank*/
0
,
/*dims*/
NULL
,
howmany_rank
,
howmany_dims
,
in
,
out
,
/*kind*/
NULL
,
flags
);
}
This diff is collapsed.
Click to expand it.
src/fftwf_tools.hpp
+
7
−
0
View file @
aec0d620
...
@@ -34,5 +34,12 @@ int fftwf_get_descriptors_3D(
...
@@ -34,5 +34,12 @@ int fftwf_get_descriptors_3D(
field_descriptor
**
fr
,
field_descriptor
**
fr
,
field_descriptor
**
fc
);
field_descriptor
**
fc
);
fftwf_plan
plan_transpose
(
int
rows
,
int
cols
,
float
*
in
,
float
*
out
,
const
unsigned
flags
=
FFTW_ESTIMATE
);
#endif//FFTWF_TOOLS
#endif//FFTWF_TOOLS
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment