├── data ├── refs1.lst ├── refs2.lst ├── refs1.fa ├── refs2.fa ├── rob-palindrome.lst ├── cycles.fa ├── rob-palindrome.fa └── reads.fq ├── src ├── dBG_Utilities.cpp ├── State_Read_Space.cpp ├── Kmer_Utility.cpp ├── Character_Buffer_Flusher.cpp ├── Maximal_Unitig_Scratch.cpp ├── Unitig_Scratch.cpp ├── Progress_Tracker.cpp ├── DNA_Utility.cpp ├── kmc_api │ ├── Virtual_Prefix_File.cpp │ └── mmer.cpp ├── Data_Logistics.cpp └── Async_Logger_Wrapper.cpp ├── include ├── fmt │ ├── posix.h │ └── LICENSE.rst ├── spdlog │ ├── fmt │ │ ├── bundled │ │ │ ├── posix.h │ │ │ └── LICENSE.rst │ │ ├── ostr.h │ │ └── fmt.h │ ├── details │ │ ├── windows_include.h │ │ ├── console_globals.h │ │ ├── synchronous_factory.h │ │ ├── log_msg_buffer.h │ │ ├── log_msg.h │ │ ├── null_mutex.h │ │ ├── log_msg-inl.h │ │ ├── periodic_worker.h │ │ ├── backtracer.h │ │ └── periodic_worker-inl.h │ ├── fwd.h │ ├── version.h │ ├── formatter.h │ ├── cfg │ │ ├── helpers.h │ │ ├── env.h │ │ ├── log_levels.h │ │ └── argv.h │ ├── sinks │ │ ├── sink-inl.h │ │ ├── sink.h │ │ ├── basic_file_sink-inl.h │ │ ├── msvc_sink.h │ │ ├── stdout_color_sinks-inl.h │ │ ├── null_sink.h │ │ └── ostream_sink.h │ └── LICENSE ├── kmc_api │ ├── stdafx.h │ └── kmer_defs.h ├── version.hpp ├── Output_Format.hpp ├── compact_vector │ ├── const_iterator_traits.hpp │ ├── prefetch_iterator_traits.hpp │ ├── parallel_iterator_traits.hpp │ └── LICENSE ├── boost │ ├── preprocessor │ │ ├── punctuation │ │ │ ├── comma.hpp │ │ │ ├── paren.hpp │ │ │ ├── comma_if.hpp │ │ │ └── remove_parens.hpp │ │ ├── facilities │ │ │ ├── empty.hpp │ │ │ ├── identity.hpp │ │ │ ├── expand.hpp │ │ │ ├── is_1.hpp │ │ │ ├── overload.hpp │ │ │ └── is_empty_or_1.hpp │ │ ├── detail │ │ │ ├── null.hpp │ │ │ ├── is_unary.hpp │ │ │ ├── is_binary.hpp │ │ │ └── is_nullary.hpp │ │ ├── if.hpp │ │ ├── dec.hpp │ │ ├── for.hpp │ │ ├── inc.hpp │ │ ├── max.hpp │ │ ├── min.hpp │ │ ├── slot.hpp │ │ ├── enum.hpp │ │ ├── while.hpp │ │ ├── comma.hpp │ │ ├── empty.hpp │ │ ├── expand.hpp │ │ ├── limits.hpp │ │ ├── repeat.hpp │ │ ├── expr_if.hpp │ │ ├── iterate.hpp │ │ ├── assert_msg.hpp │ │ ├── comma_if.hpp │ │ ├── identity.hpp │ │ ├── repeat_2nd.hpp │ │ ├── repeat_3rd.hpp │ │ ├── enum_params.hpp │ │ ├── enum_shifted.hpp │ │ ├── repeat_from_to.hpp │ │ ├── debug.hpp │ │ ├── repeat_from_to_2nd.hpp │ │ ├── repeat_from_to_3rd.hpp │ │ ├── enum_shifted_params.hpp │ │ ├── selection.hpp │ │ ├── seq │ │ │ ├── push_back.hpp │ │ │ ├── push_front.hpp │ │ │ ├── to_tuple.hpp │ │ │ ├── pop_front.hpp │ │ │ ├── to_array.hpp │ │ │ ├── subseq.hpp │ │ │ ├── insert.hpp │ │ │ ├── pop_back.hpp │ │ │ ├── remove.hpp │ │ │ ├── variadic_seq_to_seq.hpp │ │ │ └── first_n.hpp │ │ ├── comparison.hpp │ │ ├── enum_params_with_a_default.hpp │ │ ├── enum_params_with_defaults.hpp │ │ ├── iteration │ │ │ ├── self.hpp │ │ │ ├── detail │ │ │ │ └── self.hpp │ │ │ └── local.hpp │ │ ├── repetition │ │ │ ├── enum_params_with_defaults.hpp │ │ │ ├── enum_params_with_a_default.hpp │ │ │ ├── deduce_r.hpp │ │ │ └── deduce_z.hpp │ │ ├── arithmetic.hpp │ │ ├── iteration.hpp │ │ ├── logical │ │ │ ├── not.hpp │ │ │ ├── or.hpp │ │ │ ├── and.hpp │ │ │ ├── nor.hpp │ │ │ ├── xor.hpp │ │ │ ├── compl.hpp │ │ │ ├── bitor.hpp │ │ │ ├── bitand.hpp │ │ │ ├── bitnor.hpp │ │ │ └── bitxor.hpp │ │ ├── config │ │ │ └── limits.hpp │ │ ├── control │ │ │ ├── deduce_d.hpp │ │ │ ├── if.hpp │ │ │ ├── expr_if.hpp │ │ │ ├── expr_iif.hpp │ │ │ └── iif.hpp │ │ ├── control.hpp │ │ ├── logical.hpp │ │ ├── tuple │ │ │ ├── enum.hpp │ │ │ ├── push_back.hpp │ │ │ ├── push_front.hpp │ │ │ ├── size.hpp │ │ │ ├── detail │ │ │ │ └── is_single_return.hpp │ │ │ ├── insert.hpp │ │ │ └── replace.hpp │ │ ├── punctuation.hpp │ │ ├── slot │ │ │ ├── counter.hpp │ │ │ └── slot.hpp │ │ ├── cat.hpp │ │ ├── comparison │ │ │ ├── equal.hpp │ │ │ ├── greater.hpp │ │ │ ├── greater_equal.hpp │ │ │ └── less_equal.hpp │ │ ├── variadic │ │ │ ├── to_tuple.hpp │ │ │ ├── to_seq.hpp │ │ │ ├── to_list.hpp │ │ │ ├── detail │ │ │ │ └── is_single_return.hpp │ │ │ └── to_array.hpp │ │ ├── stringize.hpp │ │ ├── array │ │ │ ├── data.hpp │ │ │ ├── size.hpp │ │ │ ├── elem.hpp │ │ │ ├── to_tuple.hpp │ │ │ └── reverse.hpp │ │ ├── variadic.hpp │ │ ├── facilities.hpp │ │ ├── list │ │ │ ├── to_seq.hpp │ │ │ ├── fold_right.hpp │ │ │ ├── at.hpp │ │ │ └── append.hpp │ │ ├── tuple.hpp │ │ ├── selection │ │ │ ├── max.hpp │ │ │ └── min.hpp │ │ ├── wstringize.hpp │ │ ├── arithmetic │ │ │ ├── div.hpp │ │ │ └── mod.hpp │ │ ├── list.hpp │ │ └── debug │ │ │ └── assert.hpp │ └── LICENSE_1_0.txt ├── File_Extensions.hpp ├── Input_Defaults.hpp ├── DNA.hpp ├── Kmer_Hasher.hpp ├── cxxopts │ └── LICENSE ├── BBHash │ └── LICENSE ├── nlohmann │ └── LICENSE.MIT ├── Output_Sink.hpp └── Data_Logistics.hpp ├── .gitignore ├── CONTRIBUTING.md ├── scripts ├── merge_into_master.sh └── merge_into_develop.sh └── LICENSE /data/refs1.lst: -------------------------------------------------------------------------------- 1 | CGACATGTCTTAG 2 | -------------------------------------------------------------------------------- /data/refs2.lst: -------------------------------------------------------------------------------- 1 | CGACATGTCTATTATACTT 2 | -------------------------------------------------------------------------------- /data/refs1.fa: -------------------------------------------------------------------------------- 1 | >ref1 2 | CGACATGTCTTAG 3 | -------------------------------------------------------------------------------- /data/refs2.fa: -------------------------------------------------------------------------------- 1 | >ref2 2 | CGACATGTCTATTATACTT 3 | -------------------------------------------------------------------------------- /data/rob-palindrome.lst: -------------------------------------------------------------------------------- 1 | AACTGACATGTCAGTT 2 | -------------------------------------------------------------------------------- /data/cycles.fa: -------------------------------------------------------------------------------- 1 | >1 2 | AACAC 3 | >2 4 | TAGATAG 5 | -------------------------------------------------------------------------------- /data/rob-palindrome.fa: -------------------------------------------------------------------------------- 1 | >rob-palindrome 2 | AACTGACATGTCAGTT 3 | -------------------------------------------------------------------------------- /src/dBG_Utilities.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "dBG_Utilities.hpp" 3 | -------------------------------------------------------------------------------- /src/State_Read_Space.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "State_Read_Space.hpp" 3 | -------------------------------------------------------------------------------- /include/fmt/posix.h: -------------------------------------------------------------------------------- 1 | #include "os.h" 2 | #warning "fmt/posix.h is deprecated; use fmt/os.h instead" 3 | -------------------------------------------------------------------------------- /include/spdlog/fmt/bundled/posix.h: -------------------------------------------------------------------------------- 1 | #include "os.h" 2 | #warning "fmt/posix.h is deprecated; use fmt/os.h instead" -------------------------------------------------------------------------------- /include/kmc_api/stdafx.h: -------------------------------------------------------------------------------- 1 | #include 2 | //#include 3 | #include 4 | using namespace std; 5 | -------------------------------------------------------------------------------- /src/Kmer_Utility.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Kmer_Utility.hpp" 3 | 4 | 5 | constexpr uint8_t Kmer_Utility::REVERSE_COMPLEMENT_BYTE[256]; 6 | -------------------------------------------------------------------------------- /data/reads.fq: -------------------------------------------------------------------------------- 1 | @sample-read-1 2 | CTAAGAT 3 | + 4 | zzzzzzz 5 | @sample-read-2 6 | CGATGCA 7 | + 8 | zzzzzzz 9 | @sample-read-3 10 | TAAGAGG 11 | + 12 | zzzzzzz 13 | -------------------------------------------------------------------------------- /include/version.hpp: -------------------------------------------------------------------------------- 1 | 2 | // https://stackoverflow.com/a/20632065/2007834 3 | #define STRINGIFY2(X) #X 4 | #define STRINGIFY(X) STRINGIFY2(X) 5 | #define VERSION STRINGIFY(PROJECT_VERSION) 6 | -------------------------------------------------------------------------------- /src/Character_Buffer_Flusher.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Character_Buffer.hpp" 3 | 4 | 5 | Spin_Lock Character_Buffer_Flusher::lock; // Definition of the static lock of `Character_Buffer_Flusher`. 6 | -------------------------------------------------------------------------------- /include/spdlog/details/windows_include.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef NOMINMAX 4 | #define NOMINMAX // prevent windows redefining min/max 5 | #endif 6 | 7 | #ifndef WIN32_LEAN_AND_MEAN 8 | #define WIN32_LEAN_AND_MEAN 9 | #endif 10 | 11 | #include 12 | -------------------------------------------------------------------------------- /src/Maximal_Unitig_Scratch.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Maximal_Unitig_Scratch.hpp" 3 | 4 | 5 | template 6 | Maximal_Unitig_Scratch::Maximal_Unitig_Scratch() 7 | {} 8 | 9 | 10 | 11 | // Template instantiations for the required instances. 12 | ENUMERATE(INSTANCE_COUNT, INSTANTIATE, Maximal_Unitig_Scratch) 13 | -------------------------------------------------------------------------------- /include/spdlog/fwd.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | namespace spdlog { 7 | class logger; 8 | class formatter; 9 | 10 | namespace sinks { 11 | class sink; 12 | } 13 | 14 | } // namespace spdlog 15 | -------------------------------------------------------------------------------- /src/Unitig_Scratch.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Unitig_Scratch.hpp" 3 | 4 | 5 | template 6 | Unitig_Scratch::Unitig_Scratch() 7 | { 8 | label_.reserve(BUFF_SZ + k - 1), 9 | hash_.reserve(BUFF_SZ); 10 | } 11 | 12 | 13 | 14 | // Template instantiations for the required instances. 15 | ENUMERATE(INSTANCE_COUNT, INSTANTIATE, Unitig_Scratch) 16 | -------------------------------------------------------------------------------- /include/spdlog/version.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #define SPDLOG_VER_MAJOR 1 7 | #define SPDLOG_VER_MINOR 7 8 | #define SPDLOG_VER_PATCH 0 9 | 10 | #define SPDLOG_VERSION (SPDLOG_VER_MAJOR * 10000 + SPDLOG_VER_MINOR * 100 + SPDLOG_VER_PATCH) 11 | -------------------------------------------------------------------------------- /include/Output_Format.hpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef OUTPUT_FORMATS_HPP 3 | #define OUTPUT_FORMATS_HPP 4 | 5 | 6 | 7 | #include 8 | 9 | 10 | namespace cuttlefish 11 | { 12 | // Output format options for the algorithm. 13 | enum Output_Format: uint8_t 14 | { 15 | fa = 0, 16 | gfa1 = 1, 17 | gfa2 = 2, 18 | gfa_reduced = 3, 19 | num_op_formats 20 | }; 21 | } 22 | 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /src/Progress_Tracker.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Progress_Tracker.hpp" 3 | 4 | 5 | void Progress_Tracker::setup(uint64_t total_work_load, uint64_t work_chunk_threshold, const std::string& log_message) 6 | { 7 | this->total_work_load = total_work_load; 8 | this->work_chunk_threshold = work_chunk_threshold; 9 | 10 | total_work_done = 0; 11 | percent_work_done = 0; 12 | 13 | this->log_message = log_message; 14 | 15 | std::cerr << "\n"; 16 | } 17 | -------------------------------------------------------------------------------- /src/DNA_Utility.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "DNA_Utility.hpp" 3 | 4 | 5 | constexpr DNA::Base DNA_Utility::MAPPED_BASE[128]; 6 | constexpr DNA::Base DNA_Utility::COMPLEMENTED_BASE[5]; 7 | constexpr char DNA_Utility::COMPLEMENTED_CHAR[128]; 8 | constexpr bool DNA_Utility::IS_PLACEHOLDER[128]; 9 | constexpr DNA::Extended_Base DNA_Utility::MAPPED_EXTENDED_BASE[4]; 10 | constexpr DNA::Base DNA_Utility::REVERSE_MAPPED_EXTENDED_BASE[5]; 11 | constexpr char DNA_Utility::MAPPED_CHAR[4]; 12 | -------------------------------------------------------------------------------- /include/spdlog/fmt/ostr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ostream support 9 | // 10 | 11 | #if !defined(SPDLOG_FMT_EXTERNAL) 12 | #ifdef SPDLOG_HEADER_ONLY 13 | #ifndef FMT_HEADER_ONLY 14 | #define FMT_HEADER_ONLY 15 | #endif 16 | #endif 17 | #include 18 | #else 19 | #include 20 | #endif 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | 34 | # Build and binary files 35 | build/ 36 | bin/ 37 | 38 | # Miscellaneous 39 | .vscode/ 40 | external/ 41 | -------------------------------------------------------------------------------- /include/spdlog/formatter.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | 11 | class formatter 12 | { 13 | public: 14 | virtual ~formatter() = default; 15 | virtual void format(const details::log_msg &msg, memory_buf_t &dest) = 0; 16 | virtual std::unique_ptr clone() const = 0; 17 | }; 18 | } // namespace spdlog 19 | -------------------------------------------------------------------------------- /include/compact_vector/const_iterator_traits.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __CONST_ITERATOR_TRAITS_H__ 2 | #define __CONST_ITERATOR_TRAITS_H__ 3 | 4 | #include 5 | 6 | 7 | namespace compact { 8 | template struct const_iterator_traits { }; 9 | 10 | template 11 | struct const_iterator_traits { 12 | typedef typename std::add_const::type* type; 13 | }; 14 | 15 | template 16 | struct const_iterator_traits { 17 | typedef const T* type; 18 | }; 19 | } // namespace compact 20 | 21 | #endif /* __CONST_ITERATOR_TRAITS_H__ */ -------------------------------------------------------------------------------- /include/boost/preprocessor/punctuation/comma.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP 15 | # define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP 16 | # 17 | # /* BOOST_PP_COMMA */ 18 | # 19 | # define BOOST_PP_COMMA() , 20 | # 21 | # endif 22 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing code 2 | 3 | Any code that you contribute will be licensed under the BSD 3-clause license adopted by cuttlefish. 4 | 5 | Code contributions should be made via pull requests. Please make all PRs to the _develop_ branch 6 | of the repository. PRs made to the _master_ branch may be rejected if they cannot be cleanly rebased 7 | on _develop_. Before you make a PR, please check that: 8 | 9 | * commit messages should be made using [*conventional commits*](https://www.conventionalcommits.org/en/v1.0.0/) — please format all of your commit messages as such. 10 | * any non-obvious code is documented (we don't yet have formal documentation guidelines, so use common sense) 11 | -------------------------------------------------------------------------------- /include/boost/preprocessor/facilities/empty.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP 15 | # define BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP 16 | # 17 | # include 18 | # 19 | # /* BOOST_PP_EMPTY */ 20 | # 21 | # define BOOST_PP_EMPTY() 22 | # 23 | # endif 24 | -------------------------------------------------------------------------------- /include/spdlog/fmt/fmt.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2018 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | // 9 | // Include a bundled header-only copy of fmtlib or an external one. 10 | // By default spdlog include its own copy. 11 | // 12 | 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #if !defined(SPDLOG_COMPILED_LIB) && !defined(FMT_HEADER_ONLY) 15 | #define FMT_HEADER_ONLY 16 | #endif 17 | #ifndef FMT_USE_WINDOWS_H 18 | #define FMT_USE_WINDOWS_H 0 19 | #endif 20 | #include 21 | #include 22 | #else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib 23 | #include 24 | #include 25 | #endif -------------------------------------------------------------------------------- /include/spdlog/details/console_globals.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | 12 | struct console_mutex 13 | { 14 | using mutex_t = std::mutex; 15 | static mutex_t &mutex() 16 | { 17 | static mutex_t s_mutex; 18 | return s_mutex; 19 | } 20 | }; 21 | 22 | struct console_nullmutex 23 | { 24 | using mutex_t = null_mutex; 25 | static mutex_t &mutex() 26 | { 27 | static mutex_t s_mutex; 28 | return s_mutex; 29 | } 30 | }; 31 | } // namespace details 32 | } // namespace spdlog 33 | -------------------------------------------------------------------------------- /include/boost/preprocessor/detail/null.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DETAIL_NULL_HPP 13 | # define BOOST_PREPROCESSOR_DETAIL_NULL_HPP 14 | # 15 | # /* empty file */ 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/if.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_IF_HPP 13 | # define BOOST_PREPROCESSOR_IF_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/dec.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DEC_HPP 13 | # define BOOST_PREPROCESSOR_DEC_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/for.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_FOR_HPP 13 | # define BOOST_PREPROCESSOR_FOR_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/inc.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_INC_HPP 13 | # define BOOST_PREPROCESSOR_INC_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/max.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_MAX_HPP 13 | # define BOOST_PREPROCESSOR_MAX_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/min.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_MIN_HPP 13 | # define BOOST_PREPROCESSOR_MIN_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/slot.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SLOT_HPP 13 | # define BOOST_PREPROCESSOR_SLOT_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/enum.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ENUM_HPP 13 | # define BOOST_PREPROCESSOR_ENUM_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/while.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_WHILE_HPP 13 | # define BOOST_PREPROCESSOR_WHILE_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/comma.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_COMMA_HPP 13 | # define BOOST_PREPROCESSOR_COMMA_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/empty.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_EMPTY_HPP 13 | # define BOOST_PREPROCESSOR_EMPTY_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/expand.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_EXPAND_HPP 13 | # define BOOST_PREPROCESSOR_EXPAND_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/limits.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_LIMITS_HPP 13 | # define BOOST_PREPROCESSOR_LIMITS_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/repeat.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPEAT_HPP 13 | # define BOOST_PREPROCESSOR_REPEAT_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/expr_if.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_EXPR_IF_HPP 13 | # define BOOST_PREPROCESSOR_EXPR_IF_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/iterate.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ITERATE_HPP 13 | # define BOOST_PREPROCESSOR_ITERATE_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/spdlog/cfg/helpers.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | namespace spdlog { 9 | namespace cfg { 10 | namespace helpers { 11 | // 12 | // Init levels from given string 13 | // 14 | // Examples: 15 | // 16 | // set global level to debug: "debug" 17 | // turn off all logging except for logger1: "off,logger1=debug" 18 | // turn off all logging except for logger1 and logger2: "off,logger1=debug,logger2=info" 19 | // 20 | SPDLOG_API log_levels extract_levels(const std::string &txt); 21 | } // namespace helpers 22 | 23 | } // namespace cfg 24 | } // namespace spdlog 25 | 26 | #ifdef SPDLOG_HEADER_ONLY 27 | #include "helpers-inl.h" 28 | #endif // SPDLOG_HEADER_ONLY 29 | -------------------------------------------------------------------------------- /include/boost/preprocessor/assert_msg.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ASSERT_MSG_HPP 13 | # define BOOST_PREPROCESSOR_ASSERT_MSG_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/comma_if.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_COMMA_IF_HPP 13 | # define BOOST_PREPROCESSOR_COMMA_IF_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/identity.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_IDENTITY_HPP 13 | # define BOOST_PREPROCESSOR_IDENTITY_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/spdlog/sinks/sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | 12 | SPDLOG_INLINE bool spdlog::sinks::sink::should_log(spdlog::level::level_enum msg_level) const 13 | { 14 | return msg_level >= level_.load(std::memory_order_relaxed); 15 | } 16 | 17 | SPDLOG_INLINE void spdlog::sinks::sink::set_level(level::level_enum log_level) 18 | { 19 | level_.store(log_level, std::memory_order_relaxed); 20 | } 21 | 22 | SPDLOG_INLINE spdlog::level::level_enum spdlog::sinks::sink::level() const 23 | { 24 | return static_cast(level_.load(std::memory_order_relaxed)); 25 | } 26 | -------------------------------------------------------------------------------- /include/boost/preprocessor/repeat_2nd.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPEAT_2ND_HPP 13 | # define BOOST_PREPROCESSOR_REPEAT_2ND_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/repeat_3rd.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPEAT_3RD_HPP 13 | # define BOOST_PREPROCESSOR_REPEAT_3RD_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/enum_params.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_HPP 13 | # define BOOST_PREPROCESSOR_ENUM_PARAMS_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/enum_shifted.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ENUM_SHIFTED_HPP 13 | # define BOOST_PREPROCESSOR_ENUM_SHIFTED_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/repeat_from_to.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPEAT_FROM_TO_HPP 13 | # define BOOST_PREPROCESSOR_REPEAT_FROM_TO_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/debug.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DEBUG_HPP 13 | # define BOOST_PREPROCESSOR_DEBUG_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # endif 19 | -------------------------------------------------------------------------------- /include/boost/preprocessor/repeat_from_to_2nd.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPEAT_FROM_TO_2ND_HPP 13 | # define BOOST_PREPROCESSOR_REPEAT_FROM_TO_2ND_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/repeat_from_to_3rd.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPEAT_FROM_TO_3RD_HPP 13 | # define BOOST_PREPROCESSOR_REPEAT_FROM_TO_3RD_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/spdlog/details/synchronous_factory.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "registry.h" 7 | 8 | namespace spdlog { 9 | 10 | // Default logger factory- creates synchronous loggers 11 | class logger; 12 | 13 | struct synchronous_factory 14 | { 15 | template 16 | static std::shared_ptr create(std::string logger_name, SinkArgs &&... args) 17 | { 18 | auto sink = std::make_shared(std::forward(args)...); 19 | auto new_logger = std::make_shared(std::move(logger_name), std::move(sink)); 20 | details::registry::instance().initialize_logger(new_logger); 21 | return new_logger; 22 | } 23 | }; 24 | } // namespace spdlog -------------------------------------------------------------------------------- /include/boost/preprocessor/enum_shifted_params.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP 13 | # define BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/selection.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SELECTION_HPP 13 | # define BOOST_PREPROCESSOR_SELECTION_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # endif 19 | -------------------------------------------------------------------------------- /include/boost/preprocessor/seq/push_back.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_PUSH_BACK_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_PUSH_BACK_HPP 14 | # 15 | # /* BOOST_PP_SEQ_PUSH_BACK */ 16 | # 17 | # define BOOST_PP_SEQ_PUSH_BACK(seq, elem) seq(elem) 18 | # 19 | # endif 20 | -------------------------------------------------------------------------------- /include/boost/preprocessor/seq/push_front.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_PUSH_FRONT_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_PUSH_FRONT_HPP 14 | # 15 | # /* BOOST_PP_SEQ_PUSH_FRONT */ 16 | # 17 | # define BOOST_PP_SEQ_PUSH_FRONT(seq, elem) (elem)seq 18 | # 19 | # endif 20 | -------------------------------------------------------------------------------- /include/File_Extensions.hpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef FILE_EXTENSIONS_HPP 3 | #define FILE_EXTENSIONS_HPP 4 | 5 | 6 | 7 | namespace cuttlefish 8 | { 9 | // File extensions for the data structures and files output by the algorithm. 10 | namespace file_ext 11 | { 12 | constexpr char edges_ext[] = ".cf_E"; 13 | constexpr char vertices_ext[] = ".cf_V"; 14 | constexpr char hash_ext[] = ".cf_hf"; 15 | constexpr char buckets_ext[] = ".cf_hb"; 16 | constexpr char unipaths_ext[] = ".fa"; 17 | constexpr char json_ext[] = ".json"; 18 | constexpr char temp[] = ".cf_op"; 19 | 20 | // For reference dBGs only: 21 | 22 | constexpr char gfa1_ext[] = ".gfa1"; 23 | constexpr char gfa2_ext[] = ".gfa2"; 24 | constexpr char seg_ext[] = ".cf_seg"; 25 | constexpr char seq_ext[] = ".cf_seq"; 26 | } 27 | } 28 | 29 | 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /include/boost/preprocessor/comparison.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_COMPARISON_HPP 15 | # define BOOST_PREPROCESSOR_COMPARISON_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # 24 | # endif 25 | -------------------------------------------------------------------------------- /include/boost/preprocessor/enum_params_with_a_default.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_A_DEFAULT_HPP 13 | # define BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_A_DEFAULT_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/enum_params_with_defaults.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_DEFAULTS_HPP 13 | # define BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_DEFAULTS_HPP 14 | # 15 | # include 16 | # 17 | # endif 18 | -------------------------------------------------------------------------------- /include/boost/preprocessor/facilities/identity.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # /* Revised by Edward Diener (2015) */ 12 | # 13 | # /* See http://www.boost.org for most recent version. */ 14 | # 15 | # ifndef BOOST_PREPROCESSOR_FACILITIES_IDENTITY_HPP 16 | # define BOOST_PREPROCESSOR_FACILITIES_IDENTITY_HPP 17 | # 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_IDENTITY */ 22 | # 23 | # define BOOST_PP_IDENTITY(item) item BOOST_PP_EMPTY 24 | # 25 | # define BOOST_PP_IDENTITY_N(item,n) item BOOST_PP_TUPLE_EAT_N(n) 26 | # 27 | # endif 28 | -------------------------------------------------------------------------------- /include/boost/preprocessor/iteration/self.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ITERATION_SELF_HPP 13 | # define BOOST_PREPROCESSOR_ITERATION_SELF_HPP 14 | # 15 | # /* BOOST_PP_INCLUDE_SELF */ 16 | # 17 | # define BOOST_PP_INCLUDE_SELF() 18 | # 19 | # endif 20 | -------------------------------------------------------------------------------- /include/boost/preprocessor/repetition/enum_params_with_defaults.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_DEFAULTS_HPP 15 | # define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_DEFAULTS_HPP 16 | # 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS */ 21 | # 22 | # define BOOST_PP_ENUM_PARAMS_WITH_DEFAULTS(count, param, def) BOOST_PP_ENUM_BINARY_PARAMS(count, param, = def) 23 | # 24 | # endif 25 | -------------------------------------------------------------------------------- /include/boost/preprocessor/arithmetic.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_ARITHMETIC_HPP 15 | # define BOOST_PREPROCESSOR_ARITHMETIC_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # include 24 | # 25 | # endif 26 | -------------------------------------------------------------------------------- /include/boost/preprocessor/iteration.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ITERATION_HPP 13 | # define BOOST_PREPROCESSOR_ITERATION_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # 19 | # endif 20 | -------------------------------------------------------------------------------- /include/compact_vector/prefetch_iterator_traits.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __PREFETCH_TRAITS_H__ 2 | #define __PREFETCH_TRAITS_H__ 3 | 4 | #include 5 | 6 | namespace compact { 7 | // Traits to prefetch an iterator 8 | 9 | template struct prefetch_iterator_traits { }; 10 | 11 | template 12 | struct prefetch_iterator_traits { 13 | template 14 | static void read(T* ptr) { __builtin_prefetch((void*)ptr, 0, level); } 15 | template 16 | static void write(T* ptr) { __builtin_prefetch((void*)ptr, 1, level); } 17 | }; 18 | 19 | template 20 | struct prefetch_iterator_traits { 21 | template 22 | static void read(const T* ptr) { __builtin_prefetch((void*)ptr, 0, level); } 23 | template 24 | static void write(const T* ptr) { __builtin_prefetch((void*)ptr, 1, level); } 25 | }; 26 | } // namespace compact 27 | 28 | #endif /* __PREFETCH_TRAITS_H__ */ -------------------------------------------------------------------------------- /include/boost/preprocessor/iteration/detail/self.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # if !defined(BOOST_PP_INDIRECT_SELF) 13 | # error BOOST_PP_ERROR: no indirect file to include 14 | # endif 15 | # 16 | # define BOOST_PP_IS_SELFISH 1 17 | # 18 | # include BOOST_PP_INDIRECT_SELF 19 | # 20 | # undef BOOST_PP_IS_SELFISH 21 | # undef BOOST_PP_INDIRECT_SELF 22 | -------------------------------------------------------------------------------- /include/boost/preprocessor/punctuation/paren.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_PUNCTUATION_PAREN_HPP 13 | # define BOOST_PREPROCESSOR_PUNCTUATION_PAREN_HPP 14 | # 15 | # /* BOOST_PP_LPAREN */ 16 | # 17 | # define BOOST_PP_LPAREN() ( 18 | # 19 | # /* BOOST_PP_RPAREN */ 20 | # 21 | # define BOOST_PP_RPAREN() ) 22 | # 23 | # endif 24 | -------------------------------------------------------------------------------- /include/boost/preprocessor/facilities/expand.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP 15 | # define BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP 16 | # 17 | # include 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() 20 | # define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_I(x) 21 | # else 22 | # define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_OO((x)) 23 | # define BOOST_PP_EXPAND_OO(par) BOOST_PP_EXPAND_I ## par 24 | # endif 25 | # 26 | # define BOOST_PP_EXPAND_I(x) x 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /src/kmc_api/Virtual_Prefix_File.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "kmc_api/Virtual_Prefix_File.hpp" 3 | 4 | 5 | Virtual_Prefix_File::Virtual_Prefix_File(): 6 | prefix_file_elem_count(0), 7 | prefix_chunk_start_index(0), 8 | prefix_chunk_end_index(0), 9 | total_kmers(0), 10 | fp(nullptr) 11 | {} 12 | 13 | 14 | Virtual_Prefix_File::~Virtual_Prefix_File() 15 | { 16 | if(fp) 17 | { 18 | std::fclose(fp); 19 | fp = nullptr; 20 | } 21 | } 22 | 23 | 24 | void Virtual_Prefix_File::init(std::FILE*& fptr, const uint64_t prefix_count, const uint64_t kmer_count) 25 | { 26 | // *Take ownership* of `fptr`. 27 | fp = fptr; 28 | fptr = NULL; 29 | 30 | prefix_file_elem_count = prefix_count; 31 | total_kmers = kmer_count; 32 | 33 | // Allocate the prefix-file buffer. 34 | prefix_file_buf.reserve(buffer_elem_count); 35 | 36 | // Read in some prefix-file data, and initialize the virtual indices into the prefix-file. 37 | prefix_chunk_start_index = 0; 38 | prefix_chunk_end_index = read_prefixes(); 39 | } 40 | -------------------------------------------------------------------------------- /include/boost/preprocessor/repetition/enum_params_with_a_default.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_A_DEFAULT_HPP 15 | # define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_A_DEFAULT_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT */ 22 | # 23 | # define BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(count, param, def) BOOST_PP_ENUM_BINARY_PARAMS(count, param, = def BOOST_PP_INTERCEPT) 24 | # 25 | # endif 26 | -------------------------------------------------------------------------------- /include/boost/preprocessor/logical/not.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LOGICAL_NOT_HPP 15 | # define BOOST_PREPROCESSOR_LOGICAL_NOT_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_NOT */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_NOT(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) 25 | # else 26 | # define BOOST_PP_NOT(x) BOOST_PP_NOT_I(x) 27 | # define BOOST_PP_NOT_I(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /include/boost/preprocessor/config/limits.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # /* Revised by Edward Diener (2011) */ 12 | # 13 | # /* See http://www.boost.org for most recent version. */ 14 | # 15 | # ifndef BOOST_PREPROCESSOR_CONFIG_LIMITS_HPP 16 | # define BOOST_PREPROCESSOR_CONFIG_LIMITS_HPP 17 | # 18 | # define BOOST_PP_LIMIT_MAG 256 19 | # define BOOST_PP_LIMIT_TUPLE 64 20 | # define BOOST_PP_LIMIT_DIM 3 21 | # define BOOST_PP_LIMIT_REPEAT 256 22 | # define BOOST_PP_LIMIT_WHILE 256 23 | # define BOOST_PP_LIMIT_FOR 256 24 | # define BOOST_PP_LIMIT_ITERATION 256 25 | # define BOOST_PP_LIMIT_ITERATION_DIM 3 26 | # define BOOST_PP_LIMIT_SEQ 256 27 | # define BOOST_PP_LIMIT_SLOT_SIG 10 28 | # define BOOST_PP_LIMIT_SLOT_COUNT 5 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /include/boost/preprocessor/control/deduce_d.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP 13 | # define BOOST_PREPROCESSOR_CONTROL_DEDUCE_D_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_DEDUCE_D */ 19 | # 20 | # define BOOST_PP_DEDUCE_D() BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256) 21 | # 22 | # endif 23 | -------------------------------------------------------------------------------- /include/compact_vector/parallel_iterator_traits.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __PARALLEL_POINTER_TRAITS_H__ 2 | #define __PARALLEL_POINTER_TRAITS_H__ 3 | 4 | #include 5 | 6 | namespace compact { 7 | // Traits for a parallel iterator. Very weak requirements that if two 8 | // threads hold iterators to two different location, then the pointers 9 | // can be read and stored. 10 | // 11 | // This holds for pointers. But it requires attention when dealing 12 | // with compact iterators. 13 | 14 | template struct parallel_iterator_traits { }; 15 | 16 | template 17 | struct parallel_iterator_traits { 18 | typedef T* type; 19 | static bool cas(type x, T& expected, const T& val) { 20 | const T old = expected; 21 | expected = __sync_val_compare_and_swap(x, expected, val); 22 | return old == expected; 23 | } 24 | }; 25 | 26 | template 27 | struct parallel_iterator_traits { 28 | typedef const T* type; 29 | }; 30 | } // namespace compact 31 | 32 | #endif /* __PARALLEL_POINTER_TRAITS_H__ */ -------------------------------------------------------------------------------- /include/boost/preprocessor/repetition/deduce_r.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPETITION_DEDUCE_R_HPP 13 | # define BOOST_PREPROCESSOR_REPETITION_DEDUCE_R_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_DEDUCE_R */ 19 | # 20 | # define BOOST_PP_DEDUCE_R() BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 256) 21 | # 22 | # endif 23 | -------------------------------------------------------------------------------- /include/boost/preprocessor/repetition/deduce_z.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_REPETITION_DEDUCE_Z_HPP 13 | # define BOOST_PREPROCESSOR_REPETITION_DEDUCE_Z_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_DEDUCE_Z */ 19 | # 20 | # define BOOST_PP_DEDUCE_Z() BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4) 21 | # 22 | # endif 23 | -------------------------------------------------------------------------------- /include/spdlog/sinks/sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | 11 | namespace sinks { 12 | class SPDLOG_API sink 13 | { 14 | public: 15 | virtual ~sink() = default; 16 | virtual void log(const details::log_msg &msg) = 0; 17 | virtual void flush() = 0; 18 | virtual void set_pattern(const std::string &pattern) = 0; 19 | virtual void set_formatter(std::unique_ptr sink_formatter) = 0; 20 | 21 | void set_level(level::level_enum log_level); 22 | level::level_enum level() const; 23 | bool should_log(level::level_enum msg_level) const; 24 | 25 | protected: 26 | // sink log level - default is all 27 | level_t level_{level::trace}; 28 | }; 29 | 30 | } // namespace sinks 31 | } // namespace spdlog 32 | 33 | #ifdef SPDLOG_HEADER_ONLY 34 | #include "sink-inl.h" 35 | #endif 36 | -------------------------------------------------------------------------------- /include/boost/preprocessor/control/if.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_CONTROL_IF_HPP 15 | # define BOOST_PREPROCESSOR_CONTROL_IF_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_IF */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_IF(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) 25 | # else 26 | # define BOOST_PP_IF(cond, t, f) BOOST_PP_IF_I(cond, t, f) 27 | # define BOOST_PP_IF_I(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /include/boost/preprocessor/logical/or.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LOGICAL_OR_HPP 15 | # define BOOST_PREPROCESSOR_LOGICAL_OR_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_OR */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_OR(p, q) BOOST_PP_BITOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 25 | # else 26 | # define BOOST_PP_OR(p, q) BOOST_PP_OR_I(p, q) 27 | # define BOOST_PP_OR_I(p, q) BOOST_PP_BITOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /include/boost/preprocessor/facilities/is_1.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2003. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_FACILITIES_IS_1_HPP 13 | # define BOOST_PREPROCESSOR_FACILITIES_IS_1_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_IS_1 */ 19 | # 20 | # define BOOST_PP_IS_1(x) BOOST_PP_IS_EMPTY(BOOST_PP_CAT(BOOST_PP_IS_1_HELPER_, x)) 21 | # define BOOST_PP_IS_1_HELPER_1 22 | # 23 | # endif 24 | -------------------------------------------------------------------------------- /include/boost/preprocessor/logical/and.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LOGICAL_AND_HPP 15 | # define BOOST_PREPROCESSOR_LOGICAL_AND_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_AND */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_AND(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 25 | # else 26 | # define BOOST_PP_AND(p, q) BOOST_PP_AND_I(p, q) 27 | # define BOOST_PP_AND_I(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /include/boost/preprocessor/logical/nor.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LOGICAL_NOR_HPP 15 | # define BOOST_PREPROCESSOR_LOGICAL_NOR_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_NOR */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_NOR(p, q) BOOST_PP_BITNOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 25 | # else 26 | # define BOOST_PP_NOR(p, q) BOOST_PP_NOR_I(p, q) 27 | # define BOOST_PP_NOR_I(p, q) BOOST_PP_BITNOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /include/boost/preprocessor/logical/xor.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LOGICAL_XOR_HPP 15 | # define BOOST_PREPROCESSOR_LOGICAL_XOR_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_XOR */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_XOR(p, q) BOOST_PP_BITXOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 25 | # else 26 | # define BOOST_PP_XOR(p, q) BOOST_PP_XOR_I(p, q) 27 | # define BOOST_PP_XOR_I(p, q) BOOST_PP_BITXOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /include/spdlog/details/log_msg_buffer.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | namespace spdlog { 9 | namespace details { 10 | 11 | // Extend log_msg with internal buffer to store its payload. 12 | // This is needed since log_msg holds string_views that points to stack data. 13 | 14 | class SPDLOG_API log_msg_buffer : public log_msg 15 | { 16 | memory_buf_t buffer; 17 | void update_string_views(); 18 | 19 | public: 20 | log_msg_buffer() = default; 21 | explicit log_msg_buffer(const log_msg &orig_msg); 22 | log_msg_buffer(const log_msg_buffer &other); 23 | log_msg_buffer(log_msg_buffer &&other) SPDLOG_NOEXCEPT; 24 | log_msg_buffer &operator=(const log_msg_buffer &other); 25 | log_msg_buffer &operator=(log_msg_buffer &&other) SPDLOG_NOEXCEPT; 26 | }; 27 | 28 | } // namespace details 29 | } // namespace spdlog 30 | 31 | #ifdef SPDLOG_HEADER_ONLY 32 | #include "log_msg_buffer-inl.h" 33 | #endif 34 | -------------------------------------------------------------------------------- /include/boost/preprocessor/control.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_CONTROL_HPP 13 | # define BOOST_PREPROCESSOR_CONTROL_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # endif 23 | -------------------------------------------------------------------------------- /include/Input_Defaults.hpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef INPUT_DEFAULTS_HPP 3 | #define INPUT_DEFAULTS_HPP 4 | 5 | 6 | 7 | #include "Output_Format.hpp" 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | 14 | namespace cuttlefish 15 | { 16 | // Default input options for the algorithm. 17 | namespace _default 18 | { 19 | constexpr char EMPTY[] = ""; 20 | constexpr uint16_t K = 27; 21 | constexpr uint32_t CUTOFF_FREQ_READS = 2; // Typical practice 22 | constexpr uint32_t CUTOFF_FREQ_REFS = 1; // Typical assumption 23 | const uint16_t THREAD_COUNT = (std::thread::hardware_concurrency() ? 24 | (std::thread::hardware_concurrency()/ 4) : 8); // A quarter of the total thread-count. 25 | constexpr std::size_t MAX_MEMORY = 3; // Set as per KMC3 stage 1 performance. 26 | #ifdef CF_DEVELOP_MODE 27 | constexpr double GAMMA = 0; 28 | #endif 29 | constexpr Output_Format OP_FORMAT = Output_Format::fa; 30 | constexpr char WORK_DIR[] = "."; 31 | } 32 | } 33 | 34 | 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /include/boost/preprocessor/control/expr_if.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_CONTROL_EXPR_IF_HPP 15 | # define BOOST_PREPROCESSOR_CONTROL_EXPR_IF_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_EXPR_IF */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_EXPR_IF(cond, expr) BOOST_PP_EXPR_IIF(BOOST_PP_BOOL(cond), expr) 25 | # else 26 | # define BOOST_PP_EXPR_IF(cond, expr) BOOST_PP_EXPR_IF_I(cond, expr) 27 | # define BOOST_PP_EXPR_IF_I(cond, expr) BOOST_PP_EXPR_IIF(BOOST_PP_BOOL(cond), expr) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /scripts/merge_into_master.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -eq 0 ] 4 | then 5 | echo "No input arguments provided. Usage is merge_into_master.sh " 6 | exit 1 7 | fi 8 | 9 | feature=$1 10 | 11 | # from https://stackoverflow.com/questions/173919/is-there-a-theirs-version-of-git-merge-s-ours 12 | # in case branchA is not our current branch 13 | git checkout master 14 | 15 | # make merge commit but without conflicts!! 16 | # the contents of 'ours' will be discarded later 17 | git merge -s ours ${feature} 18 | 19 | # make temporary branch to merged commit 20 | git branch branchTEMP 21 | 22 | # get contents of working tree and index to the one of branchB 23 | git reset --hard ${feature} 24 | 25 | # reset to our merged commit but 26 | # keep contents of working tree and index 27 | git reset --soft branchTEMP 28 | 29 | # change the contents of the merged commit 30 | # with the contents of branchB 31 | git commit --amend 32 | 33 | # get rid off our temporary branch 34 | git branch -D branchTEMP 35 | 36 | # verify that the merge commit contains only contents of branchB 37 | git diff HEAD ${feature} 38 | -------------------------------------------------------------------------------- /include/DNA.hpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DNA_HPP 3 | #define DNA_HPP 4 | 5 | 6 | 7 | #include 8 | 9 | 10 | namespace DNA 11 | { 12 | // A = 0, C = 1, G = 2, T = 3. 13 | // Note that, this is not possible to change this mapping w/o modifications to the 14 | // interfacing of our code with the KMC api. This mapping is essential for some 15 | // crucial performance hacks in the interfacing. 16 | // TODO: consider having it as `enum class`. 17 | enum Base: uint8_t 18 | { 19 | A = 0b00, // 0 20 | C = 0b01, // 1 21 | G = 0b10, // 2 22 | T = 0b11, // 3 23 | N = 0b100 // 4 24 | }; 25 | 26 | 27 | // E = 0, A = 1, C = 2, G = 3, T = 4, N = 7; 28 | // O/P and — non-branching = 5, branching = 6. 29 | enum class Extended_Base: uint8_t 30 | { 31 | E = 0b000, // 0 32 | A = 0b001, // 1 33 | C = 0b010, // 2 34 | G = 0b011, // 3 35 | T = 0b100, // 4 36 | N = 0b111, // 7 37 | OP_non_branch = 0b101, // 5 38 | OP_branching = 0b110, // 6 39 | }; 40 | } 41 | 42 | 43 | 44 | #endif -------------------------------------------------------------------------------- /include/boost/preprocessor/logical.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LOGICAL_HPP 15 | # define BOOST_PREPROCESSOR_LOGICAL_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # include 24 | # include 25 | # include 26 | # include 27 | # include 28 | # 29 | # endif 30 | -------------------------------------------------------------------------------- /include/boost/preprocessor/tuple/enum.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_TUPLE_ENUM_HPP 14 | # define BOOST_PREPROCESSOR_TUPLE_ENUM_HPP 15 | # 16 | # include 17 | # 18 | # /* BOOST_PP_TUPLE_ENUM */ 19 | # 20 | # define BOOST_PP_TUPLE_ENUM BOOST_PP_TUPLE_REM_CTOR 21 | # 22 | # endif 23 | -------------------------------------------------------------------------------- /scripts/merge_into_develop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -eq 0 ] 4 | then 5 | echo "No input arguments provided. Usage is merge_into_develop.sh " 6 | exit 1 7 | fi 8 | 9 | feature=$1 10 | 11 | # from https://stackoverflow.com/questions/173919/is-there-a-theirs-version-of-git-merge-s-ours 12 | # in case branchA is not our current branch 13 | git checkout develop 14 | 15 | # make merge commit but without conflicts!! 16 | # the contents of 'ours' will be discarded later 17 | git merge -s ours ${feature} 18 | 19 | # make temporary branch to merged commit 20 | git branch branchTEMP 21 | 22 | # get contents of working tree and index to the one of branchB 23 | git reset --hard ${feature} 24 | 25 | # reset to our merged commit but 26 | # keep contents of working tree and index 27 | git reset --soft branchTEMP 28 | 29 | # change the contents of the merged commit 30 | # with the contents of branchB 31 | git commit --amend 32 | 33 | # get rid off our temporary branch 34 | git branch -D branchTEMP 35 | 36 | # verify that the merge commit contains only contents of branchB 37 | git diff HEAD ${feature} 38 | -------------------------------------------------------------------------------- /include/Kmer_Hasher.hpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef KMER_HASHER_HPP 3 | #define KMER_HASHER_HPP 4 | 5 | 6 | 7 | #include "Kmer.hpp" 8 | 9 | #include 10 | 11 | 12 | template 13 | class Kmer_Hasher 14 | { 15 | public: 16 | 17 | // Adopted from the BBHash library. 18 | // Ref: https://github.com/rizkg/BBHash/blob/48a854a378bce4e2fe4d4cd63bfe5e4f8755dc6e/BooPHF.h#L393 19 | uint64_t operator()(const Kmer& key, uint64_t seed = 0xAAAAAAAA55555555ULL) const 20 | { 21 | return key.to_u64(seed); 22 | /* 23 | uint64_t hash = seed; 24 | const uint64_t key_u64 = key.to_u64(); 25 | hash ^= (hash << 7) ^ key_u64 * (hash >> 3) ^ (~((hash << 11) + (key_u64 ^ (hash >> 5)))); 26 | hash = (~hash) + (hash << 21); 27 | hash = hash ^ (hash >> 24); 28 | hash = (hash + (hash << 3)) + (hash << 8); 29 | hash = hash ^ (hash >> 14); 30 | hash = (hash + (hash << 2)) + (hash << 4); 31 | hash = hash ^ (hash >> 28); 32 | hash = hash + (hash << 31); 33 | 34 | return hash; 35 | */ 36 | } 37 | }; 38 | 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /include/cxxopts/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Jarryd Beck 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /include/compact_vector/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2018 gus@marcais.net 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /include/boost/preprocessor/punctuation.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_PUNCTUATION_HPP 13 | # define BOOST_PREPROCESSOR_PUNCTUATION_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # endif 23 | -------------------------------------------------------------------------------- /include/boost/preprocessor/slot/counter.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2005. * 4 | # * Distributed under the Boost Software License, Version 1.0. (See * 5 | # * accompanying file LICENSE_1_0.txt or copy at * 6 | # * http://www.boost.org/LICENSE_1_0.txt) * 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SLOT_COUNTER_HPP 13 | # define BOOST_PREPROCESSOR_SLOT_COUNTER_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_COUNTER */ 18 | # 19 | # define BOOST_PP_COUNTER 0 20 | # 21 | # /* BOOST_PP_UPDATE_COUNTER */ 22 | # 23 | # define BOOST_PP_UPDATE_COUNTER() 24 | # 25 | # endif 26 | -------------------------------------------------------------------------------- /include/BBHash/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Guillaume Rizk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /include/nlohmann/LICENSE.MIT: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2013-2021 Niels Lohmann 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /include/boost/preprocessor/punctuation/comma_if.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP 15 | # define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # /* BOOST_PP_COMMA_IF */ 23 | # 24 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 25 | # define BOOST_PP_COMMA_IF(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() 26 | # else 27 | # define BOOST_PP_COMMA_IF(cond) BOOST_PP_COMMA_IF_I(cond) 28 | # define BOOST_PP_COMMA_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() 29 | # endif 30 | # 31 | # endif 32 | -------------------------------------------------------------------------------- /include/boost/preprocessor/cat.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_CAT_HPP 15 | # define BOOST_PREPROCESSOR_CAT_HPP 16 | # 17 | # include "boost/preprocessor/config/config.hpp" 18 | # 19 | # /* BOOST_PP_CAT */ 20 | # 21 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 22 | # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b) 23 | # else 24 | # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_OO((a, b)) 25 | # define BOOST_PP_CAT_OO(par) BOOST_PP_CAT_I ## par 26 | # endif 27 | # 28 | # if (~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) 29 | # define BOOST_PP_CAT_I(a, b) a ## b 30 | # else 31 | # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b) 32 | # define BOOST_PP_CAT_II(p, res) res 33 | # endif 34 | # 35 | # endif 36 | -------------------------------------------------------------------------------- /include/boost/preprocessor/comparison/equal.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_COMPARISON_EQUAL_HPP 15 | # define BOOST_PREPROCESSOR_COMPARISON_EQUAL_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_EQUAL */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_EQUAL(x, y) BOOST_PP_COMPL(BOOST_PP_NOT_EQUAL(x, y)) 25 | # else 26 | # define BOOST_PP_EQUAL(x, y) BOOST_PP_EQUAL_I(x, y) 27 | # define BOOST_PP_EQUAL_I(x, y) BOOST_PP_COMPL(BOOST_PP_NOT_EQUAL(x, y)) 28 | # endif 29 | # 30 | # /* BOOST_PP_EQUAL_D */ 31 | # 32 | # define BOOST_PP_EQUAL_D(d, x, y) BOOST_PP_EQUAL(x, y) 33 | # 34 | # endif 35 | -------------------------------------------------------------------------------- /include/spdlog/cfg/env.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | // 10 | // Init levels and patterns from env variables SPDLOG_LEVEL 11 | // Inspired from Rust's "env_logger" crate (https://crates.io/crates/env_logger). 12 | // Note - fallback to "info" level on unrecognized levels 13 | // 14 | // Examples: 15 | // 16 | // set global level to debug: 17 | // export SPDLOG_LEVEL=debug 18 | // 19 | // turn off all logging except for logger1: 20 | // export SPDLOG_LEVEL="off,logger1=debug" 21 | // 22 | 23 | // turn off all logging except for logger1 and logger2: 24 | // export SPDLOG_LEVEL="off,logger1=debug,logger2=info" 25 | 26 | namespace spdlog { 27 | namespace cfg { 28 | void load_env_levels() 29 | { 30 | auto env_val = details::os::getenv("SPDLOG_LEVEL"); 31 | auto levels = helpers::extract_levels(env_val); 32 | details::registry::instance().update_levels(std::move(levels)); 33 | } 34 | 35 | } // namespace cfg 36 | } // namespace spdlog 37 | -------------------------------------------------------------------------------- /include/boost/preprocessor/variadic/to_tuple.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_VARIADIC_TO_TUPLE_HPP 14 | # define BOOST_PREPROCESSOR_VARIADIC_TO_TUPLE_HPP 15 | # 16 | # include 17 | # 18 | # /* BOOST_PP_VARIADIC_TO_TUPLE */ 19 | # 20 | # if BOOST_PP_VARIADICS 21 | # define BOOST_PP_VARIADIC_TO_TUPLE(...) (__VA_ARGS__) 22 | # endif 23 | # 24 | # endif 25 | -------------------------------------------------------------------------------- /include/boost/preprocessor/seq/to_tuple.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_TO_TUPLE_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_TO_TUPLE_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_SEQ_TO_TUPLE */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_SEQ_TO_TUPLE(seq) (BOOST_PP_SEQ_ENUM(seq)) 22 | # else 23 | # define BOOST_PP_SEQ_TO_TUPLE(seq) BOOST_PP_SEQ_TO_TUPLE_I(seq) 24 | # define BOOST_PP_SEQ_TO_TUPLE_I(seq) (BOOST_PP_SEQ_ENUM(seq)) 25 | # endif 26 | # 27 | # endif 28 | -------------------------------------------------------------------------------- /include/spdlog/sinks/basic_file_sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | namespace spdlog { 14 | namespace sinks { 15 | 16 | template 17 | SPDLOG_INLINE basic_file_sink::basic_file_sink(const filename_t &filename, bool truncate) 18 | { 19 | file_helper_.open(filename, truncate); 20 | } 21 | 22 | template 23 | SPDLOG_INLINE const filename_t &basic_file_sink::filename() const 24 | { 25 | return file_helper_.filename(); 26 | } 27 | 28 | template 29 | SPDLOG_INLINE void basic_file_sink::sink_it_(const details::log_msg &msg) 30 | { 31 | memory_buf_t formatted; 32 | base_sink::formatter_->format(msg, formatted); 33 | file_helper_.write(formatted); 34 | } 35 | 36 | template 37 | SPDLOG_INLINE void basic_file_sink::flush_() 38 | { 39 | file_helper_.flush(); 40 | } 41 | 42 | } // namespace sinks 43 | } // namespace spdlog 44 | -------------------------------------------------------------------------------- /include/boost/preprocessor/seq/pop_front.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_POP_FRONT_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_POP_FRONT_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_SEQ_POP_FRONT */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_SEQ_POP_FRONT(seq) BOOST_PP_SEQ_TAIL(seq) 22 | # else 23 | # define BOOST_PP_SEQ_POP_FRONT(seq) BOOST_PP_SEQ_POP_FRONT_I(seq) 24 | # define BOOST_PP_SEQ_POP_FRONT_I(seq) BOOST_PP_SEQ_TAIL(seq) 25 | # endif 26 | # 27 | # endif 28 | -------------------------------------------------------------------------------- /include/boost/preprocessor/iteration/local.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP 13 | # define BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_LOCAL_ITERATE */ 20 | # 21 | # define BOOST_PP_LOCAL_ITERATE() 22 | # 23 | # define BOOST_PP_LOCAL_C(n) (BOOST_PP_LOCAL_S) <= n && (BOOST_PP_LOCAL_F) >= n 24 | # define BOOST_PP_LOCAL_R(n) (BOOST_PP_LOCAL_F) <= n && (BOOST_PP_LOCAL_S) >= n 25 | # 26 | # endif 27 | -------------------------------------------------------------------------------- /include/boost/preprocessor/variadic/to_seq.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_VARIADIC_TO_SEQ_HPP 14 | # define BOOST_PREPROCESSOR_VARIADIC_TO_SEQ_HPP 15 | # 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_VARIADIC_TO_SEQ */ 20 | # 21 | # if BOOST_PP_VARIADICS 22 | # define BOOST_PP_VARIADIC_TO_SEQ(...) BOOST_PP_TUPLE_TO_SEQ((__VA_ARGS__)) 23 | # endif 24 | # 25 | # endif 26 | -------------------------------------------------------------------------------- /include/spdlog/details/log_msg.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | struct SPDLOG_API log_msg 12 | { 13 | log_msg() = default; 14 | log_msg(log_clock::time_point log_time, source_loc loc, string_view_t logger_name, level::level_enum lvl, string_view_t msg); 15 | log_msg(source_loc loc, string_view_t logger_name, level::level_enum lvl, string_view_t msg); 16 | log_msg(string_view_t logger_name, level::level_enum lvl, string_view_t msg); 17 | log_msg(const log_msg &other) = default; 18 | 19 | string_view_t logger_name; 20 | level::level_enum level{level::off}; 21 | log_clock::time_point time; 22 | size_t thread_id{0}; 23 | 24 | // wrapping the formatted text with color (updated by pattern_formatter). 25 | mutable size_t color_range_start{0}; 26 | mutable size_t color_range_end{0}; 27 | 28 | source_loc source; 29 | string_view_t payload; 30 | }; 31 | } // namespace details 32 | } // namespace spdlog 33 | 34 | #ifdef SPDLOG_HEADER_ONLY 35 | #include "log_msg-inl.h" 36 | #endif 37 | -------------------------------------------------------------------------------- /include/spdlog/details/null_mutex.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | // null, no cost dummy "mutex" and dummy "atomic" int 9 | 10 | namespace spdlog { 11 | namespace details { 12 | struct null_mutex 13 | { 14 | void lock() const {} 15 | void unlock() const {} 16 | bool try_lock() const 17 | { 18 | return true; 19 | } 20 | }; 21 | 22 | struct null_atomic_int 23 | { 24 | int value; 25 | null_atomic_int() = default; 26 | 27 | explicit null_atomic_int(int new_value) 28 | : value(new_value) 29 | {} 30 | 31 | int load(std::memory_order = std::memory_order_relaxed) const 32 | { 33 | return value; 34 | } 35 | 36 | void store(int new_value, std::memory_order = std::memory_order_relaxed) 37 | { 38 | value = new_value; 39 | } 40 | 41 | int exchange(int new_value, std::memory_order = std::memory_order_relaxed) 42 | { 43 | std::swap(new_value, value); 44 | return new_value; // return value before the call 45 | } 46 | }; 47 | 48 | } // namespace details 49 | } // namespace spdlog 50 | -------------------------------------------------------------------------------- /include/spdlog/sinks/msvc_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2016 Alexander Dalshov. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #if defined(_WIN32) 7 | 8 | #include 9 | #include 10 | 11 | #include 12 | #include 13 | 14 | #include 15 | #include 16 | 17 | namespace spdlog { 18 | namespace sinks { 19 | /* 20 | * MSVC sink (logging using OutputDebugStringA) 21 | */ 22 | template 23 | class msvc_sink : public base_sink 24 | { 25 | public: 26 | explicit msvc_sink() {} 27 | 28 | protected: 29 | void sink_it_(const details::log_msg &msg) override 30 | { 31 | 32 | memory_buf_t formatted; 33 | base_sink::formatter_->format(msg, formatted); 34 | OutputDebugStringA(fmt::to_string(formatted).c_str()); 35 | } 36 | 37 | void flush_() override {} 38 | }; 39 | 40 | using msvc_sink_mt = msvc_sink; 41 | using msvc_sink_st = msvc_sink; 42 | 43 | using windebug_sink_mt = msvc_sink_mt; 44 | using windebug_sink_st = msvc_sink_st; 45 | 46 | } // namespace sinks 47 | } // namespace spdlog 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/Data_Logistics.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Data_Logistics.hpp" 3 | #include "utility.hpp" 4 | 5 | 6 | Data_Logistics::Data_Logistics(const Build_Params& build_params): 7 | params(build_params) 8 | {} 9 | 10 | 11 | const std::vector Data_Logistics::input_paths_collection() const 12 | { 13 | return params.sequence_input().seqs(); 14 | } 15 | 16 | 17 | const std::string Data_Logistics::working_dir_path() const 18 | { 19 | return dirname(params.output_prefix()); 20 | } 21 | 22 | 23 | const std::string Data_Logistics::edge_db_path() const 24 | { 25 | #ifdef CF_DEVELOP_MODE 26 | if(!params.edge_db_path().empty()) 27 | return params.edge_db_path(); 28 | #endif 29 | 30 | return params.working_dir_path() + filename(params.output_prefix()) + cuttlefish::file_ext::edges_ext; 31 | } 32 | 33 | 34 | const std::string Data_Logistics::vertex_db_path() const 35 | { 36 | #ifdef CF_DEVELOP_MODE 37 | if(!params.vertex_db_path().empty()) 38 | return params.vertex_db_path(); 39 | #endif 40 | 41 | return params.working_dir_path() + filename(params.output_prefix()) + cuttlefish::file_ext::vertices_ext; 42 | } 43 | 44 | 45 | const std::string Data_Logistics::output_file_path() const 46 | { 47 | return params.output_file_path(); 48 | } 49 | -------------------------------------------------------------------------------- /include/boost/preprocessor/variadic/to_list.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_VARIADIC_TO_LIST_HPP 14 | # define BOOST_PREPROCESSOR_VARIADIC_TO_LIST_HPP 15 | # 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_VARIADIC_TO_LIST */ 20 | # 21 | # if BOOST_PP_VARIADICS 22 | # define BOOST_PP_VARIADIC_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST((__VA_ARGS__)) 23 | # endif 24 | # 25 | # endif 26 | -------------------------------------------------------------------------------- /include/kmc_api/kmer_defs.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is a part of KMC software distributed under GNU GPL 3 licence. 3 | The homepage of the KMC project is http://sun.aei.polsl.pl/kmc 4 | 5 | Authors: Sebastian Deorowicz and Agnieszka Debudaj-Grabysz 6 | 7 | Version: 3.1.1 8 | Date : 2019-05-19 9 | */ 10 | 11 | 12 | #ifndef _KMER_DEFS_H 13 | #define _KMER_DEFS_H 14 | 15 | #define KMC_VER "3.1.1" 16 | #define KMC_DATE "2019-05-19" 17 | 18 | #ifndef MIN 19 | #define MIN(x,y) ((x) < (y) ? (x) : (y)) 20 | #endif 21 | 22 | #ifndef WIN32 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #define _TCHAR char 30 | #define _tmain main 31 | 32 | #define my_fopen fopen 33 | #define my_fseek fseek 34 | #define my_ftell ftell 35 | 36 | 37 | #include 38 | #include 39 | #include 40 | 41 | #else 42 | #define my_fopen fopen 43 | #define my_fseek _fseeki64 44 | #define my_ftell _ftelli64 45 | #endif 46 | //typedef unsigned char uchar; 47 | 48 | typedef int int32; 49 | typedef unsigned int uint32; 50 | typedef long long int64; 51 | typedef unsigned long long uint64; 52 | typedef unsigned char uchar; 53 | #endif 54 | 55 | // ***** EOF 56 | -------------------------------------------------------------------------------- /include/spdlog/cfg/log_levels.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | namespace spdlog { 11 | namespace cfg { 12 | class log_levels 13 | { 14 | std::unordered_map levels_; 15 | spdlog::level::level_enum default_level_ = level::info; 16 | 17 | public: 18 | void set(const std::string &logger_name, level::level_enum lvl) 19 | { 20 | if (logger_name.empty()) 21 | { 22 | default_level_ = lvl; 23 | } 24 | else 25 | { 26 | levels_[logger_name] = lvl; 27 | } 28 | } 29 | 30 | void set_default(level::level_enum lvl) 31 | { 32 | default_level_ = lvl; 33 | } 34 | 35 | level::level_enum get(const std::string &logger_name) 36 | { 37 | auto it = levels_.find(logger_name); 38 | return it != levels_.end() ? it->second : default_level_; 39 | } 40 | 41 | level::level_enum default_level() 42 | { 43 | return default_level_; 44 | } 45 | }; 46 | } // namespace cfg 47 | } // namespace spdlog 48 | -------------------------------------------------------------------------------- /include/spdlog/details/log_msg-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | 12 | namespace spdlog { 13 | namespace details { 14 | 15 | SPDLOG_INLINE log_msg::log_msg(spdlog::log_clock::time_point log_time, spdlog::source_loc loc, string_view_t a_logger_name, 16 | spdlog::level::level_enum lvl, spdlog::string_view_t msg) 17 | : logger_name(a_logger_name) 18 | , level(lvl) 19 | , time(log_time) 20 | #ifndef SPDLOG_NO_THREAD_ID 21 | , thread_id(os::thread_id()) 22 | #endif 23 | , source(loc) 24 | , payload(msg) 25 | {} 26 | 27 | SPDLOG_INLINE log_msg::log_msg( 28 | spdlog::source_loc loc, string_view_t a_logger_name, spdlog::level::level_enum lvl, spdlog::string_view_t msg) 29 | : log_msg(os::now(), loc, a_logger_name, lvl, msg) 30 | {} 31 | 32 | SPDLOG_INLINE log_msg::log_msg(string_view_t a_logger_name, spdlog::level::level_enum lvl, spdlog::string_view_t msg) 33 | : log_msg(os::now(), source_loc{}, a_logger_name, lvl, msg) 34 | {} 35 | 36 | } // namespace details 37 | } // namespace spdlog 38 | -------------------------------------------------------------------------------- /include/boost/preprocessor/facilities/overload.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2011. * 4 | # * (C) Copyright Edward Diener 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP 14 | # define BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP 15 | # 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_OVERLOAD */ 20 | # 21 | # if BOOST_PP_VARIADICS 22 | # define BOOST_PP_OVERLOAD(prefix, ...) BOOST_PP_CAT(prefix, BOOST_PP_VARIADIC_SIZE(__VA_ARGS__)) 23 | # endif 24 | # 25 | # endif 26 | -------------------------------------------------------------------------------- /include/boost/preprocessor/stringize.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_STRINGIZE_HPP 15 | # define BOOST_PREPROCESSOR_STRINGIZE_HPP 16 | # 17 | # include 18 | # 19 | # /* BOOST_PP_STRINGIZE */ 20 | # 21 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 22 | # define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_A((text)) 23 | # define BOOST_PP_STRINGIZE_A(arg) BOOST_PP_STRINGIZE_I arg 24 | # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 25 | # define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_OO((text)) 26 | # define BOOST_PP_STRINGIZE_OO(par) BOOST_PP_STRINGIZE_I ## par 27 | # else 28 | # define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text) 29 | # endif 30 | # 31 | #if BOOST_PP_VARIADICS 32 | # define BOOST_PP_STRINGIZE_I(...) #__VA_ARGS__ 33 | #else 34 | # define BOOST_PP_STRINGIZE_I(text) #text 35 | #endif 36 | # 37 | # endif 38 | -------------------------------------------------------------------------------- /include/boost/preprocessor/array/data.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ARRAY_DATA_HPP 13 | # define BOOST_PREPROCESSOR_ARRAY_DATA_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_ARRAY_DATA */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_ARRAY_DATA(array) BOOST_PP_TUPLE_ELEM(2, 1, array) 22 | # else 23 | # define BOOST_PP_ARRAY_DATA(array) BOOST_PP_ARRAY_DATA_I(array) 24 | # define BOOST_PP_ARRAY_DATA_I(array) BOOST_PP_ARRAY_DATA_II array 25 | # define BOOST_PP_ARRAY_DATA_II(size, data) data 26 | # endif 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /include/boost/preprocessor/array/size.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ARRAY_SIZE_HPP 13 | # define BOOST_PREPROCESSOR_ARRAY_SIZE_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_ARRAY_SIZE */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_TUPLE_ELEM(2, 0, array) 22 | # else 23 | # define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_ARRAY_SIZE_I(array) 24 | # define BOOST_PP_ARRAY_SIZE_I(array) BOOST_PP_ARRAY_SIZE_II array 25 | # define BOOST_PP_ARRAY_SIZE_II(size, data) size 26 | # endif 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /include/boost/preprocessor/variadic.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_VARIADIC_HPP 14 | # define BOOST_PREPROCESSOR_VARIADIC_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # 23 | # endif 24 | -------------------------------------------------------------------------------- /src/kmc_api/mmer.cpp: -------------------------------------------------------------------------------- 1 | #include "kmc_api/stdafx.h" 2 | /* 3 | This file is a part of KMC software distributed under GNU GPL 3 licence. 4 | The homepage of the KMC project is http://sun.aei.polsl.pl/kmc 5 | 6 | Authors: Sebastian Deorowicz, Agnieszka Debudaj-Grabysz, Marek Kokot 7 | 8 | Version: 3.1.1 9 | Date : 2019-05-19 10 | */ 11 | 12 | #include "kmc_api/mmer.h" 13 | 14 | 15 | uint32 CMmer::norm5[]; 16 | uint32 CMmer::norm6[]; 17 | uint32 CMmer::norm7[]; 18 | uint32 CMmer::norm8[]; 19 | uint32 CMmer::norm9[]; 20 | uint32 CMmer::norm10[]; 21 | uint32 CMmer::norm11[]; 22 | 23 | CMmer::_si CMmer::_init; 24 | 25 | 26 | //-------------------------------------------------------------------------- 27 | CMmer::CMmer(uint32 _len) 28 | { 29 | switch (_len) 30 | { 31 | case 5: 32 | norm = norm5; 33 | break; 34 | case 6: 35 | norm = norm6; 36 | break; 37 | case 7: 38 | norm = norm7; 39 | break; 40 | case 8: 41 | norm = norm8; 42 | break; 43 | case 9: 44 | norm = norm9; 45 | break; 46 | case 10: 47 | norm = norm10; 48 | break; 49 | case 11: 50 | norm = norm11; 51 | break; 52 | default: 53 | break; 54 | } 55 | len = _len; 56 | mask = (1 << _len * 2) - 1; 57 | str = 0; 58 | } 59 | 60 | //-------------------------------------------------------------------------- 61 | 62 | -------------------------------------------------------------------------------- /include/boost/preprocessor/facilities.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002-2011. * 4 | # * (C) Copyright Edward Diener 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_FACILITIES_HPP 14 | # define BOOST_PREPROCESSOR_FACILITIES_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # 23 | # endif 24 | -------------------------------------------------------------------------------- /include/spdlog/details/periodic_worker.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | // periodic worker thread - periodically executes the given callback function. 7 | // 8 | // RAII over the owned thread: 9 | // creates the thread on construction. 10 | // stops and joins the thread on destruction (if the thread is executing a callback, wait for it to finish first). 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | namespace spdlog { 18 | namespace details { 19 | 20 | class SPDLOG_API periodic_worker 21 | { 22 | public: 23 | periodic_worker(const std::function &callback_fun, std::chrono::seconds interval); 24 | periodic_worker(const periodic_worker &) = delete; 25 | periodic_worker &operator=(const periodic_worker &) = delete; 26 | // stop the worker thread and join it 27 | ~periodic_worker(); 28 | 29 | private: 30 | bool active_; 31 | std::thread worker_thread_; 32 | std::mutex mutex_; 33 | std::condition_variable cv_; 34 | }; 35 | } // namespace details 36 | } // namespace spdlog 37 | 38 | #ifdef SPDLOG_HEADER_ONLY 39 | #include "periodic_worker-inl.h" 40 | #endif 41 | -------------------------------------------------------------------------------- /include/boost/preprocessor/seq/to_array.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_TO_ARRAY_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_TO_ARRAY_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_SEQ_TO_ARRAY */ 20 | # 21 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 22 | # define BOOST_PP_SEQ_TO_ARRAY(seq) (BOOST_PP_SEQ_SIZE(seq), (BOOST_PP_SEQ_ENUM(seq))) 23 | # else 24 | # define BOOST_PP_SEQ_TO_ARRAY(seq) BOOST_PP_SEQ_TO_ARRAY_I(seq) 25 | # define BOOST_PP_SEQ_TO_ARRAY_I(seq) (BOOST_PP_SEQ_SIZE(seq), (BOOST_PP_SEQ_ENUM(seq))) 26 | # endif 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /include/boost/preprocessor/comparison/greater.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_COMPARISON_GREATER_HPP 15 | # define BOOST_PREPROCESSOR_COMPARISON_GREATER_HPP 16 | # 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_GREATER */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_GREATER(x, y) BOOST_PP_LESS(y, x) 24 | # else 25 | # define BOOST_PP_GREATER(x, y) BOOST_PP_GREATER_I(x, y) 26 | # define BOOST_PP_GREATER_I(x, y) BOOST_PP_LESS(y, x) 27 | # endif 28 | # 29 | # /* BOOST_PP_GREATER_D */ 30 | # 31 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 32 | # define BOOST_PP_GREATER_D(d, x, y) BOOST_PP_LESS_D(d, y, x) 33 | # else 34 | # define BOOST_PP_GREATER_D(d, x, y) BOOST_PP_GREATER_D_I(d, x, y) 35 | # define BOOST_PP_GREATER_D_I(d, x, y) BOOST_PP_LESS_D(d, y, x) 36 | # endif 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /include/spdlog/details/backtracer.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | // Store log messages in circular buffer. 14 | // Useful for storing debug data in case of error/warning happens. 15 | 16 | namespace spdlog { 17 | namespace details { 18 | class SPDLOG_API backtracer 19 | { 20 | mutable std::mutex mutex_; 21 | std::atomic enabled_{false}; 22 | circular_q messages_; 23 | 24 | public: 25 | backtracer() = default; 26 | backtracer(const backtracer &other); 27 | 28 | backtracer(backtracer &&other) SPDLOG_NOEXCEPT; 29 | backtracer &operator=(backtracer other); 30 | 31 | void enable(size_t size); 32 | void disable(); 33 | bool enabled() const; 34 | void push_back(const log_msg &msg); 35 | 36 | // pop all items in the q and apply the given fun on each of them. 37 | void foreach_pop(std::function fun); 38 | }; 39 | 40 | } // namespace details 41 | } // namespace spdlog 42 | 43 | #ifdef SPDLOG_HEADER_ONLY 44 | #include "backtracer-inl.h" 45 | #endif -------------------------------------------------------------------------------- /include/boost/preprocessor/tuple/push_back.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2013. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_TUPLE_PUSH_BACK_HPP 13 | # define BOOST_PREPROCESSOR_TUPLE_PUSH_BACK_HPP 14 | # 15 | # include 16 | # 17 | # if BOOST_PP_VARIADICS 18 | # 19 | # include 20 | # include 21 | # include 22 | # 23 | # /* BOOST_PP_TUPLE_PUSH_BACK */ 24 | # 25 | # define BOOST_PP_TUPLE_PUSH_BACK(tuple, elem) \ 26 | BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_PUSH_BACK(BOOST_PP_TUPLE_TO_ARRAY(tuple), elem)) \ 27 | /**/ 28 | # 29 | # endif // BOOST_PP_VARIADICS 30 | # 31 | # endif // BOOST_PREPROCESSOR_TUPLE_PUSH_BACK_HPP 32 | -------------------------------------------------------------------------------- /include/boost/preprocessor/list/to_seq.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* Revised by Paul Mensonides (2011) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_TO_SEQ_HPP 15 | # define BOOST_PREPROCESSOR_LIST_TO_SEQ_HPP 16 | # 17 | # include 18 | # 19 | # /* BOOST_PP_LIST_TO_SEQ */ 20 | # 21 | # define BOOST_PP_LIST_TO_SEQ(list) \ 22 | BOOST_PP_LIST_FOR_EACH(BOOST_PP_LIST_TO_SEQ_MACRO, ~, list) \ 23 | /**/ 24 | # define BOOST_PP_LIST_TO_SEQ_MACRO(r, data, elem) (elem) 25 | # 26 | # /* BOOST_PP_LIST_TO_SEQ_R */ 27 | # 28 | # define BOOST_PP_LIST_TO_SEQ_R(r, list) \ 29 | BOOST_PP_LIST_FOR_EACH_R(r, BOOST_PP_LIST_TO_SEQ_MACRO, ~, list) \ 30 | /**/ 31 | # 32 | # endif /* BOOST_PREPROCESSOR_LIST_TO_SEQ_HPP */ 33 | -------------------------------------------------------------------------------- /include/boost/preprocessor/seq/subseq.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_SUBSEQ_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_SUBSEQ_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_SEQ_SUBSEQ */ 20 | # 21 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 22 | # define BOOST_PP_SEQ_SUBSEQ(seq, i, len) BOOST_PP_SEQ_FIRST_N(len, BOOST_PP_SEQ_REST_N(i, seq)) 23 | # else 24 | # define BOOST_PP_SEQ_SUBSEQ(seq, i, len) BOOST_PP_SEQ_SUBSEQ_I(seq, i, len) 25 | # define BOOST_PP_SEQ_SUBSEQ_I(seq, i, len) BOOST_PP_SEQ_FIRST_N(len, BOOST_PP_SEQ_REST_N(i, seq)) 26 | # endif 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /include/boost/preprocessor/tuple/push_front.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2013. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_TUPLE_PUSH_FRONT_HPP 13 | # define BOOST_PREPROCESSOR_TUPLE_PUSH_FRONT_HPP 14 | # 15 | # include 16 | # 17 | # if BOOST_PP_VARIADICS 18 | # 19 | # include 20 | # include 21 | # include 22 | # 23 | # 24 | # /* BOOST_PP_TUPLE_PUSH_FRONT */ 25 | # 26 | # define BOOST_PP_TUPLE_PUSH_FRONT(tuple, elem) \ 27 | BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_PUSH_FRONT(BOOST_PP_TUPLE_TO_ARRAY(tuple), elem)) \ 28 | /**/ 29 | # 30 | # endif // BOOST_PP_VARIADICS 31 | # 32 | # endif // BOOST_PREPROCESSOR_TUPLE_PUSH_FRONT_HPP 33 | -------------------------------------------------------------------------------- /include/boost/preprocessor/facilities/is_empty_or_1.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2003. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_OR_1_HPP 13 | # define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_OR_1_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_IS_EMPTY_OR_1 */ 22 | # 23 | # define BOOST_PP_IS_EMPTY_OR_1(x) \ 24 | BOOST_PP_IIF( \ 25 | BOOST_PP_IS_EMPTY(x BOOST_PP_EMPTY()), \ 26 | BOOST_PP_IDENTITY(1), \ 27 | BOOST_PP_IS_1 \ 28 | )(x) \ 29 | /**/ 30 | # 31 | # endif 32 | -------------------------------------------------------------------------------- /include/Output_Sink.hpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef OUTPUT_SINK_HPP 3 | #define OUTPUT_SINK_HPP 4 | 5 | 6 | 7 | #include "Async_Logger_Wrapper.hpp" 8 | #include "spdlog/spdlog.h" 9 | 10 | #include 11 | #include 12 | 13 | 14 | // A basic sink wrapper with minimal functionality — open, get reference to the wrapped sink, and close. 15 | template 16 | class Output_Sink 17 | {}; 18 | 19 | 20 | template <> 21 | class Output_Sink 22 | { 23 | private: 24 | 25 | std::ofstream output_; 26 | 27 | 28 | public: 29 | 30 | void init_sink(const std::string& output_file_path) 31 | { 32 | output_ = std::ofstream(output_file_path); 33 | } 34 | 35 | std::ofstream& sink() 36 | { 37 | return output_; 38 | } 39 | 40 | void close_sink() 41 | { 42 | output_.close(); 43 | } 44 | }; 45 | 46 | 47 | template <> 48 | class Output_Sink 49 | { 50 | private: 51 | 52 | Async_Logger_Wrapper output_; 53 | 54 | 55 | public: 56 | 57 | void init_sink(const std::string& output_file_path) 58 | { 59 | output_.init_logger(output_file_path); 60 | } 61 | 62 | Async_Logger_Wrapper& sink() 63 | { 64 | return output_; 65 | } 66 | 67 | void close_sink() 68 | { 69 | output_.close_logger(); 70 | } 71 | }; 72 | 73 | 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /include/boost/preprocessor/control/expr_iif.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_CONTROL_EXPR_IIF_HPP 13 | # define BOOST_PREPROCESSOR_CONTROL_EXPR_IIF_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_EXPR_IIF */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_EXPR_IIF(bit, expr) BOOST_PP_EXPR_IIF_I(bit, expr) 21 | # else 22 | # define BOOST_PP_EXPR_IIF(bit, expr) BOOST_PP_EXPR_IIF_OO((bit, expr)) 23 | # define BOOST_PP_EXPR_IIF_OO(par) BOOST_PP_EXPR_IIF_I ## par 24 | # endif 25 | # 26 | # define BOOST_PP_EXPR_IIF_I(bit, expr) BOOST_PP_EXPR_IIF_ ## bit(expr) 27 | # 28 | # define BOOST_PP_EXPR_IIF_0(expr) 29 | # define BOOST_PP_EXPR_IIF_1(expr) expr 30 | # 31 | # endif 32 | -------------------------------------------------------------------------------- /include/boost/preprocessor/detail/is_unary.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DETAIL_IS_UNARY_HPP 13 | # define BOOST_PREPROCESSOR_DETAIL_IS_UNARY_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_IS_UNARY */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_IS_UNARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_UNARY_CHECK) 22 | # else 23 | # define BOOST_PP_IS_UNARY(x) BOOST_PP_IS_UNARY_I(x) 24 | # define BOOST_PP_IS_UNARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_UNARY_CHECK) 25 | # endif 26 | # 27 | # define BOOST_PP_IS_UNARY_CHECK(a) 1 28 | # define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_UNARY_CHECK 0, BOOST_PP_NIL 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /include/boost/preprocessor/seq/insert.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_INSERT_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_INSERT_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # 19 | # /* BOOST_PP_SEQ_INSERT */ 20 | # 21 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 22 | # define BOOST_PP_SEQ_INSERT(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(i, seq) 23 | # else 24 | # define BOOST_PP_SEQ_INSERT(seq, i, elem) BOOST_PP_SEQ_INSERT_I(seq, i, elem) 25 | # define BOOST_PP_SEQ_INSERT_I(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(i, seq) 26 | # endif 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /include/boost/preprocessor/detail/is_binary.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP 13 | # define BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_IS_BINARY */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_IS_BINARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK) 22 | # else 23 | # define BOOST_PP_IS_BINARY(x) BOOST_PP_IS_BINARY_I(x) 24 | # define BOOST_PP_IS_BINARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK) 25 | # endif 26 | # 27 | # define BOOST_PP_IS_BINARY_CHECK(a, b) 1 28 | # define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_BINARY_CHECK 0, BOOST_PP_NIL 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /include/spdlog/sinks/stdout_color_sinks-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | namespace spdlog { 14 | 15 | template 16 | SPDLOG_INLINE std::shared_ptr stdout_color_mt(const std::string &logger_name, color_mode mode) 17 | { 18 | return Factory::template create(logger_name, mode); 19 | } 20 | 21 | template 22 | SPDLOG_INLINE std::shared_ptr stdout_color_st(const std::string &logger_name, color_mode mode) 23 | { 24 | return Factory::template create(logger_name, mode); 25 | } 26 | 27 | template 28 | SPDLOG_INLINE std::shared_ptr stderr_color_mt(const std::string &logger_name, color_mode mode) 29 | { 30 | return Factory::template create(logger_name, mode); 31 | } 32 | 33 | template 34 | SPDLOG_INLINE std::shared_ptr stderr_color_st(const std::string &logger_name, color_mode mode) 35 | { 36 | return Factory::template create(logger_name, mode); 37 | } 38 | } // namespace spdlog -------------------------------------------------------------------------------- /include/boost/preprocessor/detail/is_nullary.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_DETAIL_IS_NULLARY_HPP 13 | # define BOOST_PREPROCESSOR_DETAIL_IS_NULLARY_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_IS_NULLARY */ 19 | # 20 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 21 | # define BOOST_PP_IS_NULLARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_NULLARY_CHECK) 22 | # else 23 | # define BOOST_PP_IS_NULLARY(x) BOOST_PP_IS_NULLARY_I(x) 24 | # define BOOST_PP_IS_NULLARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_NULLARY_CHECK) 25 | # endif 26 | # 27 | # define BOOST_PP_IS_NULLARY_CHECK() 1 28 | # define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_NULLARY_CHECK 0, BOOST_PP_NIL 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /include/boost/preprocessor/tuple/size.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_TUPLE_SIZE_HPP 14 | # define BOOST_PREPROCESSOR_TUPLE_SIZE_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # 20 | # if BOOST_PP_VARIADICS 21 | # if BOOST_PP_VARIADICS_MSVC 22 | # define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE tuple,) 23 | # else 24 | # define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_VARIADIC_SIZE tuple 25 | # endif 26 | # endif 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /include/boost/preprocessor/seq/pop_back.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_POP_BACK_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_POP_BACK_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_SEQ_POP_BACK */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_SEQ_POP_BACK(seq) BOOST_PP_SEQ_FIRST_N(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), seq) 24 | # else 25 | # define BOOST_PP_SEQ_POP_BACK(seq) BOOST_PP_SEQ_POP_BACK_I(seq) 26 | # define BOOST_PP_SEQ_POP_BACK_I(seq) BOOST_PP_SEQ_FIRST_N(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), seq) 27 | # endif 28 | # 29 | # endif 30 | -------------------------------------------------------------------------------- /include/boost/preprocessor/tuple.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # /* Revised by Edward Diener (2011,2013) */ 12 | # 13 | # /* See http://www.boost.org for most recent version. */ 14 | # 15 | # ifndef BOOST_PREPROCESSOR_TUPLE_HPP 16 | # define BOOST_PREPROCESSOR_TUPLE_HPP 17 | # 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # include 24 | # include 25 | # include 26 | # include 27 | # include 28 | # include 29 | # include 30 | # include 31 | # include 32 | # include 33 | # include 34 | # 35 | # endif 36 | -------------------------------------------------------------------------------- /include/spdlog/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Gabi Melman. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | 23 | -- NOTE: Third party dependency used by this software -- 24 | This software depends on the fmt lib (MIT License), 25 | and users must comply to its license: https://github.com/fmtlib/fmt/blob/master/LICENSE.rst 26 | -------------------------------------------------------------------------------- /include/boost/LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /include/boost/preprocessor/seq/remove.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_REMOVE_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_REMOVE_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_SEQ_REMOVE */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_SEQ_REMOVE(seq, i) BOOST_PP_SEQ_FIRST_N(i, seq) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) 24 | # else 25 | # define BOOST_PP_SEQ_REMOVE(seq, i) BOOST_PP_SEQ_REMOVE_I(seq, i) 26 | # define BOOST_PP_SEQ_REMOVE_I(seq, i) BOOST_PP_SEQ_FIRST_N(i, seq) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) 27 | # endif 28 | # 29 | # endif 30 | -------------------------------------------------------------------------------- /include/spdlog/sinks/null_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | namespace spdlog { 13 | namespace sinks { 14 | 15 | template 16 | class null_sink : public base_sink 17 | { 18 | protected: 19 | void sink_it_(const details::log_msg &) override {} 20 | void flush_() override {} 21 | }; 22 | 23 | using null_sink_mt = null_sink; 24 | using null_sink_st = null_sink; 25 | 26 | } // namespace sinks 27 | 28 | template 29 | inline std::shared_ptr null_logger_mt(const std::string &logger_name) 30 | { 31 | auto null_logger = Factory::template create(logger_name); 32 | null_logger->set_level(level::off); 33 | return null_logger; 34 | } 35 | 36 | template 37 | inline std::shared_ptr null_logger_st(const std::string &logger_name) 38 | { 39 | auto null_logger = Factory::template create(logger_name); 40 | null_logger->set_level(level::off); 41 | return null_logger; 42 | } 43 | 44 | } // namespace spdlog 45 | -------------------------------------------------------------------------------- /include/boost/preprocessor/selection/max.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_SELECTION_MAX_HPP 15 | # define BOOST_PREPROCESSOR_SELECTION_MAX_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_MAX */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_MAX(x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL(x, y), y, x) 25 | # else 26 | # define BOOST_PP_MAX(x, y) BOOST_PP_MAX_I(x, y) 27 | # define BOOST_PP_MAX_I(x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL(x, y), y, x) 28 | # endif 29 | # 30 | # /* BOOST_PP_MAX_D */ 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_MAX_D(d, x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL_D(d, x, y), y, x) 34 | # else 35 | # define BOOST_PP_MAX_D(d, x, y) BOOST_PP_MAX_D_I(d, x, y) 36 | # define BOOST_PP_MAX_D_I(d, x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL_D(d, x, y), y, x) 37 | # endif 38 | # 39 | # endif 40 | -------------------------------------------------------------------------------- /include/boost/preprocessor/selection/min.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_SELECTION_MIN_HPP 15 | # define BOOST_PREPROCESSOR_SELECTION_MIN_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_MIN */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_MIN(x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL(y, x), y, x) 25 | # else 26 | # define BOOST_PP_MIN(x, y) BOOST_PP_MIN_I(x, y) 27 | # define BOOST_PP_MIN_I(x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL(y, x), y, x) 28 | # endif 29 | # 30 | # /* BOOST_PP_MIN_D */ 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_MIN_D(d, x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL_D(d, y, x), y, x) 34 | # else 35 | # define BOOST_PP_MIN_D(d, x, y) BOOST_PP_MIN_D_I(d, x, y) 36 | # define BOOST_PP_MIN_D_I(d, x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL_D(d, y, x), y, x) 37 | # endif 38 | # 39 | # endif 40 | -------------------------------------------------------------------------------- /include/boost/preprocessor/wstringize.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_WSTRINGIZE_HPP 13 | # define BOOST_PREPROCESSOR_WSTRINGIZE_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_WSTRINGIZE */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_WSTRINGIZE(text) BOOST_PP_WSTRINGIZE_I(text) 21 | # else 22 | # define BOOST_PP_WSTRINGIZE(text) BOOST_PP_WSTRINGIZE_OO((text)) 23 | # define BOOST_PP_WSTRINGIZE_OO(par) BOOST_PP_WSTRINGIZE_I ## par 24 | # endif 25 | # 26 | #if BOOST_PP_VARIADICS 27 | # define BOOST_PP_WSTRINGIZE_I(...) BOOST_PP_WSTRINGIZE_II(#__VA_ARGS__) 28 | #else 29 | # define BOOST_PP_WSTRINGIZE_I(text) BOOST_PP_WSTRINGIZE_II(#text) 30 | #endif 31 | # define BOOST_PP_WSTRINGIZE_II(str) L ## str 32 | # 33 | # endif 34 | -------------------------------------------------------------------------------- /include/boost/preprocessor/array/elem.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ARRAY_ELEM_HPP 13 | # define BOOST_PREPROCESSOR_ARRAY_ELEM_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_ARRAY_ELEM */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array)) 24 | # else 25 | # define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_ARRAY_ELEM_I(i, array) 26 | # define BOOST_PP_ARRAY_ELEM_I(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array)) 27 | # endif 28 | # 29 | # endif 30 | -------------------------------------------------------------------------------- /include/boost/preprocessor/comparison/greater_equal.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_COMPARISON_GREATER_EQUAL_HPP 15 | # define BOOST_PREPROCESSOR_COMPARISON_GREATER_EQUAL_HPP 16 | # 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_GREATER_EQUAL */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_GREATER_EQUAL(x, y) BOOST_PP_LESS_EQUAL(y, x) 24 | # else 25 | # define BOOST_PP_GREATER_EQUAL(x, y) BOOST_PP_GREATER_EQUAL_I(x, y) 26 | # define BOOST_PP_GREATER_EQUAL_I(x, y) BOOST_PP_LESS_EQUAL(y, x) 27 | # endif 28 | # 29 | # /* BOOST_PP_GREATER_EQUAL_D */ 30 | # 31 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 32 | # define BOOST_PP_GREATER_EQUAL_D(d, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x) 33 | # else 34 | # define BOOST_PP_GREATER_EQUAL_D(d, x, y) BOOST_PP_GREATER_EQUAL_D_I(d, x, y) 35 | # define BOOST_PP_GREATER_EQUAL_D_I(d, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x) 36 | # endif 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /include/boost/preprocessor/array/to_tuple.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_ARRAY_TO_TUPLE_HPP 14 | # define BOOST_PREPROCESSOR_ARRAY_TO_TUPLE_HPP 15 | # 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_ARRAY_TO_TUPLE */ 21 | # 22 | # define BOOST_PP_ARRAY_TO_TUPLE(array) \ 23 | BOOST_PP_IF \ 24 | ( \ 25 | BOOST_PP_ARRAY_SIZE(array), \ 26 | BOOST_PP_ARRAY_DATA, \ 27 | BOOST_PP_ARRAY_TO_TUPLE_EMPTY \ 28 | ) \ 29 | (array) \ 30 | /**/ 31 | # define BOOST_PP_ARRAY_TO_TUPLE_EMPTY(array) 32 | # 33 | # endif 34 | -------------------------------------------------------------------------------- /include/Data_Logistics.hpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DATA_LOGISTICS_HPP 3 | #define DATA_LOGISTICS_HPP 4 | 5 | 6 | 7 | #include "Build_Params.hpp" 8 | 9 | #include 10 | #include 11 | 12 | 13 | // ============================================================================= 14 | // A class to govern the logistical policies regarding the various data used— 15 | // either as input, output, or temporary—during the lifetime of Cuttlefish. 16 | class Data_Logistics 17 | { 18 | private: 19 | 20 | const Build_Params& params; // The construction parameters passed to Cuttlefish. 21 | 22 | 23 | public: 24 | 25 | // Constructs a logistics manager object for the parameters in `params`. 26 | Data_Logistics(const Build_Params& build_params); 27 | 28 | // Returns the collection of file paths that are input to Cuttlefish. 29 | const std::vector input_paths_collection() const; 30 | 31 | // Returns the path prefix for temporary files used by Cuttlefish. 32 | const std::string working_dir_path() const; 33 | 34 | // Returns the path prefix to the edge database being used by Cuttlefish. 35 | const std::string edge_db_path() const; 36 | 37 | // Returns the path prefix to the vertex database being used by Cuttlefish. 38 | const std::string vertex_db_path() const; 39 | 40 | // Returns the path to the final output file by Cuttlefish. 41 | const std::string output_file_path() const; 42 | }; 43 | 44 | 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /include/boost/preprocessor/arithmetic/div.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_ARITHMETIC_DIV_HPP 15 | # define BOOST_PREPROCESSOR_ARITHMETIC_DIV_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_DIV */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_DIV(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE(x, y)) 25 | # else 26 | # define BOOST_PP_DIV(x, y) BOOST_PP_DIV_I(x, y) 27 | # define BOOST_PP_DIV_I(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE(x, y)) 28 | # endif 29 | # 30 | # /* BOOST_PP_DIV_D */ 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_DIV_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE_D(d, x, y)) 34 | # else 35 | # define BOOST_PP_DIV_D(d, x, y) BOOST_PP_DIV_D_I(d, x, y) 36 | # define BOOST_PP_DIV_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE_D(d, x, y)) 37 | # endif 38 | # 39 | # endif 40 | -------------------------------------------------------------------------------- /include/boost/preprocessor/arithmetic/mod.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_ARITHMETIC_MOD_HPP 15 | # define BOOST_PREPROCESSOR_ARITHMETIC_MOD_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_MOD */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_MOD(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y)) 25 | # else 26 | # define BOOST_PP_MOD(x, y) BOOST_PP_MOD_I(x, y) 27 | # define BOOST_PP_MOD_I(x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE(x, y)) 28 | # endif 29 | # 30 | # /* BOOST_PP_MOD_D */ 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_MOD_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y)) 34 | # else 35 | # define BOOST_PP_MOD_D(d, x, y) BOOST_PP_MOD_D_I(d, x, y) 36 | # define BOOST_PP_MOD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 1, BOOST_PP_DIV_BASE_D(d, x, y)) 37 | # endif 38 | # 39 | # endif 40 | -------------------------------------------------------------------------------- /include/boost/preprocessor/comparison/less_equal.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_COMPARISON_LESS_EQUAL_HPP 15 | # define BOOST_PREPROCESSOR_COMPARISON_LESS_EQUAL_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_LESS_EQUAL */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_LESS_EQUAL(x, y) BOOST_PP_NOT(BOOST_PP_SUB(x, y)) 25 | # else 26 | # define BOOST_PP_LESS_EQUAL(x, y) BOOST_PP_LESS_EQUAL_I(x, y) 27 | # define BOOST_PP_LESS_EQUAL_I(x, y) BOOST_PP_NOT(BOOST_PP_SUB(x, y)) 28 | # endif 29 | # 30 | # /* BOOST_PP_LESS_EQUAL_D */ 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_LESS_EQUAL_D(d, x, y) BOOST_PP_NOT(BOOST_PP_SUB_D(d, x, y)) 34 | # else 35 | # define BOOST_PP_LESS_EQUAL_D(d, x, y) BOOST_PP_LESS_EQUAL_D_I(d, x, y) 36 | # define BOOST_PP_LESS_EQUAL_D_I(d, x, y) BOOST_PP_NOT(BOOST_PP_SUB_D(d, x, y)) 37 | # endif 38 | # 39 | # endif 40 | -------------------------------------------------------------------------------- /include/spdlog/details/periodic_worker-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | namespace spdlog { 11 | namespace details { 12 | 13 | SPDLOG_INLINE periodic_worker::periodic_worker(const std::function &callback_fun, std::chrono::seconds interval) 14 | { 15 | active_ = (interval > std::chrono::seconds::zero()); 16 | if (!active_) 17 | { 18 | return; 19 | } 20 | 21 | worker_thread_ = std::thread([this, callback_fun, interval]() { 22 | for (;;) 23 | { 24 | std::unique_lock lock(this->mutex_); 25 | if (this->cv_.wait_for(lock, interval, [this] { return !this->active_; })) 26 | { 27 | return; // active_ == false, so exit this thread 28 | } 29 | callback_fun(); 30 | } 31 | }); 32 | } 33 | 34 | // stop the worker thread and join it 35 | SPDLOG_INLINE periodic_worker::~periodic_worker() 36 | { 37 | if (worker_thread_.joinable()) 38 | { 39 | { 40 | std::lock_guard lock(mutex_); 41 | active_ = false; 42 | } 43 | cv_.notify_one(); 44 | worker_thread_.join(); 45 | } 46 | } 47 | 48 | } // namespace details 49 | } // namespace spdlog 50 | -------------------------------------------------------------------------------- /include/boost/preprocessor/logical/compl.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_LOGICAL_COMPL_HPP 13 | # define BOOST_PREPROCESSOR_LOGICAL_COMPL_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_COMPL */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_COMPL(x) BOOST_PP_COMPL_I(x) 21 | # else 22 | # define BOOST_PP_COMPL(x) BOOST_PP_COMPL_OO((x)) 23 | # define BOOST_PP_COMPL_OO(par) BOOST_PP_COMPL_I ## par 24 | # endif 25 | # 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 27 | # define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ ## x 28 | # else 29 | # define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ID(BOOST_PP_COMPL_ ## x) 30 | # define BOOST_PP_COMPL_ID(id) id 31 | # endif 32 | # 33 | # define BOOST_PP_COMPL_0 1 34 | # define BOOST_PP_COMPL_1 0 35 | # 36 | # endif 37 | -------------------------------------------------------------------------------- /include/boost/preprocessor/control/iif.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_CONTROL_IIF_HPP 13 | # define BOOST_PREPROCESSOR_CONTROL_IIF_HPP 14 | # 15 | # include "boost/preprocessor/config/config.hpp" 16 | # 17 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 18 | # define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_I(bit, t, f) 19 | # else 20 | # define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_OO((bit, t, f)) 21 | # define BOOST_PP_IIF_OO(par) BOOST_PP_IIF_I ## par 22 | # endif 23 | # 24 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 25 | # define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_ ## bit(t, f) 26 | # else 27 | # define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_II(BOOST_PP_IIF_ ## bit(t, f)) 28 | # define BOOST_PP_IIF_II(id) id 29 | # endif 30 | # 31 | # define BOOST_PP_IIF_0(t, f) f 32 | # define BOOST_PP_IIF_1(t, f) t 33 | # 34 | # endif 35 | -------------------------------------------------------------------------------- /include/spdlog/sinks/ostream_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | namespace spdlog { 13 | namespace sinks { 14 | template 15 | class ostream_sink final : public base_sink 16 | { 17 | public: 18 | explicit ostream_sink(std::ostream &os, bool force_flush = false) 19 | : ostream_(os) 20 | , force_flush_(force_flush) 21 | {} 22 | ostream_sink(const ostream_sink &) = delete; 23 | ostream_sink &operator=(const ostream_sink &) = delete; 24 | 25 | protected: 26 | void sink_it_(const details::log_msg &msg) override 27 | { 28 | memory_buf_t formatted; 29 | base_sink::formatter_->format(msg, formatted); 30 | ostream_.write(formatted.data(), static_cast(formatted.size())); 31 | if (force_flush_) 32 | { 33 | ostream_.flush(); 34 | } 35 | } 36 | 37 | void flush_() override 38 | { 39 | ostream_.flush(); 40 | } 41 | 42 | std::ostream &ostream_; 43 | bool force_flush_; 44 | }; 45 | 46 | using ostream_sink_mt = ostream_sink; 47 | using ostream_sink_st = ostream_sink; 48 | 49 | } // namespace sinks 50 | } // namespace spdlog 51 | -------------------------------------------------------------------------------- /include/boost/preprocessor/slot/slot.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SLOT_SLOT_HPP 13 | # define BOOST_PREPROCESSOR_SLOT_SLOT_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_ASSIGN_SLOT */ 19 | # 20 | # define BOOST_PP_ASSIGN_SLOT(i) BOOST_PP_CAT(BOOST_PP_ASSIGN_SLOT_, i) 21 | # 22 | # define BOOST_PP_ASSIGN_SLOT_1 23 | # define BOOST_PP_ASSIGN_SLOT_2 24 | # define BOOST_PP_ASSIGN_SLOT_3 25 | # define BOOST_PP_ASSIGN_SLOT_4 26 | # define BOOST_PP_ASSIGN_SLOT_5 27 | # 28 | # /* BOOST_PP_SLOT */ 29 | # 30 | # define BOOST_PP_SLOT(i) BOOST_PP_CAT(BOOST_PP_SLOT_, i)() 31 | # 32 | # endif 33 | -------------------------------------------------------------------------------- /include/boost/preprocessor/seq/variadic_seq_to_seq.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2012. * 4 | # * Distributed under the Boost Software License, Version 1.0. (See * 5 | # * accompanying file LICENSE_1_0.txt or copy at * 6 | # * http://www.boost.org/LICENSE_1_0.txt) * 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_VARIADIC_SEQ_TO_SEQ_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_VARIADIC_SEQ_TO_SEQ_HPP 14 | # 15 | # include 16 | # include 17 | # 18 | # /* BOOST_PP_VARIADIC_SEQ_TO_SEQ */ 19 | # 20 | # if BOOST_PP_VARIADICS 21 | # define BOOST_PP_VARIADIC_SEQ_TO_SEQ(vseq) BOOST_PP_CAT(BOOST_PP_VARIADIC_SEQ_TO_SEQ_A vseq, 0) 22 | # define BOOST_PP_VARIADIC_SEQ_TO_SEQ_A(...) ((__VA_ARGS__)) BOOST_PP_VARIADIC_SEQ_TO_SEQ_B 23 | # define BOOST_PP_VARIADIC_SEQ_TO_SEQ_B(...) ((__VA_ARGS__)) BOOST_PP_VARIADIC_SEQ_TO_SEQ_A 24 | # define BOOST_PP_VARIADIC_SEQ_TO_SEQ_A0 25 | # define BOOST_PP_VARIADIC_SEQ_TO_SEQ_B0 26 | # endif 27 | # 28 | # endif 29 | -------------------------------------------------------------------------------- /include/spdlog/cfg/argv.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | // 9 | // Init log levels using each argv entry that starts with "SPDLOG_LEVEL=" 10 | // 11 | // set all loggers to debug level: 12 | // example.exe "SPDLOG_LEVEL=debug" 13 | 14 | // set logger1 to trace level 15 | // example.exe "SPDLOG_LEVEL=logger1=trace" 16 | 17 | // turn off all logging except for logger1 and logger2: 18 | // example.exe "SPDLOG_LEVEL=off,logger1=debug,logger2=info" 19 | 20 | namespace spdlog { 21 | namespace cfg { 22 | 23 | // search for SPDLOG_LEVEL= in the args and use it to init the levels 24 | void load_argv_levels(int argc, const char **argv) 25 | { 26 | const std::string spdlog_level_prefix = "SPDLOG_LEVEL="; 27 | for (int i = 1; i < argc; i++) 28 | { 29 | std::string arg = argv[i]; 30 | if (arg.find(spdlog_level_prefix) == 0) 31 | { 32 | auto levels_string = arg.substr(spdlog_level_prefix.size()); 33 | auto levels = helpers::extract_levels(levels_string); 34 | details::registry::instance().update_levels(std::move(levels)); 35 | } 36 | } 37 | } 38 | 39 | void load_argv_levels(int argc, char **argv) 40 | { 41 | load_argv_levels(argc, const_cast(argv)); 42 | } 43 | 44 | } // namespace cfg 45 | } // namespace spdlog 46 | -------------------------------------------------------------------------------- /include/boost/preprocessor/array/reverse.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_ARRAY_REVERSE_HPP 13 | # define BOOST_PREPROCESSOR_ARRAY_REVERSE_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_ARRAY_REVERSE */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_ARRAY_REVERSE(array) (BOOST_PP_ARRAY_SIZE(array), BOOST_PP_TUPLE_REVERSE(BOOST_PP_ARRAY_SIZE(array), BOOST_PP_ARRAY_DATA(array))) 24 | # else 25 | # define BOOST_PP_ARRAY_REVERSE(array) BOOST_PP_ARRAY_REVERSE_I(array) 26 | # define BOOST_PP_ARRAY_REVERSE_I(array) (BOOST_PP_ARRAY_SIZE(array), BOOST_PP_TUPLE_REVERSE(BOOST_PP_ARRAY_SIZE(array), BOOST_PP_ARRAY_DATA(array))) 27 | # endif 28 | # 29 | # endif 30 | -------------------------------------------------------------------------------- /include/fmt/LICENSE.rst: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 - present, Victor Zverovich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | --- Optional exception to the license --- 23 | 24 | As an exception, if, as a result of your compiling your source code, portions 25 | of this Software are embedded into a machine-executable object form of such 26 | source code, you may redistribute such embedded portions in such object form 27 | without including the above copyright and permission notices. 28 | -------------------------------------------------------------------------------- /include/boost/preprocessor/list.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_HPP 15 | # define BOOST_PREPROCESSOR_LIST_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # include 23 | # include 24 | # include 25 | # include 26 | # include 27 | # include 28 | # include 29 | # include 30 | # include 31 | # include 32 | # include 33 | # include 34 | # include 35 | # include 36 | # 37 | # endif 38 | -------------------------------------------------------------------------------- /include/boost/preprocessor/list/fold_right.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP 15 | # define BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # 22 | # if 0 23 | # define BOOST_PP_LIST_FOLD_RIGHT(op, state, list) 24 | # endif 25 | # 26 | # define BOOST_PP_LIST_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) 27 | # 28 | # define BOOST_PP_LIST_FOLD_RIGHT_257(o, s, l) BOOST_PP_ERROR(0x0004) 29 | # 30 | # define BOOST_PP_LIST_FOLD_RIGHT_D(d, o, s, l) BOOST_PP_LIST_FOLD_RIGHT_ ## d(o, s, l) 31 | # define BOOST_PP_LIST_FOLD_RIGHT_2ND BOOST_PP_LIST_FOLD_RIGHT 32 | # define BOOST_PP_LIST_FOLD_RIGHT_2ND_D BOOST_PP_LIST_FOLD_RIGHT_D 33 | # 34 | # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 35 | # include 36 | # else 37 | # include 38 | # endif 39 | # 40 | # endif 41 | -------------------------------------------------------------------------------- /include/boost/preprocessor/tuple/detail/is_single_return.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2014. * 4 | # * Distributed under the Boost Software License, Version 1.0. (See * 5 | # * accompanying file LICENSE_1_0.txt or copy at * 6 | # * http://www.boost.org/LICENSE_1_0.txt) * 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP 13 | # define BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_TUPLE_IS_SINGLE_RETURN */ 18 | # 19 | # if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC 20 | # include 21 | # include 22 | # include 23 | # define BOOST_PP_TUPLE_IS_SINGLE_RETURN(sr,nsr,tuple) \ 24 | BOOST_PP_IIF(BOOST_PP_IS_1(BOOST_PP_TUPLE_SIZE(tuple)),sr,nsr) \ 25 | /**/ 26 | # endif /* BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC */ 27 | # 28 | # endif /* BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP */ 29 | -------------------------------------------------------------------------------- /include/spdlog/fmt/bundled/LICENSE.rst: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 - present, Victor Zverovich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | --- Optional exception to the license --- 23 | 24 | As an exception, if, as a result of your compiling your source code, portions 25 | of this Software are embedded into a machine-executable object form of such 26 | source code, you may redistribute such embedded portions in such object form 27 | without including the above copyright and permission notices. 28 | -------------------------------------------------------------------------------- /include/boost/preprocessor/seq/first_n.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP 13 | # define BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP 14 | # 15 | # include 16 | # include 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_SEQ_FIRST_N */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) 25 | # else 26 | # define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_SEQ_FIRST_N_I(n, seq) 27 | # define BOOST_PP_SEQ_FIRST_N_I(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) 28 | # endif 29 | # 30 | # endif 31 | -------------------------------------------------------------------------------- /include/boost/preprocessor/list/at.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_AT_HPP 15 | # define BOOST_PREPROCESSOR_LIST_AT_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # 21 | # /* BOOST_PP_LIST_AT */ 22 | # 23 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 24 | # define BOOST_PP_LIST_AT(list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N(index, list)) 25 | # else 26 | # define BOOST_PP_LIST_AT(list, index) BOOST_PP_LIST_AT_I(list, index) 27 | # define BOOST_PP_LIST_AT_I(list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N(index, list)) 28 | # endif 29 | # 30 | # /* BOOST_PP_LIST_AT_D */ 31 | # 32 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 33 | # define BOOST_PP_LIST_AT_D(d, list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N_D(d, index, list)) 34 | # else 35 | # define BOOST_PP_LIST_AT_D(d, list, index) BOOST_PP_LIST_AT_D_I(d, list, index) 36 | # define BOOST_PP_LIST_AT_D_I(d, list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N_D(d, index, list)) 37 | # endif 38 | # 39 | # endif 40 | -------------------------------------------------------------------------------- /include/boost/preprocessor/tuple/insert.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2013. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_TUPLE_INSERT_HPP 13 | # define BOOST_PREPROCESSOR_TUPLE_INSERT_HPP 14 | # 15 | # include 16 | # 17 | # if BOOST_PP_VARIADICS 18 | # 19 | # include 20 | # include 21 | # include 22 | # 23 | # /* BOOST_PP_TUPLE_INSERT */ 24 | # 25 | # define BOOST_PP_TUPLE_INSERT(tuple, i, elem) \ 26 | BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_INSERT(BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \ 27 | /**/ 28 | # 29 | # /* BOOST_PP_TUPLE_INSERT_D */ 30 | # 31 | # define BOOST_PP_TUPLE_INSERT_D(d, tuple, i, elem) \ 32 | BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_INSERT_D(d, BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \ 33 | /**/ 34 | # 35 | # endif // BOOST_PP_VARIADICS 36 | # 37 | # endif // BOOST_PREPROCESSOR_TUPLE_INSERT_HPP 38 | -------------------------------------------------------------------------------- /include/boost/preprocessor/list/append.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_LIST_APPEND_HPP 15 | # define BOOST_PREPROCESSOR_LIST_APPEND_HPP 16 | # 17 | # include 18 | # include 19 | # 20 | # /* BOOST_PP_LIST_APPEND */ 21 | # 22 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 23 | # define BOOST_PP_LIST_APPEND(a, b) BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_APPEND_O, b, a) 24 | # else 25 | # define BOOST_PP_LIST_APPEND(a, b) BOOST_PP_LIST_APPEND_I(a, b) 26 | # define BOOST_PP_LIST_APPEND_I(a, b) BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_APPEND_O, b, a) 27 | # endif 28 | # 29 | # define BOOST_PP_LIST_APPEND_O(d, s, x) (x, s) 30 | # 31 | # /* BOOST_PP_LIST_APPEND_D */ 32 | # 33 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 34 | # define BOOST_PP_LIST_APPEND_D(d, a, b) BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_APPEND_O, b, a) 35 | # else 36 | # define BOOST_PP_LIST_APPEND_D(d, a, b) BOOST_PP_LIST_APPEND_D_I(d, a, b) 37 | # define BOOST_PP_LIST_APPEND_D_I(d, a, b) BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_APPEND_O, b, a) 38 | # endif 39 | # 40 | # endif 41 | -------------------------------------------------------------------------------- /include/boost/preprocessor/punctuation/remove_parens.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2014. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | #ifndef BOOST_PREPROCESSOR_REMOVE_PARENS_HPP 13 | #define BOOST_PREPROCESSOR_REMOVE_PARENS_HPP 14 | 15 | #include 16 | 17 | #if BOOST_PP_VARIADICS 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #define BOOST_PP_REMOVE_PARENS(param) \ 25 | BOOST_PP_IIF \ 26 | ( \ 27 | BOOST_PP_IS_BEGIN_PARENS(param), \ 28 | BOOST_PP_REMOVE_PARENS_DO, \ 29 | BOOST_PP_IDENTITY \ 30 | ) \ 31 | (param)() \ 32 | /**/ 33 | 34 | #define BOOST_PP_REMOVE_PARENS_DO(param) \ 35 | BOOST_PP_IDENTITY(BOOST_PP_TUPLE_ENUM(param)) \ 36 | /**/ 37 | 38 | #endif /* BOOST_PP_VARIADICS */ 39 | #endif /* BOOST_PREPROCESSOR_REMOVE_PARENS_HPP */ 40 | -------------------------------------------------------------------------------- /include/boost/preprocessor/tuple/replace.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2013. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_TUPLE_REPLACE_HPP 13 | # define BOOST_PREPROCESSOR_TUPLE_REPLACE_HPP 14 | # 15 | # include 16 | # 17 | # if BOOST_PP_VARIADICS 18 | # 19 | # include 20 | # include 21 | # include 22 | # 23 | # /* BOOST_PP_TUPLE_REPLACE */ 24 | # 25 | # define BOOST_PP_TUPLE_REPLACE(tuple, i, elem) \ 26 | BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_REPLACE(BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \ 27 | /**/ 28 | # 29 | # /* BOOST_PP_TUPLE_REPLACE_D */ 30 | # 31 | # define BOOST_PP_TUPLE_REPLACE_D(d, tuple, i, elem) \ 32 | BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_REPLACE_D(d, BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \ 33 | /**/ 34 | # 35 | # endif // BOOST_PP_VARIADICS 36 | # 37 | # endif // BOOST_PREPROCESSOR_TUPLE_REPLACE_HPP 38 | -------------------------------------------------------------------------------- /include/boost/preprocessor/variadic/detail/is_single_return.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2014. * 4 | # * Distributed under the Boost Software License, Version 1.0. (See * 5 | # * accompanying file LICENSE_1_0.txt or copy at * 6 | # * http://www.boost.org/LICENSE_1_0.txt) * 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_VARIADIC_DETAIL_IS_SINGLE_RETURN_HPP 13 | # define BOOST_PREPROCESSOR_VARIADIC_DETAIL_IS_SINGLE_RETURN_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_VARIADIC_IS_SINGLE_RETURN */ 18 | # 19 | # if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC 20 | # include 21 | # include 22 | # include 23 | # define BOOST_PP_VARIADIC_IS_SINGLE_RETURN(sr,nsr,...) \ 24 | BOOST_PP_IIF(BOOST_PP_IS_1(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__)),sr,nsr) \ 25 | /**/ 26 | # endif /* BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC */ 27 | # 28 | # endif /* BOOST_PREPROCESSOR_VARIADIC_DETAIL_IS_SINGLE_RETURN_HPP */ 29 | -------------------------------------------------------------------------------- /include/boost/preprocessor/variadic/to_array.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Edward Diener 2011. * 4 | # * (C) Copyright Paul Mensonides 2011. * 5 | # * Distributed under the Boost Software License, Version 1.0. (See * 6 | # * accompanying file LICENSE_1_0.txt or copy at * 7 | # * http://www.boost.org/LICENSE_1_0.txt) * 8 | # * * 9 | # ************************************************************************** */ 10 | # 11 | # /* See http://www.boost.org for most recent version. */ 12 | # 13 | # ifndef BOOST_PREPROCESSOR_VARIADIC_TO_ARRAY_HPP 14 | # define BOOST_PREPROCESSOR_VARIADIC_TO_ARRAY_HPP 15 | # 16 | # include 17 | # include 18 | # if BOOST_PP_VARIADICS_MSVC 19 | # include 20 | # endif 21 | # 22 | # /* BOOST_PP_VARIADIC_TO_ARRAY */ 23 | # 24 | # if BOOST_PP_VARIADICS 25 | # if BOOST_PP_VARIADICS_MSVC 26 | # define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY_2(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__),(__VA_ARGS__)) 27 | # else 28 | # define BOOST_PP_VARIADIC_TO_ARRAY(...) BOOST_PP_TUPLE_TO_ARRAY((__VA_ARGS__)) 29 | # endif 30 | # endif 31 | # 32 | # endif 33 | -------------------------------------------------------------------------------- /include/boost/preprocessor/logical/bitor.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_LOGICAL_BITOR_HPP 13 | # define BOOST_PREPROCESSOR_LOGICAL_BITOR_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_BITOR */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_BITOR(x, y) BOOST_PP_BITOR_I(x, y) 21 | # else 22 | # define BOOST_PP_BITOR(x, y) BOOST_PP_BITOR_OO((x, y)) 23 | # define BOOST_PP_BITOR_OO(par) BOOST_PP_BITOR_I ## par 24 | # endif 25 | # 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 27 | # define BOOST_PP_BITOR_I(x, y) BOOST_PP_BITOR_ ## x ## y 28 | # else 29 | # define BOOST_PP_BITOR_I(x, y) BOOST_PP_BITOR_ID(BOOST_PP_BITOR_ ## x ## y) 30 | # define BOOST_PP_BITOR_ID(id) id 31 | # endif 32 | # 33 | # define BOOST_PP_BITOR_00 0 34 | # define BOOST_PP_BITOR_01 1 35 | # define BOOST_PP_BITOR_10 1 36 | # define BOOST_PP_BITOR_11 1 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /include/boost/preprocessor/debug/assert.hpp: -------------------------------------------------------------------------------- 1 | # /* Copyright (C) 2001 2 | # * Housemarque Oy 3 | # * http://www.housemarque.com 4 | # * 5 | # * Distributed under the Boost Software License, Version 1.0. (See 6 | # * accompanying file LICENSE_1_0.txt or copy at 7 | # * http://www.boost.org/LICENSE_1_0.txt) 8 | # */ 9 | # 10 | # /* Revised by Paul Mensonides (2002) */ 11 | # 12 | # /* See http://www.boost.org for most recent version. */ 13 | # 14 | # ifndef BOOST_PREPROCESSOR_DEBUG_ASSERT_HPP 15 | # define BOOST_PREPROCESSOR_DEBUG_ASSERT_HPP 16 | # 17 | # include 18 | # include 19 | # include 20 | # include 21 | # include 22 | # 23 | # /* BOOST_PP_ASSERT */ 24 | # 25 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 26 | # define BOOST_PP_ASSERT BOOST_PP_ASSERT_D 27 | # else 28 | # define BOOST_PP_ASSERT(cond) BOOST_PP_ASSERT_D(cond) 29 | # endif 30 | # 31 | # define BOOST_PP_ASSERT_D(cond) BOOST_PP_IIF(BOOST_PP_NOT(cond), BOOST_PP_ASSERT_ERROR, BOOST_PP_TUPLE_EAT_1)(...) 32 | # define BOOST_PP_ASSERT_ERROR(x, y, z) 33 | # 34 | # /* BOOST_PP_ASSERT_MSG */ 35 | # 36 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() 37 | # define BOOST_PP_ASSERT_MSG BOOST_PP_ASSERT_MSG_D 38 | # else 39 | # define BOOST_PP_ASSERT_MSG(cond, msg) BOOST_PP_ASSERT_MSG_D(cond, msg) 40 | # endif 41 | # 42 | # define BOOST_PP_ASSERT_MSG_D(cond, msg) BOOST_PP_EXPR_IIF(BOOST_PP_NOT(cond), msg) 43 | # 44 | # endif 45 | -------------------------------------------------------------------------------- /include/boost/preprocessor/logical/bitand.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP 13 | # define BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_BITAND */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_I(x, y) 21 | # else 22 | # define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_OO((x, y)) 23 | # define BOOST_PP_BITAND_OO(par) BOOST_PP_BITAND_I ## par 24 | # endif 25 | # 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 27 | # define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ ## x ## y 28 | # else 29 | # define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ID(BOOST_PP_BITAND_ ## x ## y) 30 | # define BOOST_PP_BITAND_ID(res) res 31 | # endif 32 | # 33 | # define BOOST_PP_BITAND_00 0 34 | # define BOOST_PP_BITAND_01 0 35 | # define BOOST_PP_BITAND_10 0 36 | # define BOOST_PP_BITAND_11 1 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /include/boost/preprocessor/logical/bitnor.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_LOGICAL_BITNOR_HPP 13 | # define BOOST_PREPROCESSOR_LOGICAL_BITNOR_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_BITNOR */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_BITNOR(x, y) BOOST_PP_BITNOR_I(x, y) 21 | # else 22 | # define BOOST_PP_BITNOR(x, y) BOOST_PP_BITNOR_OO((x, y)) 23 | # define BOOST_PP_BITNOR_OO(par) BOOST_PP_BITNOR_I ## par 24 | # endif 25 | # 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 27 | # define BOOST_PP_BITNOR_I(x, y) BOOST_PP_BITNOR_ ## x ## y 28 | # else 29 | # define BOOST_PP_BITNOR_I(x, y) BOOST_PP_BITNOR_ID(BOOST_PP_BITNOR_ ## x ## y) 30 | # define BOOST_PP_BITNOR_ID(id) id 31 | # endif 32 | # 33 | # define BOOST_PP_BITNOR_00 1 34 | # define BOOST_PP_BITNOR_01 0 35 | # define BOOST_PP_BITNOR_10 0 36 | # define BOOST_PP_BITNOR_11 0 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /include/boost/preprocessor/logical/bitxor.hpp: -------------------------------------------------------------------------------- 1 | # /* ************************************************************************** 2 | # * * 3 | # * (C) Copyright Paul Mensonides 2002. 4 | # * Distributed under the Boost Software License, Version 1.0. (See 5 | # * accompanying file LICENSE_1_0.txt or copy at 6 | # * http://www.boost.org/LICENSE_1_0.txt) 7 | # * * 8 | # ************************************************************************** */ 9 | # 10 | # /* See http://www.boost.org for most recent version. */ 11 | # 12 | # ifndef BOOST_PREPROCESSOR_LOGICAL_BITXOR_HPP 13 | # define BOOST_PREPROCESSOR_LOGICAL_BITXOR_HPP 14 | # 15 | # include 16 | # 17 | # /* BOOST_PP_BITXOR */ 18 | # 19 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() 20 | # define BOOST_PP_BITXOR(x, y) BOOST_PP_BITXOR_I(x, y) 21 | # else 22 | # define BOOST_PP_BITXOR(x, y) BOOST_PP_BITXOR_OO((x, y)) 23 | # define BOOST_PP_BITXOR_OO(par) BOOST_PP_BITXOR_I ## par 24 | # endif 25 | # 26 | # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 27 | # define BOOST_PP_BITXOR_I(x, y) BOOST_PP_BITXOR_ ## x ## y 28 | # else 29 | # define BOOST_PP_BITXOR_I(x, y) BOOST_PP_BITXOR_ID(BOOST_PP_BITXOR_ ## x ## y) 30 | # define BOOST_PP_BITXOR_ID(id) id 31 | # endif 32 | # 33 | # define BOOST_PP_BITXOR_00 0 34 | # define BOOST_PP_BITXOR_01 1 35 | # define BOOST_PP_BITXOR_10 1 36 | # define BOOST_PP_BITXOR_11 0 37 | # 38 | # endif 39 | -------------------------------------------------------------------------------- /src/Async_Logger_Wrapper.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "Async_Logger_Wrapper.hpp" 3 | 4 | #include "spdlog/sinks/basic_file_sink.h" 5 | 6 | 7 | void Async_Logger_Wrapper::init_logger(const std::string& output_file_path) 8 | { 9 | // Instantiate an `spdlog` thread pool for background output operations. The logger constructed with this 10 | // pool may contain up-to `QUEUE_CAP` log message units. If each log unit has a maximum length of `MSG_LEN`, 11 | // then the logger can take up memory up-to `(QUEUE_CAP x MSG_LEN)` in background. 12 | tp = std::make_shared(QUEUE_CAP, NUM_THREADS); 13 | 14 | // Instantiate an asynchronous `spdlog` logger that uses the thread pool `tp`, and writes to the provided 15 | // sink file at `output_file_path`. 16 | std::shared_ptr sink = std::make_shared(output_file_path); 17 | logger = std::make_shared("async_output", sink, tp, spdlog::async_overflow_policy::block); 18 | 19 | // Set the log message pattern. 20 | logger->set_pattern("%v"); 21 | } 22 | 23 | 24 | void Async_Logger_Wrapper::close_logger() 25 | { 26 | // Note: For `spdlog`, `logger->flush()` posts a message to the queue requesting the flush operation, 27 | // so the function returns immediately. Hence a forceful eviction is necessary by dropping the `spdlog` 28 | // thread pools for the output to force-flush the pending logs. `spdlog::shutdown()` force-flushes 29 | // messages from the global pool only. 30 | 31 | logger->flush(); 32 | tp.reset(); 33 | } 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2020, COMBINE lab 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | --------------------------------------------------------------------------------