Replaced the semi-public CV_PARALLEL_FRAMEWORK macro with a function.
That way, core/internal.hpp doesn't have to depend on cvconfig.h, which we don't ship.
This commit is contained in:
@@ -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) \
|
||||
|
Reference in New Issue
Block a user