From bd9c25d1409325ac45ebeb7f1e8fc87d03ec478c Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Sat, 6 Nov 2021 10:54:31 +0800 Subject: [PATCH] Add mutex includes where std::unique_lock is used Fixes build failures due to std::unique_lock being missing: AnnService/inc/Core/Common/BKTree.h:409:22: error: 'unique_lock' is not a member of 'std' 409 | std::unique_lock lock(*m_lock); | ^~~~~~~~~~~ Fixes: https://github.com/microsoft/SPTAG/issues/243 --- AnnService/inc/Core/Common/BKTree.h | 1 + AnnService/inc/Core/Common/KDTree.h | 1 + AnnService/inc/Helper/ConcurrentSet.h | 1 + AnnService/src/Client/ClientWrapper.cpp | 2 ++ AnnService/src/Core/BKT/BKTIndex.cpp | 1 + AnnService/src/Core/KDT/KDTIndex.cpp | 1 + AnnService/src/Core/MetadataSet.cpp | 1 + AnnService/src/Helper/Concurrent.cpp | 2 ++ 8 files changed, 10 insertions(+) diff --git a/AnnService/inc/Core/Common/BKTree.h b/AnnService/inc/Core/Common/BKTree.h index 371ec7fb..3c7ec9be 100644 --- a/AnnService/inc/Core/Common/BKTree.h +++ b/AnnService/inc/Core/Common/BKTree.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "inc/Core/VectorIndex.h" diff --git a/AnnService/inc/Core/Common/KDTree.h b/AnnService/inc/Core/Common/KDTree.h index 23c7b6b8..ec889965 100644 --- a/AnnService/inc/Core/Common/KDTree.h +++ b/AnnService/inc/Core/Common/KDTree.h @@ -6,6 +6,7 @@ #include #include +#include #include #include "inc/Core/VectorIndex.h" diff --git a/AnnService/inc/Helper/ConcurrentSet.h b/AnnService/inc/Helper/ConcurrentSet.h index 1dfdf447..c4360196 100644 --- a/AnnService/inc/Helper/ConcurrentSet.h +++ b/AnnService/inc/Helper/ConcurrentSet.h @@ -5,6 +5,7 @@ #define _SPTAG_HELPER_CONCURRENTSET_H_ #ifndef _MSC_VER +#include #include #include #include diff --git a/AnnService/src/Client/ClientWrapper.cpp b/AnnService/src/Client/ClientWrapper.cpp index c868b9ef..396e912c 100644 --- a/AnnService/src/Client/ClientWrapper.cpp +++ b/AnnService/src/Client/ClientWrapper.cpp @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#include + #include "inc/Client/ClientWrapper.h" using namespace SPTAG; diff --git a/AnnService/src/Core/BKT/BKTIndex.cpp b/AnnService/src/Core/BKT/BKTIndex.cpp index a2676959..5df6f9e8 100644 --- a/AnnService/src/Core/BKT/BKTIndex.cpp +++ b/AnnService/src/Core/BKT/BKTIndex.cpp @@ -3,6 +3,7 @@ #include "inc/Core/BKT/Index.h" #include +#include #pragma warning(disable:4242) // '=' : conversion from 'int' to 'short', possible loss of data #pragma warning(disable:4244) // '=' : conversion from 'int' to 'short', possible loss of data diff --git a/AnnService/src/Core/KDT/KDTIndex.cpp b/AnnService/src/Core/KDT/KDTIndex.cpp index c97fdbce..7ec6a75f 100644 --- a/AnnService/src/Core/KDT/KDTIndex.cpp +++ b/AnnService/src/Core/KDT/KDTIndex.cpp @@ -3,6 +3,7 @@ #include "inc/Core/KDT/Index.h" #include +#include #pragma warning(disable:4242) // '=' : conversion from 'int' to 'short', possible loss of data #pragma warning(disable:4244) // '=' : conversion from 'int' to 'short', possible loss of data diff --git a/AnnService/src/Core/MetadataSet.cpp b/AnnService/src/Core/MetadataSet.cpp index c6ab2504..6aa5e67c 100644 --- a/AnnService/src/Core/MetadataSet.cpp +++ b/AnnService/src/Core/MetadataSet.cpp @@ -4,6 +4,7 @@ #include "inc/Core/MetadataSet.h" #include +#include #include using namespace SPTAG; diff --git a/AnnService/src/Helper/Concurrent.cpp b/AnnService/src/Helper/Concurrent.cpp index cbb1bdb6..fd841b16 100644 --- a/AnnService/src/Helper/Concurrent.cpp +++ b/AnnService/src/Helper/Concurrent.cpp @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#include + #include "inc/Helper/Concurrent.h" using namespace SPTAG;