Skip to content

Commit 5f6dfcb

Browse files
BillyONealras0219-msftJonLiu1993mathislogevicroms
authored
[tbb, pagmo2] Update TBB to 2021.5 and update pagmo2 to 2.18.0 (#26284)
* [tbb] Update to 2021.3.0 * [tbb] Add Threads dependency * [pagmo2] Update to support new TBB * [openvdb] Update to 8.1.0 * [embree2] Remove from baseline -- it is no longer receiving support from upstream * [usd] Mark as unsupported * [usd] Disable USD in CI due to policy PixarAnimationStudios/OpenUSD#1600 * [openvdb] Bump port-version * Update version database * [pagmo2] Fix vcpkg.json * update version * wip update * versions * [embree2] deprecate, [openvdb,usd] resolve conflicts, [tbb] update * Added libxml port. * Remove port version as it's initial port. * Added baseline version * Support only for windows and static * Allowed building debug version * update versions * Update ports/libxpm/portfile.cmake Co-authored-by: Thomas1664 <[email protected]> * Added new lines * Update ports/libxpm/vcpkg.json Co-authored-by: Thomas1664 <[email protected]> * Update ports/libxpm/portfile.cmake Co-authored-by: Thomas1664 <[email protected]> * Update ports/libxpm/vcpkg.json Co-authored-by: Thomas1664 <[email protected]> * Regenerated versions * Update ports/libxpm/vcpkg.json Co-authored-by: JonLiu1993 <[email protected]> * Libxpm is taken from gitlab now. * Dropped changes against master in original repo for libxpm. * Dropped libxpm from baseline * Dropped version for libxpm * Update cpuinfo * Updated date of version * Update version database * Removed support for arm32 & uwp as library is not supporting it. * Version regenerated * Update ports/cpuinfo/vcpkg.json Co-authored-by: Alexander Neumann <[email protected]> * Updated versions * Initial commit WIP * Fixed compilation of latest stable version * Dropped comments * Switch from version-string to version * Added versions * Fixed path of cmake files for other projects * Updated versions * Various modernization. * Fully mark embree2 as deprecated. * [pagmo2] Disable -Werror * [cctag] Fix finding and use of TBB. * [openvdb] Baseline the static versions because they exceed FFFFFFFF in size, and I'm not sure if that's fixable.... * [gazebo] Apply gazebosim/gazebo-classic#3174 patch to fix TBB. * Respond to failures in https://dev.azure.com/vcpkg/public/_build/results?buildId=76586 * [pagmo2] Add license. See https://github.com/esa/pagmo2/blob/19d774fbb6128124305225803f8c1ad9e2f95c8c/src/bfe.cpp#L5-L27 * [tbb] Add license. * [embree2] Add "license". * [tbb] Use vcpkg_cmake_config_fixup and fix version as requested by @LilyWangLL * [usd] Add usd is known broken message. * [embree2] Remove completely. * Fix version database. * Fix usd version database. * Fix wrong case on Linux. * Lowercase the tbb directory to get to their configs. * [cctag] minimize patches * [tbb] Apply supports expression fix suggested in #26284 (comment) * [usd] Add note about upstream issue. * [pagmo2] Minimize patch. Co-authored-by: Robert Schumacher <[email protected]> Co-authored-by: Jonliu1993 <[email protected]> Co-authored-by: Mathis Logemann <[email protected]> Co-authored-by: Victor Romero <[email protected]> Co-authored-by: Vladimír Aubrecht <[email protected]> Co-authored-by: Thomas1664 <[email protected]> Co-authored-by: JonLiu1993 <[email protected]> Co-authored-by: Alexander Neumann <[email protected]>
1 parent 20630e6 commit 5f6dfcb

32 files changed

+790
-365
lines changed

Diff for: ports/cctag/0001-fix-osx.patch

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
diff --git a/src/cctag/utils/Exceptions.hpp b/src/cctag/utils/Exceptions.hpp
2+
index 094d278..8647f76 100644
13
--- a/src/cctag/utils/Exceptions.hpp
24
+++ b/src/cctag/utils/Exceptions.hpp
3-
@@ -7,7 +7,7 @@
4-
*/
5+
@@ -8,6 +8,7 @@
56
#ifndef _CCTAG_EXCEPTIONS_HPP_
67
#define _CCTAG_EXCEPTIONS_HPP_
7-
-
8+
89
+#define _GNU_SOURCE
910
#include <boost/exception/diagnostic_information.hpp>
1011
#include <boost/exception/errinfo_file_name.hpp>

Diff for: ports/cctag/0002-find-tbb.patch

+173
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in
2+
index c5a82c0..3ce4719 100644
3+
--- a/cmake/Config.cmake.in
4+
+++ b/cmake/Config.cmake.in
5+
@@ -42,6 +42,7 @@
6+
include(CMakeFindDependencyMacro)
7+
8+
set(OpenCV_DIR @OpenCV_DIR@)
9+
+find_dependency(TBB)
10+
find_dependency(OpenCV)
11+
find_dependency(Eigen3 @CCTAG_EIGEN_REQUIRED_VERSION@)
12+
find_dependency(Boost 1.66 REQUIRED COMPONENTS @BOOST_REQUIRED_COMPONENTS@)
13+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
14+
index 7b64b83..5398ed4 100644
15+
--- a/src/CMakeLists.txt
16+
+++ b/src/CMakeLists.txt
17+
@@ -176,7 +176,8 @@ if(CCTAG_WITH_CUDA)
18+
${OpenCV_LIBS}
19+
Boost::date_time Boost::chrono Boost::thread Boost::serialization Boost::system Boost::filesystem Boost::atomic Boost::program_options Boost::timer Boost::math_c99
20+
Eigen3::Eigen
21+
- ${TBB_LIBRARIES} ${CUDA_CUDADEVRT_LIBRARY})
22+
+ TBB::tbb
23+
+ ${CUDA_CUDADEVRT_LIBRARY})
24+
25+
if(NOT MSVC)
26+
target_link_libraries(CCTag pthread dl)
27+
@@ -184,7 +185,7 @@ if(CCTAG_WITH_CUDA)
28+
29+
target_compile_definitions(CCTag
30+
PUBLIC -DCCTAG_WITH_CUDA
31+
- PRIVATE ${TBB_DEFINITIONS})
32+
+)
33+
34+
if(CCTAG_HAVE_SHFL_DOWN_SYNC)
35+
target_compile_definitions(CCTag PRIVATE "-DCCTAG_HAVE_SHFL_DOWN_SYNC")
36+
@@ -220,16 +221,13 @@ else() # without CUDA
37+
# get_target_property(testprop CCTag INTERFACE_INCLUDE_DIRECTORIES )
38+
# message(STATUS "testprop: ${testprop}")
39+
40+
- target_compile_definitions(CCTag
41+
- PRIVATE ${TBB_DEFINITIONS})
42+
43+
target_link_libraries(CCTag
44+
PUBLIC
45+
${OpenCV_LIBS}
46+
Eigen3::Eigen
47+
Boost::atomic Boost::chrono Boost::date_time Boost::filesystem Boost::serialization Boost::system Boost::thread Boost::timer Boost::math_c99
48+
- PRIVATE
49+
- ${TBB_LIBRARIES})
50+
+ TBB::tbb)
51+
52+
if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
53+
target_link_libraries(CCTag PRIVATE pthread dl)
54+
diff --git a/src/applications/CMakeLists.txt b/src/applications/CMakeLists.txt
55+
index 506d19b..c7154fc 100644
56+
--- a/src/applications/CMakeLists.txt
57+
+++ b/src/applications/CMakeLists.txt
58+
@@ -86,7 +86,7 @@ target_include_directories(detection PUBLIC
59+
)
60+
target_link_libraries(detection PUBLIC
61+
CCTag::CCTag
62+
- ${TBB_LIBRARIES}
63+
+ TBB::tbb
64+
${OpenCV_LIBS}
65+
Boost::filesystem Boost::program_options Boost::timer
66+
)
67+
diff --git a/src/cctag/Detection.cpp b/src/cctag/Detection.cpp
68+
index 21c47bf..a800fbc 100644
69+
--- a/src/cctag/Detection.cpp
70+
+++ b/src/cctag/Detection.cpp
71+
@@ -44,6 +44,7 @@
72+
#include <list>
73+
#include <utility>
74+
#include <memory>
75+
+#include <mutex>
76+
#ifdef CCTAG_WITH_CUDA
77+
#include <cctag/cuda/cctag_cuda_runtime.h> // only for debugging
78+
#endif // CCTAG_WITH_CUDA
79+
@@ -71,7 +72,7 @@ static void constructFlowComponentFromSeed(
80+
std::vector<CandidatePtr> & vCandidateLoopOne,
81+
const Parameters & params)
82+
{
83+
- static tbb::mutex G_SortMutex;
84+
+ static std::mutex G_SortMutex;
85+
86+
assert( seed );
87+
// Check if the seed has already been processed, i.e. belongs to an already
88+
@@ -102,7 +103,7 @@ static void constructFlowComponentFromSeed(
89+
}
90+
91+
{
92+
- tbb::mutex::scoped_lock lock(G_SortMutex);
93+
+ std::lock_guard<std::mutex> lock(G_SortMutex);
94+
candidate->_averageReceivedVote = (float) (nReceivedVote*nReceivedVote) / (float) nVotedPoints;
95+
auto it = std::lower_bound(vCandidateLoopOne.begin(), vCandidateLoopOne.end(), candidate,
96+
[](const CandidatePtr& c1, const CandidatePtr& c2) { return c1->_averageReceivedVote > c2->_averageReceivedVote; });
97+
@@ -119,8 +120,8 @@ static void completeFlowComponent(
98+
std::size_t runId,
99+
const Parameters & params)
100+
{
101+
- static tbb::spin_mutex G_UpdateMutex;
102+
- static tbb::mutex G_InsertMutex;
103+
+ static std::mutex G_UpdateMutex;
104+
+ static std::mutex G_InsertMutex;
105+
106+
try
107+
{
108+
@@ -171,7 +172,7 @@ static void completeFlowComponent(
109+
if (nSegmentCommon == -1)
110+
{
111+
{
112+
- tbb::spin_mutex::scoped_lock lock(G_UpdateMutex);
113+
+ std::lock_guard<std::mutex> lock(G_UpdateMutex);
114+
nLabel = nSegmentOut;
115+
++nSegmentOut;
116+
}
117+
@@ -239,7 +240,7 @@ static void completeFlowComponent(
118+
}
119+
120+
{
121+
- tbb::mutex::scoped_lock lock(G_InsertMutex);
122+
+ std::lock_guard<std::mutex> lock(G_InsertMutex);
123+
vCandidateLoopTwo.push_back(candidate);
124+
}
125+
126+
@@ -384,7 +385,7 @@ static void cctagDetectionFromEdgesLoopTwoIteration(
127+
float scale,
128+
const Parameters& params)
129+
{
130+
- static tbb::mutex G_InsertMutex;
131+
+ static std::mutex G_InsertMutex;
132+
133+
const Candidate& candidate = vCandidateLoopTwo[iCandidate];
134+
135+
@@ -543,7 +544,7 @@ static void cctagDetectionFromEdgesLoopTwoIteration(
136+
#endif
137+
138+
{
139+
- tbb::mutex::scoped_lock lock(G_InsertMutex);
140+
+ std::lock_guard<std::mutex> lock(G_InsertMutex);
141+
markers.push_back( tag ); // markers takes responsibility for delete
142+
}
143+
#ifdef CCTAG_SERIALIZE
144+
diff --git a/src/cctag/Identification.cpp b/src/cctag/Identification.cpp
145+
index 15c9d9b..99b616a 100644
146+
--- a/src/cctag/Identification.cpp
147+
+++ b/src/cctag/Identification.cpp
148+
@@ -29,6 +29,7 @@
149+
150+
#include <cmath>
151+
#include <vector>
152+
+#include <mutex>
153+
154+
#include <tbb/tbb.h>
155+
156+
@@ -71,7 +72,7 @@ bool orazioDistanceRobust(
157+
#endif // GRIFF_DEBUG
158+
159+
const size_t cut_count = cuts.size();
160+
- static tbb::mutex vscore_mutex;
161+
+ static std::mutex vscore_mutex;
162+
163+
tbb::parallel_for(size_t(0), cut_count, [&](size_t i) {
164+
const cctag::ImageCut& cut = cuts[i];
165+
@@ -183,7 +184,7 @@ bool orazioDistanceRobust(
166+
#endif // GRIFF_DEBUG
167+
168+
{
169+
- tbb::mutex::scoped_lock lock(vscore_mutex);
170+
+ std::lock_guard<std::mutex> lock(vscore_mutex);
171+
vScore[idSet.front().first].push_back(idSet.front().second);
172+
}
173+
}

Diff for: ports/cctag/portfile.cmake

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@ vcpkg_from_github(
66
HEAD_REF develop
77
PATCHES
88
0001-fix-osx.patch
9+
0002-find-tbb.patch # Includes changes similar to https://github.com/alicevision/CCTag/pull/178/
910
)
1011

12+
file(REMOVE "${SOURCE_PATH}/cmake/FindTBB.cmake" "${SOURCE_PATH}/src/applications/cmake/FindTBB.cmake")
13+
1114
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
1215
FEATURES
1316
cuda CCTAG_WITH_CUDA
1417
apps CCTAG_BUILD_APPS
1518
)
1619

1720
if("cuda" IN_LIST FEATURES)
18-
include(${CURRENT_INSTALLED_DIR}/share/cuda/vcpkg_find_cuda.cmake)
21+
include("${CURRENT_INSTALLED_DIR}/share/cuda/vcpkg_find_cuda.cmake")
1922
vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT)
2023
message(STATUS "CUDA_TOOLKIT_ROOT ${CUDA_TOOLKIT_ROOT}")
2124
endif()

Diff for: ports/cctag/vcpkg.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cctag",
33
"version-semver": "1.0.2",
4-
"port-version": 1,
4+
"port-version": 2,
55
"maintainers": "[email protected]",
66
"description": "Computer vision library for detecting CCTag markers made up of concentric circles",
77
"homepage": "https://github.com/alicevision/CCTag",

Diff for: ports/embree2/cmake_policy.patch

-14
This file was deleted.

Diff for: ports/embree2/portfile.cmake

-53
This file was deleted.

Diff for: ports/embree2/vcpkg.json

-15
This file was deleted.

0 commit comments

Comments
 (0)