This file contains hidden or 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
| .editor-group-watermark > .letterpress{ | |
| background-image: url("https://raw.githubusercontent.com/Aikoyori/ProgrammingVTuberLogos/main/VSCode/VSCode-Thick.png") !important; | |
| opacity: .75; | |
| aspect-ratio: 3/2 !important; | |
| } |
This file contains hidden or 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
| #if defined(_MSC_VER) && !defined(__clang__) | |
| #include <intrin.h> | |
| #else | |
| #include <x86intrin.h> | |
| #endif | |
| #include <cstddef> | |
| #include <cstdint> | |
This file contains hidden or 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 <cstddef> | |
| #include <cstdint> | |
| #include <bit> | |
| #include <utility> | |
| constexpr size_t count_digits10(uint32_t x) noexcept { | |
| static constexpr uint64_t table[]{ | |
| (1ull << 32) | -10u, (1ull << 32) | -10u, (1ull << 32) | -10u, (1ull << 32) | -10u, (1ull << 32) | -10u, (1ull << 32) | -10u, // [1, 64) |
This file contains hidden or 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
| #if defined(_MSC_VER) && !defined(__clang__) | |
| namespace detail { | |
| #pragma optimize("", off) | |
| void DoNotOptimizeImpl(const void*) noexcept {} | |
| #pragma optimize("", on) | |
| } | |
| [[msvc::forceinline]] void DoNotOptimize(const auto& x) noexcept { | |
| Detail::DoNotOptimizeImpl(&x); |
This file contains hidden or 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
| /******************generate bit-reflected constants******************** | |
| constexpr uint64_t Polynomial = 0x1db710641 ; // bit reverse for significant bits of 0x104c11db7 | |
| template <bool GetQuotient = false> | |
| constexpr uint64_t Generate(uint64_t deg) { | |
| uint64_t quot = 0; | |
| uint64_t crc = 2; | |
| for (size_t i = 0; i < deg - 31; i++) { | |
| crc >>= 1; |
This file contains hidden or 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
| class WebSocketClient { | |
| constructor(url) { | |
| this.url = url; | |
| this.socket = null; | |
| this.heartBeatTimeout = 45000; | |
| this.timeoutObj = null; | |
| this.lockReconnect = false; | |
| } | |
| create() { |
This file contains hidden or 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
| #if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_IX86) || defined(_M_X64) && !defined(_M_ARM64EC)) | |
| #define __SSE4_1__ | |
| #define __SSE4_2__ | |
| #endif | |
| #if defined(__AVX512BW__) || defined(__AVX2__) || defined(__SSE4_2__) || defined(__SSE4_1__) | |
| #if defined(_MSC_VER) && !defined(__clang__) |
This file contains hidden or 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
| #if defined(__SSE2__) || defined(_MSC_VER) && !defined(__clang__) && ((defined(_M_AMD64) || defined(_M_X64)) && !defined(_M_ARM64EC) || defined(_M_IX86) && defined(_M_IX86_FP) && _M_IX86_FP == 2) | |
| # if defined(_MSC_VER) && !defined(__clang__) | |
| #include <intrin.h> | |
| # else | |
| #include <emmintrin.h> | |
| #include <xmmintrin.h> | |
| #include <immintrin.h> | |
| # endif |