summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-06-22 07:27:36 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-06-22 07:27:36 +0200
commit0ebf074be440dc5ba30802fdccfc786c6d4acbd7 (patch)
tree0545c270b4a58ca65b3b1a66466de9521c2a10da /compat
parentfdbc5017ede5dc0f31e1fa61aa8dc254810558ac (diff)
tracker/pt: replace point extraction algorithm
Profiling over a longer time period showed a bottleneck while iterating pixels with `cv::floodFill()'. Contours are actually faster, and we have MeanShift to establish the proper center basing on pixel intensities.
Diffstat (limited to 'compat')
-rw-r--r--compat/util.hpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/compat/util.hpp b/compat/util.hpp
index 3a53e203..4ad01544 100644
--- a/compat/util.hpp
+++ b/compat/util.hpp
@@ -94,29 +94,29 @@ auto qptr(xs... args)
template<typename t> using qshared = QSharedPointer<t>;
#if defined _MSC_VER
-# define OTR_NEVER_INLINE __declspec(noinline)
+# define never_inline __declspec(noinline)
#elif defined __GNUG__
-# define OTR_NEVER_INLINE __attribute__((noinline))
+# define never_inline __attribute__((noinline))
#else
-# define OTR_NEVER_INLINE
+# define never_inline
#endif
#if defined _MSC_VER || defined __GNUG__
-# define OTR_RESTRICT __restrict
+# define restrict __restrict
#else
-# define OTR_RESTRICT
+# define restrict
#endif
#if defined _MSC_VER
-# define OTR_ALWAYS_INLINE __forceinline
+# define force_inline __forceinline
#elif defined __GNUG__
-# define OTR_ALWAYS_INLINE __attribute__((always_inline))
+# define force_inline __attribute__((always_inline, gnu_inline))
#else
-# define OTR_ALWAYS_INLINE inline
+# define force_inline inline
#endif
#if defined __GNUG__
-# define OTR_FLATTEN __attribute__((flatten))
+# define flatten __attribute__((flatten, noinline))
#else
-# define OTR_FLATTEN OTR_ALWAYS_INLINE
+# define flatten
#endif