This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <nanobench.h> | |
#include <iostream> | |
#include <array> | |
#include <set> | |
#include <algorithm> | |
/*************************************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// based on https://stackoverflow.com/a/73078442/2878380 | |
#include <map> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
#include <chrono> | |
#include <charconv> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define SOME_PREFIX__CAT_I(a, b) a ## b | |
#define SOME_PREFIX__CAT(a, b) SOME_PREFIX__CAT_I(a, b) | |
#define SOME_PREFIX__ARG_N( \ | |
_1 , _2, _3, _4, _5, _6, _7, _8, _9,_10, \ | |
_11,_12,_13,_14,_15,_16,_17,_18,_19,_20, \ | |
_21,_22,_23,_24,_25,_26,_27,_28,_29,_30, \ | |
_31,_32,_33,_34,_35,_36,_37,_38,_39,_40, \ | |
_41,_42,_43,_44,_45,_46,_47,_48,_49,_50, \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdint> | |
#include <cassert> | |
#include <cstring> | |
#if !defined(__fallthrough) && defined(__has_cpp_attribute) | |
#if __has_cpp_attribute(fallthrough) | |
#define __FJ__FALLTHROUGH [[fallthrough]] | |
#elif __has_cpp_attribute(gnu::fallthrough) | |
#define __FJ__FALLTHROUGH [[gnu::fallthrough]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
THREADS=12 | |
CROSS_MINGW_PREFIX="/home/nixman/mingw-w64-cross" | |
NATIVE_MINGW_PREFIX="/home/nixman/mingw-w64" | |
ORIGINAL_PATH="$PATH" | |
export PATH="$CROSS_MINGW_PREFIX/bin:$PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
THREADS=12 | |
CURRENT_DIR="$(pwd)" | |
CROSS_MINGW_PREFIX="$CURRENT_DIR/../mingw-w64-cross" | |
ORIGINAL_PATH="$PATH" | |
rm -rf "$CROSS_MINGW_PREFIX" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <array> | |
#include <cstdint> | |
enum e_permissions: std::size_t { | |
NONE = 0 | |
,SPOT = 1u << 0 | |
,MARGIN = 1u << 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <array> | |
#include <iostream> | |
#include <cassert> | |
#include <cstring> | |
#include <cstdint> | |
#if !defined(__fallthrough) && defined(__has_cpp_attribute) | |
#if __has_cpp_attribute(fallthrough) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <array> | |
#include <utility> | |
#include <string_view> | |
template<std::size_t...Idxs> | |
constexpr auto substring_as_array(std::string_view str, std::index_sequence<Idxs...>) { | |
return std::array{str[Idxs]..., '\n'}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <tuple> | |
#include <type_traits> | |
struct any_type { template<class T> constexpr operator T(); }; | |
#if defined(__GNUC__) && !defined(__clang__) | |
# pragma GCC diagnostic push | |
# pragma GCC diagnostic ignored "-Wmissing-field-initializers" | |
#elif defined(__clang__) | |
# pragma clang diagnostic push |
NewerOlder