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
54b59c3c
Commit
54b59c3c
authored
Oct 21, 2014
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3355 from ElenaGvozdeva:predictOptimalVectorWidth
parents
322593e8
070e5ec0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
ocl.hpp
modules/core/include/opencv2/core/ocl.hpp
+6
-0
ocl.cpp
modules/core/src/ocl.cpp
+11
-1
No files found.
modules/core/include/opencv2/core/ocl.hpp
View file @
54b59c3c
...
...
@@ -618,6 +618,12 @@ CV_EXPORTS int predictOptimalVectorWidth(InputArray src1, InputArray src2 = noAr
InputArray
src7
=
noArray
(),
InputArray
src8
=
noArray
(),
InputArray
src9
=
noArray
(),
OclVectorStrategy
strat
=
OCL_VECTOR_DEFAULT
);
CV_EXPORTS
int
checkOptimalVectorWidth
(
int
*
vectorWidths
,
InputArray
src1
,
InputArray
src2
=
noArray
(),
InputArray
src3
=
noArray
(),
InputArray
src4
=
noArray
(),
InputArray
src5
=
noArray
(),
InputArray
src6
=
noArray
(),
InputArray
src7
=
noArray
(),
InputArray
src8
=
noArray
(),
InputArray
src9
=
noArray
(),
OclVectorStrategy
strat
=
OCL_VECTOR_DEFAULT
);
// with OCL_VECTOR_MAX strategy
CV_EXPORTS
int
predictOptimalVectorWidthMax
(
InputArray
src1
,
InputArray
src2
=
noArray
(),
InputArray
src3
=
noArray
(),
InputArray
src4
=
noArray
(),
InputArray
src5
=
noArray
(),
InputArray
src6
=
noArray
(),
...
...
modules/core/src/ocl.cpp
View file @
54b59c3c
...
...
@@ -4513,7 +4513,6 @@ int predictOptimalVectorWidth(InputArray src1, InputArray src2, InputArray src3,
OclVectorStrategy
strat
)
{
const
ocl
::
Device
&
d
=
ocl
::
Device
::
getDefault
();
int
ref_type
=
src1
.
type
();
int
vectorWidths
[]
=
{
d
.
preferredVectorWidthChar
(),
d
.
preferredVectorWidthChar
(),
d
.
preferredVectorWidthShort
(),
d
.
preferredVectorWidthShort
(),
...
...
@@ -4529,6 +4528,17 @@ int predictOptimalVectorWidth(InputArray src1, InputArray src2, InputArray src3,
vectorWidths
[
CV_32S
]
=
vectorWidths
[
CV_32F
]
=
vectorWidths
[
CV_64F
]
=
1
;
}
return
checkOptimalVectorWidth
(
vectorWidths
,
src1
,
src2
,
src3
,
src4
,
src5
,
src6
,
src7
,
src8
,
src9
,
strat
);
}
int
checkOptimalVectorWidth
(
int
*
vectorWidths
,
InputArray
src1
,
InputArray
src2
,
InputArray
src3
,
InputArray
src4
,
InputArray
src5
,
InputArray
src6
,
InputArray
src7
,
InputArray
src8
,
InputArray
src9
,
OclVectorStrategy
strat
)
{
int
ref_type
=
src1
.
type
();
std
::
vector
<
size_t
>
offsets
,
steps
,
cols
;
std
::
vector
<
int
>
dividers
,
kercns
;
PROCESS_SRC
(
src1
);
...
...
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