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"]
|
||||
path = external/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>
|
||||
struct GetCacheLineIndexBits {
|
||||
static int constexpr value = 0;
|
||||
};
|
||||
template<>
|
||||
struct GetCacheLineIndexBits<64> {
|
||||
static int constexpr value = 6;
|
||||
};
|
||||
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<size_t elements_per_cache_line> struct GetCacheLineIndexBits { static int constexpr value = 0; };
|
||||
template<> struct GetCacheLineIndexBits<64> { static int constexpr value = 6; };
|
||||
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>
|
||||
struct GetIndexShuffleBits {
|
||||
|
|
@ -321,7 +300,7 @@ public:
|
|||
static_cast<Derived&>(*this).do_push(std::forward<T>(element), head);
|
||||
}
|
||||
|
||||
Derived& pop() noexcept {
|
||||
Derived pop() noexcept {
|
||||
unsigned tail;
|
||||
if(Derived::spsc_) {
|
||||
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_);
|
||||
}
|
||||
|
||||
unsigned size() const noexcept {
|
||||
unsigned capacity() const noexcept {
|
||||
return static_cast<Derived const&>(*this).size_;
|
||||
}
|
||||
};
|
||||
|
|
@ -491,7 +470,7 @@ public:
|
|||
|
||||
void swap(AtomicQueueB& b) noexcept {
|
||||
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(size_, b.size_);
|
||||
swap(elements_, b.elements_);
|
||||
|
|
@ -532,13 +511,13 @@ class AtomicQueueB2 : public AtomicQueueCommon<AtomicQueueB2<T, A, MAXIMIZE_THRO
|
|||
static_assert(SHUFFLE_BITS, "Unexpected SHUFFLE_BITS.");
|
||||
|
||||
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]);
|
||||
}
|
||||
|
||||
template<class U>
|
||||
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]);
|
||||
}
|
||||
|
||||
|
|
@ -588,7 +567,7 @@ public:
|
|||
|
||||
void swap(AtomicQueueB2& b) noexcept {
|
||||
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<AllocatorStates&>(*this), static_cast<AllocatorStates&>(b));
|
||||
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 {
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define ATOMIC_QUEUE_LIKELY(expr) __builtin_expect(static_cast<bool>(expr), 1)
|
||||
#define ATOMIC_QUEUE_UNLIKELY(expr) __builtin_expect(static_cast<bool>(expr), 0)
|
||||
#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>
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// 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
|
||||
// list of conditions and the following disclaimer.
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software without
|
||||
// specific prior written permission.
|
||||
//
|
||||
// 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.
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
//
|
||||
//---------------------------------------------------------------------------------------
|
||||
//
|
||||
|
|
@ -177,7 +169,7 @@
|
|||
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
// ghc::filesystem version in decimal (major * 10000 + minor * 100 + patch)
|
||||
#define GHC_FILESYSTEM_VERSION 10211L
|
||||
#define GHC_FILESYSTEM_VERSION 10300L
|
||||
|
||||
namespace ghc {
|
||||
namespace filesystem {
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ sfz::FilePromisePtr sfz::FilePool::getFilePromise(const std::string& filename) n
|
|||
promise->creationTime = std::chrono::high_resolution_clock::now();
|
||||
|
||||
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 {};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue