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
d6c5e18e
Commit
d6c5e18e
authored
Jul 12, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core(test): fix input data for OCL FP16 test
parent
9365817b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
test_arithm.cpp
modules/core/test/ocl/test_arithm.cpp
+8
-0
No files found.
modules/core/test/ocl/test_arithm.cpp
View file @
d6c5e18e
...
@@ -1639,6 +1639,14 @@ PARAM_TEST_CASE(ConvertFp16, Channels, bool)
...
@@ -1639,6 +1639,14 @@ PARAM_TEST_CASE(ConvertFp16, Channels, bool)
Size
roiSize
=
randomSize
(
1
,
MAX_VALUE
);
Size
roiSize
=
randomSize
(
1
,
MAX_VALUE
);
Border
srcBorder
=
randomBorder
(
0
,
0
);
Border
srcBorder
=
randomBorder
(
0
,
0
);
randomSubMat
(
src
,
src_roi
,
roiSize
,
srcBorder
,
stype
,
-
11
,
11
);
// FIXIT: Test with minV, maxV
randomSubMat
(
src
,
src_roi
,
roiSize
,
srcBorder
,
stype
,
-
11
,
11
);
// FIXIT: Test with minV, maxV
if
(
stype
==
CV_MAKE_TYPE
(
CV_16S
,
cn
))
// eliminate NaN/Inf FP16 values
{
RNG
dataRng
(
rng
.
next
());
Mat
src_i32
=
cvtest
::
randomMat
(
dataRng
,
roiSize
,
CV_MAKE_TYPE
(
CV_32S
,
cn
),
0
,
0x7c00
,
false
);
Mat
shift_i32
=
cvtest
::
randomMat
(
dataRng
,
roiSize
,
src_i32
.
type
(),
-
1
,
1
,
false
);
// values: -1, 0
src_i32
=
src_i32
+
(
shift_i32
*
0x8000
);
src_i32
.
convertTo
(
src_roi
,
stype
);
}
Border
dstBorder
=
randomBorder
(
0
,
0
);
Border
dstBorder
=
randomBorder
(
0
,
0
);
randomSubMat
(
dst
,
dst_roi
,
roiSize
,
dstBorder
,
dtype
,
5
,
16
);
randomSubMat
(
dst
,
dst_roi
,
roiSize
,
dstBorder
,
dtype
,
5
,
16
);
...
...
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