Skip to content

Commit

Permalink
Include <cstdint> in all files that use std::int*_t or std::uint*_t t…
Browse files Browse the repository at this point in the history
…ypes

The missing include in AnnService/inc/Helper/DiskIO.h
causes a build failure when building with GCC 13 on Linux.

Fixes: https://bugs.debian.org/1037866
Fixes: microsoft#389
  • Loading branch information
pabs3 committed Jun 16, 2023
1 parent 9633d32 commit 3d7556e
Show file tree
Hide file tree
Showing 74 changed files with 108 additions and 7 deletions.
1 change: 1 addition & 0 deletions AnnService/inc/Aggregator/AggregatorExecutionContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <memory>
#include <atomic>
#include <cstdint>

namespace SPTAG
{
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Aggregator/AggregatorSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "../Core/Common.h"

#include <string>
#include <cstdint>

namespace SPTAG
{
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Client/ClientWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <mutex>
#include <condition_variable>
#include <functional>
#include <cstdint>

namespace SPTAG
{
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Client/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <string>
#include <vector>
#include <memory>
#include <cstdint>

namespace SPTAG
{
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Core/BKT/Index.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include <functional>
#include <shared_mutex>
#include <cstdint>

namespace SPTAG
{
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Core/Common/BKTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <vector>
#include <mutex>
#include <shared_mutex>
#include <cstdint>

#include "inc/Core/VectorIndex.h"

Expand Down
3 changes: 2 additions & 1 deletion AnnService/inc/Core/Common/Dataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "inc/Helper/Logging.h"
#include <stdexcept>
#include <sstream>
#include <cstdint>

namespace SPTAG
{
Expand Down Expand Up @@ -237,4 +238,4 @@ namespace SPTAG
}
}

#endif // _SPTAG_COMMON_DATASET_H_
#endif // _SPTAG_COMMON_DATASET_H_
1 change: 1 addition & 0 deletions AnnService/inc/Core/Common/DistanceUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <functional>
#include <iostream>
#include <cstdint>

#include "CommonUtils.h"
#include "InstructionUtils.h"
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Core/Common/KDTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <string>
#include <mutex>
#include <shared_mutex>
#include <cstdint>

#include "inc/Core/VectorIndex.h"

Expand Down
2 changes: 2 additions & 0 deletions AnnService/inc/Core/Common/Labelset.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#define _SPTAG_COMMON_LABELSET_H_

#include <atomic>
#include <cstdint>

#include "Dataset.h"

namespace SPTAG
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Core/Common/NeighborhoodGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <chrono>
#include <queue>
#include <atomic>
#include <cstdint>

#if defined(GPU)
#include <cuda.h>
Expand Down
2 changes: 2 additions & 0 deletions AnnService/inc/Core/Common/OPQQuantizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

#include "PQQuantizer.h"

#include <cstdint>

#if (__cplusplus < 201703L)
#define ISNOTSAME(A, B) if (!std::is_same<A, B>::value)
#else
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Core/Common/PQQuantizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <memory>
#include <cassert>
#include <cstring>
#include <cstdint>


namespace SPTAG
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Core/Common/SIMDUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <functional>
#include <iostream>
#include <cstdint>

#include "CommonUtils.h"
#include "InstructionUtils.h"
Expand Down
2 changes: 2 additions & 0 deletions AnnService/inc/Core/CommonDataStructure.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include "inc/Core/Common.h"

#include <cstdint>

namespace SPTAG
{

Expand Down
4 changes: 3 additions & 1 deletion AnnService/inc/Core/DefinitionList.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#include <cstdint>

#ifdef DefineVectorValueType

DefineVectorValueType(Int8, std::int8_t)
Expand Down Expand Up @@ -139,4 +141,4 @@ DefineNumaStrategy(SCATTER)
DefineOrderStrategy(ASC)
DefineOrderStrategy(DESC)

#endif // DefineOrderStrategy
#endif // DefineOrderStrategy
1 change: 1 addition & 0 deletions AnnService/inc/Core/KDT/Index.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include <functional>
#include <shared_mutex>
#include <cstdint>

namespace SPTAG
{
Expand Down
2 changes: 2 additions & 0 deletions AnnService/inc/Core/MetadataSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include "CommonDataStructure.h"

#include <cstdint>

namespace SPTAG
{

Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Core/SPANN/ExtraFullGraphSearcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <climits>
#include <future>
#include <numeric>
#include <cstdint>

namespace SPTAG
{
Expand Down
3 changes: 2 additions & 1 deletion AnnService/inc/Core/SPANN/IExtraSearcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <vector>
#include <chrono>
#include <atomic>
#include <cstdint>

namespace SPTAG {
namespace SPANN {
Expand Down Expand Up @@ -210,4 +211,4 @@ namespace SPTAG {
} // SPANN
} // SPTAG

#endif // _SPTAG_SPANN_IEXTRASEARCHER_H_
#endif // _SPTAG_SPANN_IEXTRASEARCHER_H_
1 change: 1 addition & 0 deletions AnnService/inc/Core/SPANN/Index.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <functional>
#include <shared_mutex>
#include <cstdint>

namespace SPTAG
{
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Core/SearchQuery.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "SearchResult.h"

#include <cstring>
#include <cstdint>

namespace SPTAG
{
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Core/VectorIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "MetadataSet.h"
#include "inc/Helper/SimpleIniReader.h"
#include <unordered_set>
#include <cstdint>
#include "inc/Core/Common/IQuantizer.h"
#include "inc/Core/Common/WorkSpace.h"

Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Helper/Concurrent.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <atomic>
#include <condition_variable>
#include <mutex>
#include <cstdint>


namespace SPTAG
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Helper/DiskIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <fstream>
#include <string.h>
#include <memory>
#include <cstdint>

namespace SPTAG
{
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Helper/StringConvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <cctype>
#include <limits>
#include <cerrno>
#include <cstdint>

namespace SPTAG
{
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Helper/VectorSetReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "inc/Helper/ArgumentsParser.h"

#include <memory>
#include <cstdint>

namespace SPTAG
{
Expand Down
2 changes: 2 additions & 0 deletions AnnService/inc/Helper/VectorSetReaders/MemoryReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include "inc/Helper/VectorSetReader.h"

#include <cstdint>

namespace SPTAG
{
namespace Helper
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Helper/VectorSetReaders/TxtReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <atomic>
#include <condition_variable>
#include <mutex>
#include <cstdint>

namespace SPTAG
{
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Server/SearchService.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <vector>
#include <thread>
#include <condition_variable>
#include <cstdint>

namespace SPTAG
{
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Socket/Client.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <memory>
#include <atomic>
#include <boost/asio.hpp>
#include <cstdint>

namespace SPTAG
{
Expand Down
1 change: 1 addition & 0 deletions AnnService/inc/Socket/ResourceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <deque>
#include <unordered_map>
#include <thread>
#include <cstdint>

namespace std
{
Expand Down
3 changes: 2 additions & 1 deletion AnnService/src/Aggregator/AggregatorContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "inc/Helper/SimpleIniReader.h"

#include <fstream>
#include <cstdint>

using namespace SPTAG;
using namespace SPTAG::Aggregator;
Expand Down Expand Up @@ -114,4 +115,4 @@ const std::shared_ptr<VectorSet>&
AggregatorContext::GetCenters() const
{
return m_centers;
}
}
2 changes: 2 additions & 0 deletions AnnService/src/Aggregator/AggregatorExecutionContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include "inc/Aggregator/AggregatorExecutionContext.h"

#include <cstdint>

using namespace SPTAG;
using namespace SPTAG::Aggregator;

Expand Down
2 changes: 2 additions & 0 deletions AnnService/src/Aggregator/AggregatorService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include "inc/Core/Common/DistanceUtils.h"
#include "inc/Helper/Base64Encode.h"

#include <cstdint>

using namespace SPTAG;
using namespace SPTAG::Aggregator;

Expand Down
2 changes: 2 additions & 0 deletions AnnService/src/BalancedDataPartition/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <thread>
#include <cstdlib>
#include <algorithm>
#include <cstdint>

#include "inc/Core/Common/DistanceUtils.h"
#include "inc/Core/Common/Dataset.h"
#include "inc/Core/Common/BKTree.h"
Expand Down
2 changes: 2 additions & 0 deletions AnnService/src/Client/ClientWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

#include "inc/Client/ClientWrapper.h"

#include <cstdint>

using namespace SPTAG;
using namespace SPTAG::Socket;
using namespace SPTAG::Client;
Expand Down
1 change: 1 addition & 0 deletions AnnService/src/Client/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <cstdio>
#include <atomic>
#include <iostream>
#include <cstdint>

using namespace SPTAG;

Expand Down
1 change: 1 addition & 0 deletions AnnService/src/Core/BKT/BKTIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "inc/Core/BKT/Index.h"
#include <chrono>
#include <mutex>
#include <cstdint>

#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
Expand Down
2 changes: 2 additions & 0 deletions AnnService/src/Core/Common/DistanceUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include "inc/Core/Common/DistanceUtils.h"

#include <cstdint>

using namespace SPTAG;
using namespace SPTAG::COMMON;

Expand Down
2 changes: 2 additions & 0 deletions AnnService/src/Core/Common/IQuantizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <inc/Core/Common/OPQQuantizer.h>
#include <inc/Helper/StringConvert.h>

#include <cstdint>

namespace SPTAG
{
namespace COMMON
Expand Down
2 changes: 2 additions & 0 deletions AnnService/src/Core/Common/SIMDUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include "inc/Core/Common/SIMDUtils.h"

#include <cstdint>

using namespace SPTAG;
using namespace SPTAG::COMMON;

Expand Down
1 change: 1 addition & 0 deletions AnnService/src/Core/KDT/KDTIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "inc/Core/KDT/Index.h"
#include <chrono>
#include <mutex>
#include <cstdint>

#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
Expand Down
1 change: 1 addition & 0 deletions AnnService/src/Core/MetadataSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <string.h>
#include <mutex>
#include <shared_mutex>
#include <cstdint>

using namespace SPTAG;

Expand Down
Loading

0 comments on commit 3d7556e

Please sign in to comment.