Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
schaapcommon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ResearchAndDevelopment
schaapcommon
Commits
b85afc80
Commit
b85afc80
authored
2 weeks ago
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
Add explicit conversions
parent
7f7201e6
No related branches found
No related tags found
1 merge request
!168
Draft: Add working cache code for fftw
Pipeline
#108109
passed
2 weeks ago
Stage: versioning
Stage: prepare
Stage: linting
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/math/convolution.cc
+5
-4
5 additions, 4 deletions
src/math/convolution.cc
with
5 additions
and
4 deletions
src/math/convolution.cc
+
5
−
4
View file @
b85afc80
...
...
@@ -102,7 +102,8 @@ class FTTWPlannerCache {
fftwplanner_cached_plans_
.
emplace
(
FFTW_KEY
(
T
,
size
),
std
::
move
(
MakePlan
(
T
,
size
)));
return
fftwplanner_cached_plans_
[
FFTW_KEY
(
T
,
size
)];
return
static_cast
<
fftwf_plan
>
(
fftwplanner_cached_plans_
[
FFTW_KEY
(
T
,
size
)]);
}
private
:
...
...
@@ -112,13 +113,13 @@ class FTTWPlannerCache {
}
template
<
FFTWType
T
>
const
SmartFFTP
lan
&
SearchPlan
(
size_t
size
)
{
fftwf_p
lan
SearchPlan
(
size_t
size
)
{
std
::
pair
<
FFTWType
,
size_t
>
key
=
std
::
make_pair
(
T
,
size
);
if
(
auto
const
&
match
=
fftwplanner_cached_plans_
.
find
(
key
);
match
!=
fftwplanner_cached_plans_
.
end
())
{
return
match
->
second
;
return
static_cast
<
fftwf_plan
>
(
match
->
second
)
;
}
return
kInvalidPlan
;
return
nullptr
;
}
std
::
map
<
std
::
pair
<
FFTWType
,
size_t
>
,
SmartFFTPlan
,
cmpByPair
>
...
...
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