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
f2e9588c
Commit
f2e9588c
authored
Jul 29, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6999 from tomoaki0705:featureCmakeFp16
parents
3b1803f6
c57f8780
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
cvdef.h
modules/core/include/opencv2/core/cvdef.h
+0
-11
private.hpp
modules/core/include/opencv2/core/private.hpp
+11
-0
convert.cpp
modules/core/src/convert.cpp
+2
-2
No files found.
modules/core/include/opencv2/core/cvdef.h
View file @
f2e9588c
...
...
@@ -193,10 +193,6 @@ enum CpuFeatures {
# endif
# define CV_POPCNT 1
# endif
# if defined HAVE_FP16 && (defined __F16C__ || (defined _MSC_VER && _MSC_VER >= 1700))
# include <immintrin.h>
# define CV_FP16 1
# endif
# if defined __AVX__ || (defined _MSC_VER && _MSC_VER >= 1600 && 0)
// MS Visual Studio 2010 (2012?) has no macro pre-defined to identify the use of /arch:AVX
// See: http://connect.microsoft.com/VisualStudio/feedback/details/605858/arch-avx-should-define-a-predefined-macro-in-x64-and-set-a-unique-value-for-m-ix86-fp-in-win32
...
...
@@ -231,10 +227,6 @@ enum CpuFeatures {
# include <arm_neon.h>
#endif
#if defined HAVE_FP16 && defined __GNUC__
# define CV_FP16 1
#endif
#if defined __GNUC__ && defined __arm__ && (defined __ARM_PCS_VFP || defined __ARM_VFPV3__ || defined __ARM_NEON__) && !defined __SOFTFP__
# define CV_VFP 1
#endif
...
...
@@ -265,9 +257,6 @@ enum CpuFeatures {
#ifndef CV_SSE4_2
# define CV_SSE4_2 0
#endif
#ifndef CV_FP16
# define CV_FP16 0
#endif
#ifndef CV_AVX
# define CV_AVX 0
#endif
...
...
modules/core/include/opencv2/core/private.hpp
View file @
f2e9588c
...
...
@@ -71,6 +71,17 @@
# endif
#endif
#if defined HAVE_FP16 && (defined __F16C__ || (defined _MSC_VER && _MSC_VER >= 1700))
# include <immintrin.h>
# define CV_FP16 1
#elif defined HAVE_FP16 && defined __GNUC__
# define CV_FP16 1
#endif
#ifndef CV_FP16
# define CV_FP16 0
#endif
//! @cond IGNORED
namespace
cv
...
...
modules/core/src/convert.cpp
View file @
f2e9588c
...
...
@@ -4568,7 +4568,7 @@ cvtScaleHalf_<float, short>( const float* src, size_t sstep, short* dst, size_t
sstep
/=
sizeof
(
src
[
0
]);
dstep
/=
sizeof
(
dst
[
0
]);
if
(
checkHardwareSupport
(
CV_FP16
)
)
if
(
checkHardwareSupport
(
CV_
CPU_
FP16
)
)
{
for
(
;
size
.
height
--
;
src
+=
sstep
,
dst
+=
dstep
)
{
...
...
@@ -4622,7 +4622,7 @@ cvtScaleHalf_<short, float>( const short* src, size_t sstep, float* dst, size_t
sstep
/=
sizeof
(
src
[
0
]);
dstep
/=
sizeof
(
dst
[
0
]);
if
(
checkHardwareSupport
(
CV_FP16
)
)
if
(
checkHardwareSupport
(
CV_
CPU_
FP16
)
)
{
for
(
;
size
.
height
--
;
src
+=
sstep
,
dst
+=
dstep
)
{
...
...
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