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
9fca953e
Commit
9fca953e
authored
Jul 12, 2016
by
Tomoaki Teshima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check the CPU flag correctly
parent
1095076d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
thresh.cpp
modules/imgproc/src/thresh.cpp
+8
-8
No files found.
modules/imgproc/src/thresh.cpp
View file @
9fca953e
...
...
@@ -397,7 +397,7 @@ thresh_16s( const Mat& _src, Mat& _dst, short thresh, short maxval, int type )
size_t
dst_step
=
_dst
.
step
/
sizeof
(
dst
[
0
]);
#if CV_SSE2
volatile
bool
useSIMD
=
checkHardwareSupport
(
CV_CPU_SSE
);
volatile
bool
useSIMD
=
checkHardwareSupport
(
CV_CPU_SSE
2
);
#endif
if
(
_src
.
isContinuous
()
&&
_dst
.
isContinuous
()
)
...
...
@@ -665,7 +665,7 @@ thresh_32f( const Mat& _src, Mat& _dst, float thresh, float maxval, int type )
size_t
src_step
=
_src
.
step
/
sizeof
(
src
[
0
]);
size_t
dst_step
=
_dst
.
step
/
sizeof
(
dst
[
0
]);
#if CV_SSE
2
#if CV_SSE
volatile
bool
useSIMD
=
checkHardwareSupport
(
CV_CPU_SSE
);
#endif
...
...
@@ -720,7 +720,7 @@ thresh_32f( const Mat& _src, Mat& _dst, float thresh, float maxval, int type )
for
(
i
=
0
;
i
<
roi
.
height
;
i
++
,
src
+=
src_step
,
dst
+=
dst_step
)
{
j
=
0
;
#if CV_SSE
2
#if CV_SSE
if
(
useSIMD
)
{
__m128
thresh4
=
_mm_set1_ps
(
thresh
),
maxval4
=
_mm_set1_ps
(
maxval
);
...
...
@@ -758,7 +758,7 @@ thresh_32f( const Mat& _src, Mat& _dst, float thresh, float maxval, int type )
for
(
i
=
0
;
i
<
roi
.
height
;
i
++
,
src
+=
src_step
,
dst
+=
dst_step
)
{
j
=
0
;
#if CV_SSE
2
#if CV_SSE
if
(
useSIMD
)
{
__m128
thresh4
=
_mm_set1_ps
(
thresh
),
maxval4
=
_mm_set1_ps
(
maxval
);
...
...
@@ -796,7 +796,7 @@ thresh_32f( const Mat& _src, Mat& _dst, float thresh, float maxval, int type )
for
(
i
=
0
;
i
<
roi
.
height
;
i
++
,
src
+=
src_step
,
dst
+=
dst_step
)
{
j
=
0
;
#if CV_SSE
2
#if CV_SSE
if
(
useSIMD
)
{
__m128
thresh4
=
_mm_set1_ps
(
thresh
);
...
...
@@ -827,7 +827,7 @@ thresh_32f( const Mat& _src, Mat& _dst, float thresh, float maxval, int type )
for
(
i
=
0
;
i
<
roi
.
height
;
i
++
,
src
+=
src_step
,
dst
+=
dst_step
)
{
j
=
0
;
#if CV_SSE
2
#if CV_SSE
if
(
useSIMD
)
{
__m128
thresh4
=
_mm_set1_ps
(
thresh
);
...
...
@@ -866,7 +866,7 @@ thresh_32f( const Mat& _src, Mat& _dst, float thresh, float maxval, int type )
for
(
i
=
0
;
i
<
roi
.
height
;
i
++
,
src
+=
src_step
,
dst
+=
dst_step
)
{
j
=
0
;
#if CV_SSE
2
#if CV_SSE
if
(
useSIMD
)
{
__m128
thresh4
=
_mm_set1_ps
(
thresh
);
...
...
@@ -916,7 +916,7 @@ thresh_64f(const Mat& _src, Mat& _dst, double thresh, double maxval, int type)
size_t
dst_step
=
_dst
.
step
/
sizeof
(
dst
[
0
]);
#if CV_SSE2
volatile
bool
useSIMD
=
checkHardwareSupport
(
CV_CPU_SSE
);
volatile
bool
useSIMD
=
checkHardwareSupport
(
CV_CPU_SSE
2
);
#endif
if
(
_src
.
isContinuous
()
&&
_dst
.
isContinuous
())
...
...
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