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
5132ce21
Commit
5132ce21
authored
Dec 17, 2010
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reimplemented gpu::bitwise_not operation, refactored gpu module
parent
1a93412e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
mathfunc.cu
modules/gpu/src/cuda/mathfunc.cu
+0
-0
bitwise_oper.cpp
tests/gpu/src/bitwise_oper.cpp
+12
-2
No files found.
modules/gpu/src/cuda/mathfunc.cu
View file @
5132ce21
This diff is collapsed.
Click to expand it.
tests/gpu/src/bitwise_oper.cpp
View file @
5132ce21
...
...
@@ -44,7 +44,7 @@
#include "gputest.hpp"
#define CHECK(pred, err) if (!(pred)) { \
ts
->
printf
(
CvTS
::
LOG
,
"Fail:
\"
%s
\"
at line: %d
\n
"
,
#
pred
,
__LINE__
);
\
ts
->
printf
(
CvTS
::
CONSOLE
,
"Fail:
\"
%s
\"
at line: %d
\n
"
,
#
pred
,
__LINE__
);
\
ts
->
set_failed_test_info
(
err
);
\
return
;
}
...
...
@@ -88,12 +88,22 @@ struct CV_GpuBitwiseTest: public CvTest
mask
.
setTo
(
Scalar
(
1
));
gpu
::
GpuMat
dst
;
gpu
::
bitwise_not
(
gpu
::
GpuMat
(
src
),
dst
,
mask
);
gpu
::
bitwise_not
(
gpu
::
GpuMat
(
src
),
dst
);
CHECK
(
dst_gold
.
size
()
==
dst
.
size
(),
CvTS
::
FAIL_INVALID_OUTPUT
);
CHECK
(
dst_gold
.
type
()
==
dst
.
type
(),
CvTS
::
FAIL_INVALID_OUTPUT
);
Mat
dsth
(
dst
);
for
(
int
i
=
0
;
i
<
dst_gold
.
rows
;
++
i
)
CHECK
(
memcmp
(
dst_gold
.
ptr
(
i
),
dsth
.
ptr
(
i
),
dst_gold
.
cols
*
dst_gold
.
elemSize
())
==
0
,
CvTS
::
FAIL_INVALID_OUTPUT
);
dst
.
setTo
(
Scalar
::
all
(
0
));
gpu
::
bitwise_not
(
gpu
::
GpuMat
(
src
),
dst
,
mask
);
CHECK
(
dst_gold
.
size
()
==
dst
.
size
(),
CvTS
::
FAIL_INVALID_OUTPUT
);
CHECK
(
dst_gold
.
type
()
==
dst
.
type
(),
CvTS
::
FAIL_INVALID_OUTPUT
);
dsth
=
dst
;
for
(
int
i
=
0
;
i
<
dst_gold
.
rows
;
++
i
)
CHECK
(
memcmp
(
dst_gold
.
ptr
(
i
),
dsth
.
ptr
(
i
),
dst_gold
.
cols
*
dst_gold
.
elemSize
())
==
0
,
CvTS
::
FAIL_INVALID_OUTPUT
)
}
...
...
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