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
de37cfc2
Commit
de37cfc2
authored
Jul 21, 2014
by
Richard Yoo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Intel AVX/AVX2 compilation on Windows.
parent
c38023f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
OpenCVCompilerOptions.cmake
cmake/OpenCVCompilerOptions.cmake
+0
-8
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+10
-2
No files found.
cmake/OpenCVCompilerOptions.cmake
View file @
de37cfc2
...
...
@@ -220,14 +220,6 @@ if(MSVC)
set
(
OPENCV_EXTRA_FLAGS_RELEASE
"
${
OPENCV_EXTRA_FLAGS_RELEASE
}
/Zi"
)
endif
()
if
(
ENABLE_AVX AND NOT MSVC_VERSION LESS 1600
)
set
(
OPENCV_EXTRA_FLAGS
"
${
OPENCV_EXTRA_FLAGS
}
/arch:AVX"
)
endif
()
if
(
ENABLE_AVX2 AND NOT MSVC_VERSION LESS 1800
)
set
(
OPENCV_EXTRA_FLAGS
"
${
OPENCV_EXTRA_FLAGS
}
/arch:AVX2"
)
endif
()
if
(
ENABLE_SSE4_1 AND CV_ICC AND NOT OPENCV_EXTRA_FLAGS MATCHES
"/arch:"
)
set
(
OPENCV_EXTRA_FLAGS
"
${
OPENCV_EXTRA_FLAGS
}
/arch:SSE4.1"
)
endif
()
...
...
cmake/OpenCVModule.cmake
View file @
de37cfc2
...
...
@@ -529,14 +529,22 @@ macro(ocv_glob_module_sources)
if
(
ENABLE_AVX
)
file
(
GLOB avx_srcs
"src/avx/*.cpp"
)
foreach
(
src
${
avx_srcs
}
)
set_source_files_properties
(
${
src
}
PROPERTIES COMPILE_FLAGS -mavx
)
if
(
CMAKE_COMPILER_IS_GNUCXX
)
set_source_files_properties
(
${
src
}
PROPERTIES COMPILE_FLAGS -mavx
)
elseif
(
MSVC AND NOT MSVC_VERSION LESS 1600
)
set_source_files_properties
(
${
src
}
PROPERTIES COMPILE_FLAGS /arch:AVX
)
endif
()
endforeach
()
endif
()
if
(
ENABLE_AVX2
)
file
(
GLOB avx2_srcs
"src/avx2/*.cpp"
)
foreach
(
src
${
avx2_srcs
}
)
set_source_files_properties
(
${
src
}
PROPERTIES COMPILE_FLAGS -mavx2
)
if
(
CMAKE_COMPILER_IS_GNUCXX
)
set_source_files_properties
(
${
src
}
PROPERTIES COMPILE_FLAGS -mavx2
)
elseif
(
MSVC AND NOT MSVC_VERSION LESS 1800
)
set_source_files_properties
(
${
src
}
PROPERTIES COMPILE_FLAGS /arch:AVX2
)
endif
()
endforeach
()
endif
()
...
...
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