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
250941bd
Commit
250941bd
authored
Mar 28, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
next: drop WITH_CSTRIPES
parent
5b17a60d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
64 deletions
+8
-64
CMakeLists.txt
CMakeLists.txt
+0
-2
OpenCVDetectCStripes.cmake
cmake/OpenCVDetectCStripes.cmake
+0
-11
OpenCVFindLibsPerf.cmake
cmake/OpenCVFindLibsPerf.cmake
+2
-9
cvconfig.h.in
cmake/templates/cvconfig.h.in
+0
-3
parallel.cpp
modules/core/src/parallel.cpp
+6
-39
No files found.
CMakeLists.txt
View file @
250941bd
...
...
@@ -253,7 +253,6 @@ OCV_OPTION(WITH_QUICKTIME "Use QuickTime for Video I/O" OFF
OCV_OPTION
(
WITH_QTKIT
"Use QTKit Video I/O backend"
OFF IF APPLE
)
OCV_OPTION
(
WITH_TBB
"Include Intel TBB support"
OFF
IF
(
NOT IOS AND NOT WINRT
)
)
OCV_OPTION
(
WITH_OPENMP
"Include OpenMP support"
OFF
)
OCV_OPTION
(
WITH_CSTRIPES
"Include C= support"
OFF
IF
(
WIN32 AND NOT WINRT
)
)
OCV_OPTION
(
WITH_PTHREADS_PF
"Use pthreads-based parallel_for"
ON
IF
(
NOT WIN32 OR MINGW
)
)
OCV_OPTION
(
WITH_TIFF
"Include TIFF support"
ON
IF
(
NOT IOS
)
)
OCV_OPTION
(
WITH_UNICAP
"Include Unicap support (GPL)"
OFF
IF
(
UNIX AND NOT APPLE AND NOT ANDROID
)
)
...
...
@@ -1331,7 +1330,6 @@ endif()
# Order is similar to CV_PARALLEL_FRAMEWORK in core/src/parallel.cpp
ocv_build_features_string
(
parallel_status EXCLUSIVE
IF HAVE_TBB THEN
"TBB (ver
${
TBB_VERSION_MAJOR
}
.
${
TBB_VERSION_MINOR
}
interface
${
TBB_INTERFACE_VERSION
}
)"
IF HAVE_CSTRIPES THEN
"C="
IF HAVE_OPENMP THEN
"OpenMP"
IF HAVE_GCD THEN
"GCD"
IF WINRT OR HAVE_CONCURRENCY THEN
"Concurrency"
...
...
cmake/OpenCVDetectCStripes.cmake
deleted
100644 → 0
View file @
5b17a60d
if
(
WIN32
)
find_path
(
CSTRIPES_LIB_DIR
NAMES
"C=.lib"
DOC
"The path to C= lib and dll"
)
if
(
CSTRIPES_LIB_DIR
)
ocv_include_directories
(
"
${
CSTRIPES_LIB_DIR
}
/.."
)
link_directories
(
"
${
CSTRIPES_LIB_DIR
}
"
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
"C="
)
set
(
HAVE_CSTRIPES 1
)
endif
()
endif
()
cmake/OpenCVFindLibsPerf.cmake
View file @
250941bd
...
...
@@ -104,22 +104,15 @@ if(WITH_CLP)
endif
()
endif
(
WITH_CLP
)
# --- C= ---
if
(
WITH_CSTRIPES AND NOT HAVE_TBB
)
include
(
"
${
OpenCV_SOURCE_DIR
}
/cmake/OpenCVDetectCStripes.cmake"
)
else
()
set
(
HAVE_CSTRIPES 0
)
endif
()
# --- GCD ---
if
(
APPLE AND NOT HAVE_TBB
AND NOT HAVE_CSTRIPES
)
if
(
APPLE AND NOT HAVE_TBB
)
set
(
HAVE_GCD 1
)
else
()
set
(
HAVE_GCD 0
)
endif
()
# --- Concurrency ---
if
(
MSVC AND NOT HAVE_TBB
AND NOT HAVE_CSTRIPES
)
if
(
MSVC AND NOT HAVE_TBB
)
set
(
_fname
"
${
CMAKE_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
/CMakeTmp/concurrencytest.cpp"
)
file
(
WRITE
"
${
_fname
}
"
"#if _MSC_VER < 1600
\n
#error
\n
#endif
\n
int main() { return 0; }
\n
"
)
try_compile
(
HAVE_CONCURRENCY
"
${
CMAKE_BINARY_DIR
}
"
"
${
_fname
}
"
)
...
...
cmake/templates/cvconfig.h.in
View file @
250941bd
...
...
@@ -46,9 +46,6 @@
/* Cocoa API */
#cmakedefine HAVE_COCOA
/* C= */
#cmakedefine HAVE_CSTRIPES
/* NVidia Cuda Basic Linear Algebra Subprograms (BLAS) API*/
#cmakedefine HAVE_CUBLAS
...
...
modules/core/src/parallel.cpp
View file @
250941bd
...
...
@@ -78,13 +78,12 @@
#endif
/* IMPORTANT: always use the same order of defines
1. HAVE_TBB - 3rdparty library, should be explicitly enabled
2. HAVE_CSTRIPES - 3rdparty library, should be explicitly enabled
3. HAVE_OPENMP - integrated to compiler, should be explicitly enabled
4. HAVE_GCD - system wide, used automatically (APPLE only)
5. WINRT - system wide, used automatically (Windows RT only)
6. HAVE_CONCURRENCY - part of runtime, used automatically (Windows only - MSVS 10, MSVS 11)
7. HAVE_PTHREADS_PF - pthreads if available
- HAVE_TBB - 3rdparty library, should be explicitly enabled
- HAVE_OPENMP - integrated to compiler, should be explicitly enabled
- HAVE_GCD - system wide, used automatically (APPLE only)
- WINRT - system wide, used automatically (Windows RT only)
- HAVE_CONCURRENCY - part of runtime, used automatically (Windows only - MSVS 10, MSVS 11)
- HAVE_PTHREADS_PF - pthreads if available
*/
#if defined HAVE_TBB
...
...
@@ -96,9 +95,6 @@
#endif
#undef min
#undef max
#elif defined HAVE_CSTRIPES
#include "C=.h"
#undef shared
#elif defined HAVE_OPENMP
#include <omp.h>
#elif defined HAVE_GCD
...
...
@@ -113,8 +109,6 @@
#if defined HAVE_TBB
# define CV_PARALLEL_FRAMEWORK "tbb"
#elif defined HAVE_CSTRIPES
# define CV_PARALLEL_FRAMEWORK "cstripes"
#elif defined HAVE_OPENMP
# define CV_PARALLEL_FRAMEWORK "openmp"
#elif defined HAVE_GCD
...
...
@@ -385,8 +379,6 @@ namespace
tbb
::
parallel_for
(
tbb
::
blocked_range
<
int
>
(
range
.
start
,
range
.
end
),
*
this
);
}
};
#elif defined HAVE_CSTRIPES || defined HAVE_OPENMP
typedef
ParallelLoopBodyWrapper
ProxyLoopBody
;
#elif defined HAVE_GCD
typedef
ParallelLoopBodyWrapper
ProxyLoopBody
;
static
void
block_function
(
void
*
context
,
size_t
index
)
...
...
@@ -419,8 +411,6 @@ static int numThreads = -1;
#else
static
tbb
::
task_scheduler_init
tbbScheduler
(
tbb
::
task_scheduler_init
::
deferred
);
#endif
#elif defined HAVE_CSTRIPES
// nothing for C=
#elif defined HAVE_OPENMP
static
int
numThreadsMax
=
omp_get_max_threads
();
#elif defined HAVE_GCD
...
...
@@ -520,17 +510,6 @@ static void parallel_for_impl(const cv::Range& range, const cv::ParallelLoopBody
pbody
();
#endif
#elif defined HAVE_CSTRIPES
parallel
(
MAX
(
0
,
numThreads
))
{
int
offset
=
stripeRange
.
start
;
int
len
=
stripeRange
.
end
-
offset
;
Range
r
(
offset
+
CPX_RANGE_START
(
len
),
offset
+
CPX_RANGE_END
(
len
));
pbody
(
r
);
barrier
();
}
#elif defined HAVE_OPENMP
#pragma omp parallel for schedule(dynamic) num_threads(numThreads > 0 ? numThreads : numThreadsMax)
...
...
@@ -602,12 +581,6 @@ int cv::getNumThreads(void)
:
tbb
::
task_scheduler_init
::
default_num_threads
();
#endif
#elif defined HAVE_CSTRIPES
return
numThreads
>
0
?
numThreads
:
cv
::
getNumberOfCPUs
();
#elif defined HAVE_OPENMP
return
numThreads
>
0
...
...
@@ -682,10 +655,6 @@ void cv::setNumThreads( int threads_ )
if
(
threads
>
0
)
tbbScheduler
.
initialize
(
threads
);
#endif
#elif defined HAVE_CSTRIPES
return
;
// nothing needed
#elif defined HAVE_OPENMP
return
;
// nothing needed as num_threads clause is used in #pragma omp parallel for
...
...
@@ -735,8 +704,6 @@ int cv::getThreadNum(void)
#else
return
0
;
#endif
#elif defined HAVE_CSTRIPES
return
pix
();
#elif defined HAVE_OPENMP
return
omp_get_thread_num
();
#elif defined HAVE_GCD
...
...
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