Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
fecfaf40
Commit
fecfaf40
authored
Jul 27, 2014
by
Alexander Karsakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using std::map in PlanCache
parent
37d01e2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
dxt.cpp
modules/core/src/dxt.cpp
+12
-14
No files found.
modules/core/src/dxt.cpp
View file @
fecfaf40
...
...
@@ -43,6 +43,7 @@
#include "opencv2/core/opencl/runtime/opencl_clamdfft.hpp"
#include "opencv2/core/opencl/runtime/opencl_core.hpp"
#include "opencl_kernels.hpp"
#include <map>
namespace
cv
{
...
...
@@ -1801,10 +1802,9 @@ private:
String
buildOptions
;
int
thread_count
;
bool
status
;
public
:
int
dft_size
;
public
:
OCL_FftPlan
(
int
_size
)
:
dft_size
(
_size
),
status
(
true
)
{
int
min_radix
;
...
...
@@ -1999,18 +1999,17 @@ public:
Ptr
<
OCL_FftPlan
>
getFftPlan
(
int
dft_size
)
{
for
(
size_t
i
=
0
,
size
=
planStorage
.
size
();
i
<
size
;
++
i
)
std
::
map
<
int
,
Ptr
<
OCL_FftPlan
>
>::
iterator
f
=
planStorage
.
find
(
dft_size
);
if
(
f
!=
planStorage
.
end
())
{
Ptr
<
OCL_FftPlan
>
plan
=
planStorage
[
i
];
if
(
plan
->
dft_size
==
dft_size
)
{
return
plan
;
}
return
f
->
second
;
}
else
{
Ptr
<
OCL_FftPlan
>
newPlan
=
Ptr
<
OCL_FftPlan
>
(
new
OCL_FftPlan
(
dft_size
));
planStorage
[
dft_size
]
=
newPlan
;
return
newPlan
;
}
Ptr
<
OCL_FftPlan
>
newPlan
=
Ptr
<
OCL_FftPlan
>
(
new
OCL_FftPlan
(
dft_size
));
planStorage
.
push_back
(
newPlan
);
return
newPlan
;
}
~
OCL_FftPlanCache
()
...
...
@@ -2023,8 +2022,7 @@ protected:
planStorage
()
{
}
std
::
vector
<
Ptr
<
OCL_FftPlan
>
>
planStorage
;
std
::
map
<
int
,
Ptr
<
OCL_FftPlan
>
>
planStorage
;
};
static
bool
ocl_dft_rows
(
InputArray
_src
,
OutputArray
_dst
,
int
nonzero_rows
,
int
flags
,
int
fftType
)
...
...
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