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
b18983a0
Commit
b18983a0
authored
Aug 24, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test(hal): properly dispatch FP16 test
parent
76f7fb52
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
14 deletions
+31
-14
test_intrin.cpp
modules/core/test/test_intrin.cpp
+14
-1
test_intrin.fp16.cpp
modules/core/test/test_intrin.fp16.cpp
+7
-2
test_intrin_utils.hpp
modules/core/test/test_intrin_utils.hpp
+10
-11
No files found.
modules/core/test/test_intrin.cpp
View file @
b18983a0
#include "test_precomp.hpp"
#include "test_intrin_utils.hpp"
#include <climits>
#include "test_intrin_utils.hpp"
#define CV_CPU_SIMD_FILENAME "test_intrin_utils.hpp"
#define CV_CPU_DISPATCH_MODE FP16
#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp"
using
namespace
cv
;
namespace
cvtest
{
namespace
hal
{
using
namespace
CV_CPU_OPTIMIZATION_NAMESPACE
;
//============= 8-bit integer =====================================================================
...
...
@@ -220,4 +227,10 @@ TEST(hal_intrin, float64x2) {
}
#endif
TEST
(
hal_intrin
,
float16x4
)
{
CV_CPU_CALL_FP16
(
test_hal_intrin_float16x4
,
());
throw
SkipTestException
(
"Unsupported hardware: FP16 is not available"
);
}
}}
modules/core/test/test_intrin.fp16.cpp
View file @
b18983a0
...
...
@@ -2,10 +2,15 @@
#include "test_intrin_utils.hpp"
namespace
cvtest
{
namespace
hal
{
TEST
(
hal_intrin
,
float16x4
)
{
CV_CPU_OPTIMIZATION_NAMESPACE_BEGIN
void
test_hal_intrin_float16x4
()
{
TheTest
<
v_float16x4
>
()
.
test_loadstore_fp16
()
.
test_float_cvt_fp16
()
;
}
}}
CV_CPU_OPTIMIZATION_NAMESPACE_END
}}
// namespace
modules/core/test/test_intrin_utils.hpp
View file @
b18983a0
#ifndef _TEST_UTILS_HPP_
#define _TEST_UTILS_HPP_
#include "opencv2/core/hal/intrin.hpp"
#include "opencv2/ts.hpp"
#include <ostream>
#include <algorithm>
#include <climits>
namespace
cvtest
{
namespace
hal
{
CV_CPU_OPTIMIZATION_NAMESPACE_BEGIN
void
test_hal_intrin_float16x4
();
#ifndef CV_CPU_OPTIMIZATION_DECLARATIONS_ONLY
template
<
typename
R
>
struct
Data
;
template
<
int
N
>
struct
initializer
;
...
...
@@ -156,8 +156,6 @@ template <typename R> std::ostream & operator<<(std::ostream & out, const Data<R
return
out
;
}
namespace
cvtest
{
namespace
hal
{
template
<
typename
T
>
static
inline
void
EXPECT_COMPARE_EQ_
(
const
T
a
,
const
T
b
);
template
<>
inline
void
EXPECT_COMPARE_EQ_
<
float
>
(
const
float
a
,
const
float
b
)
{
...
...
@@ -962,7 +960,8 @@ template<typename R> struct TheTest
}
};
}
}
#endif
CV_CPU_OPTIMIZATION_NAMESPACE_END
}}
// namespace
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