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
0477284b
Commit
0477284b
authored
Apr 18, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11338 from alalek:fix_fp16_with_disabled_optimizations
parents
b290bdaf
97882d03
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
OpenCVCompilerOptimizations.cmake
cmake/OpenCVCompilerOptimizations.cmake
+3
-0
cv_cpu_helper.h
modules/core/include/opencv2/core/cv_cpu_helper.h
+0
-0
convert.cpp
modules/core/src/convert.cpp
+2
-2
No files found.
cmake/OpenCVCompilerOptimizations.cmake
View file @
0477284b
...
@@ -703,16 +703,19 @@ macro(ocv_compiler_optimization_fill_cpu_config)
...
@@ -703,16 +703,19 @@ macro(ocv_compiler_optimization_fill_cpu_config)
set
(
OPENCV_CPU_CONTROL_DEFINITIONS_CONFIGMAKE
"
${
OPENCV_CPU_CONTROL_DEFINITIONS_CONFIGMAKE
}
set
(
OPENCV_CPU_CONTROL_DEFINITIONS_CONFIGMAKE
"
${
OPENCV_CPU_CONTROL_DEFINITIONS_CONFIGMAKE
}
#if !defined CV_DISABLE_OPTIMIZATION && defined CV_ENABLE_INTRINSICS && defined CV_CPU_COMPILE_
${
OPT
}
#if !defined CV_DISABLE_OPTIMIZATION && defined CV_ENABLE_INTRINSICS && defined CV_CPU_COMPILE_
${
OPT
}
# define CV_TRY_
${
OPT
}
1
# define CV_TRY_
${
OPT
}
1
# define CV_CPU_FORCE_
${
OPT
}
1
# define CV_CPU_HAS_SUPPORT_
${
OPT
}
1
# define CV_CPU_HAS_SUPPORT_
${
OPT
}
1
# define CV_CPU_CALL_
${
OPT
}
(fn, args) return (cpu_baseline::fn args)
# define CV_CPU_CALL_
${
OPT
}
(fn, args) return (cpu_baseline::fn args)
# define CV_CPU_CALL_
${
OPT
}
_(fn, args) return (opt_
${
OPT
}
::fn args)
# define CV_CPU_CALL_
${
OPT
}
_(fn, args) return (opt_
${
OPT
}
::fn args)
#elif !defined CV_DISABLE_OPTIMIZATION && defined CV_ENABLE_INTRINSICS && defined CV_CPU_DISPATCH_COMPILE_
${
OPT
}
#elif !defined CV_DISABLE_OPTIMIZATION && defined CV_ENABLE_INTRINSICS && defined CV_CPU_DISPATCH_COMPILE_
${
OPT
}
# define CV_TRY_
${
OPT
}
1
# define CV_TRY_
${
OPT
}
1
# define CV_CPU_FORCE_
${
OPT
}
0
# define CV_CPU_HAS_SUPPORT_
${
OPT
}
(cv::checkHardwareSupport(CV_CPU_
${
OPT
}
))
# define CV_CPU_HAS_SUPPORT_
${
OPT
}
(cv::checkHardwareSupport(CV_CPU_
${
OPT
}
))
# define CV_CPU_CALL_
${
OPT
}
(fn, args) if (CV_CPU_HAS_SUPPORT_
${
OPT
}
) return (opt_
${
OPT
}
::fn args)
# define CV_CPU_CALL_
${
OPT
}
(fn, args) if (CV_CPU_HAS_SUPPORT_
${
OPT
}
) return (opt_
${
OPT
}
::fn args)
# define CV_CPU_CALL_
${
OPT
}
_(fn, args) if (CV_CPU_HAS_SUPPORT_
${
OPT
}
) return (opt_
${
OPT
}
::fn args)
# define CV_CPU_CALL_
${
OPT
}
_(fn, args) if (CV_CPU_HAS_SUPPORT_
${
OPT
}
) return (opt_
${
OPT
}
::fn args)
#else
#else
# define CV_TRY_
${
OPT
}
0
# define CV_TRY_
${
OPT
}
0
# define CV_CPU_FORCE_
${
OPT
}
0
# define CV_CPU_HAS_SUPPORT_
${
OPT
}
0
# define CV_CPU_HAS_SUPPORT_
${
OPT
}
0
# define CV_CPU_CALL_
${
OPT
}
(fn, args)
# define CV_CPU_CALL_
${
OPT
}
(fn, args)
# define CV_CPU_CALL_
${
OPT
}
_(fn, args)
# define CV_CPU_CALL_
${
OPT
}
_(fn, args)
...
...
modules/core/include/opencv2/core/cv_cpu_helper.h
View file @
0477284b
This diff is collapsed.
Click to expand it.
modules/core/src/convert.cpp
View file @
0477284b
...
@@ -1363,7 +1363,7 @@ cvtScaleHalf_<float, short>( const float* src, size_t sstep, short* dst, size_t
...
@@ -1363,7 +1363,7 @@ cvtScaleHalf_<float, short>( const float* src, size_t sstep, short* dst, size_t
{
{
CV_CPU_CALL_FP16_
(
cvtScaleHalf_SIMD32f16f
,
(
src
,
sstep
,
dst
,
dstep
,
size
));
CV_CPU_CALL_FP16_
(
cvtScaleHalf_SIMD32f16f
,
(
src
,
sstep
,
dst
,
dstep
,
size
));
#if !
defined(CV_CPU_COMPILE_FP16)
#if !
CV_CPU_FORCE_FP16
sstep
/=
sizeof
(
src
[
0
]);
sstep
/=
sizeof
(
src
[
0
]);
dstep
/=
sizeof
(
dst
[
0
]);
dstep
/=
sizeof
(
dst
[
0
]);
...
@@ -1382,7 +1382,7 @@ cvtScaleHalf_<short, float>( const short* src, size_t sstep, float* dst, size_t
...
@@ -1382,7 +1382,7 @@ cvtScaleHalf_<short, float>( const short* src, size_t sstep, float* dst, size_t
{
{
CV_CPU_CALL_FP16_
(
cvtScaleHalf_SIMD16f32f
,
(
src
,
sstep
,
dst
,
dstep
,
size
));
CV_CPU_CALL_FP16_
(
cvtScaleHalf_SIMD16f32f
,
(
src
,
sstep
,
dst
,
dstep
,
size
));
#if !
defined(CV_CPU_COMPILE_FP16)
#if !
CV_CPU_FORCE_FP16
sstep
/=
sizeof
(
src
[
0
]);
sstep
/=
sizeof
(
src
[
0
]);
dstep
/=
sizeof
(
dst
[
0
]);
dstep
/=
sizeof
(
dst
[
0
]);
...
...
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