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
f8e187e1
Commit
f8e187e1
authored
Jun 25, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Jun 25, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1035 from SpecLad:cv-concurrency
parents
e6784ca8
c16316c4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
32 deletions
+42
-32
internal.hpp
modules/core/include/opencv2/core/internal.hpp
+6
-25
parallel.cpp
modules/core/src/parallel.cpp
+31
-0
precomp.hpp
modules/ts/src/precomp.hpp
+0
-1
ts_func.cpp
modules/ts/src/ts_func.cpp
+5
-6
No files found.
modules/core/include/opencv2/core/internal.hpp
View file @
f8e187e1
...
...
@@ -50,7 +50,8 @@
#include <vector>
#include "cvconfig.h"
#include "opencv2/core/core.hpp"
#include "opencv2/core/types_c.h"
#if defined WIN32 || defined _WIN32
# ifndef WIN32
...
...
@@ -186,30 +187,6 @@ CV_INLINE IppiSize ippiSize(int width, int height)
# include "opencv2/core/eigen.hpp"
#endif
#ifdef _OPENMP
# define HAVE_OPENMP
#endif
#ifdef __APPLE__
# define HAVE_GCD
#endif
#if defined _MSC_VER && _MSC_VER >= 1600
# define HAVE_CONCURRENCY
#endif
#if defined HAVE_TBB && TBB_VERSION_MAJOR*100 + TBB_VERSION_MINOR >= 202
# 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
# define CV_PARALLEL_FRAMEWORK "gcd"
#elif defined HAVE_CONCURRENCY
# define CV_PARALLEL_FRAMEWORK "ms-concurrency"
#endif
#ifdef __cplusplus
namespace
cv
...
...
@@ -277,6 +254,10 @@ namespace cv
body
(
range
);
}
#endif
// Returns a static string if there is a parallel framework,
// NULL otherwise.
CV_EXPORTS
const
char
*
currentParallelFramework
();
}
//namespace cv
#define CV_INIT_ALGORITHM(classname, algname, memberinit) \
...
...
modules/core/src/parallel.cpp
View file @
f8e187e1
...
...
@@ -61,6 +61,17 @@
#endif
#endif
#ifdef _OPENMP
#define HAVE_OPENMP
#endif
#ifdef __APPLE__
#define HAVE_GCD
#endif
#if defined _MSC_VER && _MSC_VER >= 1600
#define HAVE_CONCURRENCY
#endif
/* IMPORTANT: always use the same order of defines
1. HAVE_TBB - 3rdparty library, should be explicitly enabled
...
...
@@ -99,6 +110,18 @@
#endif
#endif
#if defined HAVE_TBB && TBB_VERSION_MAJOR*100 + TBB_VERSION_MINOR >= 202
# 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
# define CV_PARALLEL_FRAMEWORK "gcd"
#elif defined HAVE_CONCURRENCY
# define CV_PARALLEL_FRAMEWORK "ms-concurrency"
#endif
namespace
cv
{
ParallelLoopBody
::~
ParallelLoopBody
()
{}
...
...
@@ -465,6 +488,14 @@ int cv::getNumberOfCPUs(void)
#endif
}
const
char
*
cv
::
currentParallelFramework
()
{
#ifdef CV_PARALLEL_FRAMEWORK
return
CV_PARALLEL_FRAMEWORK
;
#else
return
NULL
;
#endif
}
CV_IMPL
void
cvSetNumThreads
(
int
nt
)
{
cv
::
setNumThreads
(
nt
);
...
...
modules/ts/src/precomp.hpp
View file @
f8e187e1
#include "opencv2/core/core.hpp"
#include "opencv2/core/core_c.h"
#include "opencv2/core/internal.hpp"
#include "opencv2/ts/ts.hpp"
...
...
modules/ts/src/ts_func.cpp
View file @
f8e187e1
...
...
@@ -2965,13 +2965,12 @@ void printVersionInfo(bool useStdOut)
if
(
useStdOut
)
std
::
cout
<<
"Inner VCS version: "
<<
ver
<<
std
::
endl
;
}
#ifdef CV_PARALLEL_FRAMEWORK
::
testing
::
Test
::
RecordProperty
(
"cv_parallel_framework"
,
CV_PARALLEL_FRAMEWORK
);
if
(
useStdOut
)
{
std
::
cout
<<
"Parallel framework: "
<<
CV_PARALLEL_FRAMEWORK
<<
std
::
endl
;
const
char
*
parallel_framework
=
currentParallelFramework
();
if
(
parallel_framework
)
{
::
testing
::
Test
::
RecordProperty
(
"cv_parallel_framework"
,
parallel_framework
);
if
(
useStdOut
)
std
::
cout
<<
"Parallel framework: "
<<
parallel_framework
<<
std
::
endl
;
}
#endif
std
::
string
cpu_features
;
...
...
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