Merge pull request #121 from paulfd/update-libs
Update the external libraries
This commit is contained in:
commit
19a4395045
6 changed files with 33 additions and 61 deletions
1
.gitmodules
vendored
1
.gitmodules
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
[submodule "external/abseil-cpp"]
|
[submodule "external/abseil-cpp"]
|
||||||
path = external/abseil-cpp
|
path = external/abseil-cpp
|
||||||
url = https://github.com/abseil/abseil-cpp
|
url = https://github.com/abseil/abseil-cpp
|
||||||
|
branch = lts_2020_02_25
|
||||||
|
|
|
||||||
2
external/abseil-cpp
vendored
2
external/abseil-cpp
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0f86336b6939ea673cc1cbe29189286cae67d63a
|
Subproject commit df3ea785d8c30a9503321a3d35ee7d35808f190d
|
||||||
47
src/external/atomic_queue/atomic_queue.h
vendored
47
src/external/atomic_queue/atomic_queue.h
vendored
|
|
@ -28,34 +28,13 @@ namespace details {
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
template<size_t elements_per_cache_line>
|
template<size_t elements_per_cache_line> struct GetCacheLineIndexBits { static int constexpr value = 0; };
|
||||||
struct GetCacheLineIndexBits {
|
template<> struct GetCacheLineIndexBits<64> { static int constexpr value = 6; };
|
||||||
static int constexpr value = 0;
|
template<> struct GetCacheLineIndexBits<32> { static int constexpr value = 5; };
|
||||||
};
|
template<> struct GetCacheLineIndexBits<16> { static int constexpr value = 4; };
|
||||||
template<>
|
template<> struct GetCacheLineIndexBits< 8> { static int constexpr value = 3; };
|
||||||
struct GetCacheLineIndexBits<64> {
|
template<> struct GetCacheLineIndexBits< 4> { static int constexpr value = 2; };
|
||||||
static int constexpr value = 6;
|
template<> struct GetCacheLineIndexBits< 2> { static int constexpr value = 1; };
|
||||||
};
|
|
||||||
template<>
|
|
||||||
struct GetCacheLineIndexBits<32> {
|
|
||||||
static int constexpr value = 5;
|
|
||||||
};
|
|
||||||
template<>
|
|
||||||
struct GetCacheLineIndexBits<16> {
|
|
||||||
static int constexpr value = 4;
|
|
||||||
};
|
|
||||||
template<>
|
|
||||||
struct GetCacheLineIndexBits<8> {
|
|
||||||
static int constexpr value = 3;
|
|
||||||
};
|
|
||||||
template<>
|
|
||||||
struct GetCacheLineIndexBits<4> {
|
|
||||||
static int constexpr value = 2;
|
|
||||||
};
|
|
||||||
template<>
|
|
||||||
struct GetCacheLineIndexBits<2> {
|
|
||||||
static int constexpr value = 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<bool minimize_contention, unsigned array_size, size_t elements_per_cache_line>
|
template<bool minimize_contention, unsigned array_size, size_t elements_per_cache_line>
|
||||||
struct GetIndexShuffleBits {
|
struct GetIndexShuffleBits {
|
||||||
|
|
@ -321,7 +300,7 @@ public:
|
||||||
static_cast<Derived&>(*this).do_push(std::forward<T>(element), head);
|
static_cast<Derived&>(*this).do_push(std::forward<T>(element), head);
|
||||||
}
|
}
|
||||||
|
|
||||||
Derived& pop() noexcept {
|
Derived pop() noexcept {
|
||||||
unsigned tail;
|
unsigned tail;
|
||||||
if(Derived::spsc_) {
|
if(Derived::spsc_) {
|
||||||
tail = tail_.load(X);
|
tail = tail_.load(X);
|
||||||
|
|
@ -342,7 +321,7 @@ public:
|
||||||
return static_cast<int>(head_.load(X) - tail_.load(X)) >= static_cast<int>(static_cast<Derived const&>(*this).size_);
|
return static_cast<int>(head_.load(X) - tail_.load(X)) >= static_cast<int>(static_cast<Derived const&>(*this).size_);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned size() const noexcept {
|
unsigned capacity() const noexcept {
|
||||||
return static_cast<Derived const&>(*this).size_;
|
return static_cast<Derived const&>(*this).size_;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -491,7 +470,7 @@ public:
|
||||||
|
|
||||||
void swap(AtomicQueueB& b) noexcept {
|
void swap(AtomicQueueB& b) noexcept {
|
||||||
using std::swap;
|
using std::swap;
|
||||||
swap(static_cast<Base&>(*this), static_cast<Base&>(b));
|
this->Base::swap(b);
|
||||||
swap(static_cast<AllocatorElements&>(*this), static_cast<AllocatorElements&>(b));
|
swap(static_cast<AllocatorElements&>(*this), static_cast<AllocatorElements&>(b));
|
||||||
swap(size_, b.size_);
|
swap(size_, b.size_);
|
||||||
swap(elements_, b.elements_);
|
swap(elements_, b.elements_);
|
||||||
|
|
@ -532,13 +511,13 @@ class AtomicQueueB2 : public AtomicQueueCommon<AtomicQueueB2<T, A, MAXIMIZE_THRO
|
||||||
static_assert(SHUFFLE_BITS, "Unexpected SHUFFLE_BITS.");
|
static_assert(SHUFFLE_BITS, "Unexpected SHUFFLE_BITS.");
|
||||||
|
|
||||||
T do_pop(unsigned tail) noexcept {
|
T do_pop(unsigned tail) noexcept {
|
||||||
unsigned index = details::remap_index<SHUFFLE_BITS>(tail % (size_ - 1));
|
unsigned index = details::remap_index<SHUFFLE_BITS>(tail & (size_ - 1));
|
||||||
return Base::template do_pop_any(states_[index], elements_[index]);
|
return Base::template do_pop_any(states_[index], elements_[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class U>
|
template<class U>
|
||||||
void do_push(U&& element, unsigned head) noexcept {
|
void do_push(U&& element, unsigned head) noexcept {
|
||||||
unsigned index = details::remap_index<SHUFFLE_BITS>(head % (size_ - 1));
|
unsigned index = details::remap_index<SHUFFLE_BITS>(head & (size_ - 1));
|
||||||
Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
|
Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -588,7 +567,7 @@ public:
|
||||||
|
|
||||||
void swap(AtomicQueueB2& b) noexcept {
|
void swap(AtomicQueueB2& b) noexcept {
|
||||||
using std::swap;
|
using std::swap;
|
||||||
swap(static_cast<Base&>(*this), static_cast<Base&>(b));
|
this->Base::swap(b);
|
||||||
swap(static_cast<AllocatorElements&>(*this), static_cast<AllocatorElements&>(b));
|
swap(static_cast<AllocatorElements&>(*this), static_cast<AllocatorElements&>(b));
|
||||||
swap(static_cast<AllocatorStates&>(*this), static_cast<AllocatorStates&>(b));
|
swap(static_cast<AllocatorStates&>(*this), static_cast<AllocatorStates&>(b));
|
||||||
swap(size_, b.size_);
|
swap(size_, b.size_);
|
||||||
|
|
|
||||||
2
src/external/atomic_queue/defs.h
vendored
2
src/external/atomic_queue/defs.h
vendored
|
|
@ -45,7 +45,7 @@ static inline void spin_loop_pause() noexcept {
|
||||||
|
|
||||||
namespace atomic_queue {
|
namespace atomic_queue {
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
#define ATOMIC_QUEUE_LIKELY(expr) __builtin_expect(static_cast<bool>(expr), 1)
|
#define ATOMIC_QUEUE_LIKELY(expr) __builtin_expect(static_cast<bool>(expr), 1)
|
||||||
#define ATOMIC_QUEUE_UNLIKELY(expr) __builtin_expect(static_cast<bool>(expr), 0)
|
#define ATOMIC_QUEUE_UNLIKELY(expr) __builtin_expect(static_cast<bool>(expr), 0)
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
40
src/external/ghc/filesystem.hpp
vendored
40
src/external/ghc/filesystem.hpp
vendored
|
|
@ -5,32 +5,24 @@
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Copyright (c) 2018, Steffen Schümann <s.schuemann@pobox.com>
|
// Copyright (c) 2018, Steffen Schümann <s.schuemann@pobox.com>
|
||||||
// All rights reserved.
|
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without modification,
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
// are permitted provided that the following conditions are met:
|
// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
// in the Software without restriction, including without limitation the rights
|
||||||
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
// copies of the Software, and to permit persons to whom the Software is
|
||||||
|
// furnished to do so, subject to the following conditions:
|
||||||
//
|
//
|
||||||
// 1. Redistributions of source code must retain the above copyright notice, this
|
// The above copyright notice and this permission notice shall be included in all
|
||||||
// list of conditions and the following disclaimer.
|
// copies or substantial portions of the Software.
|
||||||
//
|
//
|
||||||
// 2. Redistributions in binary form must reproduce the above copyright notice,
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
// this list of conditions and the following disclaimer in the documentation
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
// and/or other materials provided with the distribution.
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
//
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
// 3. Neither the name of the copyright holder nor the names of its contributors
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
// may be used to endorse or promote products derived from this software without
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
// specific prior written permission.
|
// SOFTWARE.
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
|
@ -177,7 +169,7 @@
|
||||||
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
// ghc::filesystem version in decimal (major * 10000 + minor * 100 + patch)
|
// ghc::filesystem version in decimal (major * 10000 + minor * 100 + patch)
|
||||||
#define GHC_FILESYSTEM_VERSION 10211L
|
#define GHC_FILESYSTEM_VERSION 10300L
|
||||||
|
|
||||||
namespace ghc {
|
namespace ghc {
|
||||||
namespace filesystem {
|
namespace filesystem {
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ sfz::FilePromisePtr sfz::FilePool::getFilePromise(const std::string& filename) n
|
||||||
promise->creationTime = std::chrono::high_resolution_clock::now();
|
promise->creationTime = std::chrono::high_resolution_clock::now();
|
||||||
|
|
||||||
if (!promiseQueue.try_push(promise)) {
|
if (!promiseQueue.try_push(promise)) {
|
||||||
DBG("[sfizz] Could not enqueue the promise for " << filename << " (queue size " << promiseQueue.size() << ")");
|
DBG("[sfizz] Could not enqueue the promise for " << filename << " (queue capacity " << promiseQueue.capacity() << ")");
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue